﻿function loginform_clearbg(type) {
    if (type == "memid") {
        document.Login.memid.style.backgroundImage = '';
    } else if (type == "mempass") {
        document.Login.mempass.style.backgroundImage = '';
    }
}

function RestCareOpen() {
    var RestCare = window.open('/RestCare/Login/RestCare_GateLogin.asp', 'Rest_Care', 'width=800,height=600,scrollbars=no,status=yes');
    RestCare.focus();
}

function top_menumore() {
    if (document.getElementById('tot_menumore').style.display == 'none') {
        document.getElementById('tot_menumore').style.display = '';
        document.getElementById('tot_menumore_img').src='/IMAGE/Main2011/gnb_07_on.gif';
    } else {
        document.getElementById('tot_menumore').style.display = 'none';
        document.getElementById('tot_menumore_img').src='/IMAGE/Main2011/gnb_07.gif';
    }
}

//xmlhttp 호출, layerhtml 설정
function fn_XmlHttpLayerSet(lname, lurl) {
    var xmlhttp = getXmlHttpRequest();

    if (lurl) {
        xmlhttp.open("GET", lurl, true);
        xmlhttp.onreadystatechange = function () {
            if (xmlhttp.readyState == 4) {
                if (xmlhttp.status == 200) {
                    var respTxt = xmlhttp.responseText;
//                    alert(respTxt);
                    document.getElementById(lname).innerHTML = respTxt;
                }
                xmlhttp = null;
            }
        }
        xmlhttp.send(null);
    }
}

function IsObj(oObj) { return ((typeof(oObj) != 'undefined') && (oObj != null)); }

function fn_ChgMenu(MenuID, imgName, tn, n){
	var tmpSrc, tmpNewSrc; 
	for(var i=0;i<tn;i++){
		if(document.getElementById(imgName+"_"+i) != null){
			tmpSrc = document.getElementById(imgName+"_"+i).src;
			tmpNewSrc	= tmpSrc.replace(/on/gi, "off");
			document.getElementById(imgName+"_"+i).src= tmpNewSrc;			
		}
	}
	
	if (n != "")
	{
		if(IsObj(document.getElementById(imgName+"_"+n))){
			tmpSrc = document.getElementById(imgName+"_"+n).src;
			tmpNewSrc	= tmpSrc.replace(/off/gi, "on");
			document.getElementById(imgName+"_"+n).src= tmpNewSrc;			
		}		
	}

	if(MenuID != ""){
		for(i=0;i<tn;i++){
			if(IsObj(document.getElementById(MenuID+"_"+i))){
				document.getElementById(MenuID+"_"+i).style.display="none";
			}
		}
			document.getElementById(MenuID+"_"+n).style.display="block";
	}

	//지하철역선택시
	/*
	if(MenuID == "SearchMenu"&&imgName=="img_bBtn"&&n=="2"){
		fn_SubwayLayer('','');
	}else if(MenuID == "SearchMenu"&&imgName=="img_bBtn"&&n=="3"){
		var url = "/Restaurant/Search/include/Subway_Layer_Name.asp";
		fn_XmlHttpLayerSet("SubwayName", url);
	}
	*/
}

