//1. ·Î±×ÀÎ

function log_In(village_code, village_URL) {
	location.href="http://secure.invil.org/login/index.jsp?village_code="+village_code+"&first_page=1&return_url="+village_URL;
}

//2. ·Î±×¾Æ¿ô

function log_Out(village_URL) {
	location.href="http://www.invil.org/login/PhLogOut.jsp?return_url="+village_URL;
}

    
//3. ¸¶ÀÌÆäÀÌÁö
function go_Mypage(village_code) {
	location.href="http://www.invil.org/mypage/schedule/index.jsp?village_code="+village_code;
}





//4.¸ÞÀÏ
function community_mail(village_code, village_name) {
	location.href="http://mail.invil.org/index.jsp?region_abbr="+village_name+"&village_code="+village_code;
}

//5.¿Ü±¹¾îÆäÀÌÁö ¿¬°á
function goForeign() {
	win = window.open("","")
	{
	    if ( document.all.input_foreign.value == '1' ) {
		win.location.href = "http://www.invil.org/";
	    }
	    else if ( document.all.input_foreign.value == '2' ){
		win.location.href = "http://www.invil.org/english/";
	    }
	    else if ( document.all.input_foreign.value == '3' ){
		win.location.href = "http://www.invil.org/chinese/";
	    }
	    else if ( document.all.input_foreign.value == '4'){
	    win.location.href = "http://www.invil.org/japanese/";
	    }
	}
}

//5.½ÃÀÛÆäÀÌÁö ¼³Á¤
	function linkStartPage(){
	  document.loginForm.style.behavior='url(#default#homepage)'; 
	  document.loginForm.setHomePage('http://insamherb.invil.org');
		}
		
//6. °Ë»ö
    var mikExp = /[$\\@\\\#%\^\&\*\(\)\[\]\+\<\>\_\{\}\'\~\=\|]/;
    function dodacheck(strPass) {
    	var strLength = strPass.length;
    	var lchar = strPass.charAt((strLength) - 1);
    	if(lchar.search(mikExp) != -1) {
    		window.alert("´ÙÀ½°ú °°Àº Æ¯¼ö¹®ÀÚ´Â \n\r\n\r@ $ % ^ < > & * # ( ) [ ] \\ { + }  ` ~ =  | \n\r\n\rÀÔ·ÂÇÏ½Ç ¼ö ¾ø½À´Ï´Ù.\n");
    		return false;
    	}else{
    		return true;
    	}
    }
    
    function scSubmit()
    {
    	var f=document.sc_General;
    	if(dodacheck(f.S1.value))
    	{
    		f.method = 'post';
    		f.action ="/util/search/GeneralView.jsp";
    	  	f.submit();     
    	}
    	else{
    		f.S1.value = "";
    		f.S1.focus();
    	}
    }		
    
//6. Ã£±â
		function goSearch(url){
		    searchWin = window.open(url, 'SearchWin', 'top=100, left=100, width=367, height=203, toolbar=no, fullscreen=no, directories=no, status=no, scrollbars=yes, menubar=no, location=no, resizable=no');
		    searchWin.focus();
		}
		
		
//7. ³»µ¿È£È¸ ¹Ù·Î°¡±â
function f_myclub_go(club_id,village_code) {
	//alert(club_id);
	if (club_id == "all" ) {
		location.href="http://community.invil.org/community/region/club/index.jsp?region_code="+village_code;
		return true;
	} else if (club_id != "none" && club_id != "all") {
		location.href="http://club.invil.org/" + club_id +"/";
		return true;
	}
}		    


//8. µ¿¿µ»ó º¸±â
    function govillageVOD(village_code) 
	{
	    var url = "http://www.invil.org/VOD_VR/common/PhDetlRetriveVod.jsp?village_code="+village_code;
	    openpop = window.open(url, "Ãâ·Â", "scrollbars=yes,status=yes, titlebar=yes,left=50,top=1,width=467, height=597");
	    openpop.focus();
	}