﻿	function reg_submit()
	{
	    //var findText = $get("findText");
	    //var findText = document.form1.findText.value;
	    
	    //if (!checkField_Kor(findText, 2, 20, '검색어')){
		//	return false;		    
		//}
	}
	
	function reg_Enter(){
	    if (event.keyCode==13){	    
	        return reg_submit();
	    }
	}
	
    function fn_GoPage(page)
    {
		if (document.form1.findText.value=="" || document.form1.findText.value=="우리동네 피카PC방 찾기")
		{
			document.form1.findText.value = document.form1.hidText.value
		}
		
	    document.form1.cpage.value = page;
	    reg_submit();
	    document.form1.submit();
    }	
    

    function popup_Layer(event,popup_name) {    //팝업레이어 생성
         var main,_tmpx,_tmpy,_marginx,_marginy;
         //레이어창 닫기
         var layers = document.getElementsByTagName("div");
         for(var i=0;i<layers.length;i++)
            layers[i].style.display = "none";
         
         main = document.getElementById(popup_name);
         main.style.display = '';//팝업 생성 
         _tmpx = event.clientX+parseInt(main.offsetWidth);
         _tmpy = event.clientY+parseInt(main.offsetHeight);
         _marginx = document.body.clientWidth - _tmpx;
         _marginy = document.body.clientHeight - _tmpy;

         // 좌우 위치 지정
         if(_marginx < 0){//우측;
            main.style.left = event.clientX + document.body.scrollLeft + _marginx-2+"px";
         }
         else{
            main.style.left = event.clientX + document.body.scrollLeft-5+"px";
         }
         //높이 지정
         if(_marginy < 0){//아래부분;
            main.style.top = event.clientY + document.body.scrollTop + _marginy-5+"px";
         }  
         else{
            main.style.top = event.clientY + document.body.scrollTop-5+"px";
         } 

    }  

    function Layer_popup_Off(sTrid) { //팝업 닫음
        document.getElementById(sTrid).style.display = "none";
    } 

    function mouseout_close(sTrid) {
        window.setTimeout('Layer_popup_Off('+sTrid+')',850);
    }

    function go_PopMap(strAddr){
        //var map_url = "http://maps.naver.com/?query=" + strAddr;
        var map_url = "http://local.daum.net/map/index.jsp?q=" + strAddr;
        //window.open(url, 'download', 'width=0,height=0,top=0,left=0,resizable=no,scrollbars=no,status=no,location=no,menubar=no,channelmode=no');
        window.open(map_url,'picamap');
    }
    
    function go_PopPcbang(strAddr){
        var map_url = "http://www.pcbang.com/_pcbinfo/pcbangCont.jsp?tProductKey=" + strAddr;
        //window.open(url, 'download', 'width=0,height=0,top=0,left=0,resizable=no,scrollbars=no,status=no,location=no,menubar=no,channelmode=no');
        window.open(map_url,'picapc');
    }  
    
    function chkTxt()
    {
		if (document.form1.findText.value == "우리동네 피카PC방 찾기")
		{
			document.form1.findText.value = "";
		}
    }
    
      