﻿if(HEAD_CLASS!=null) {
	
}
var HEAD_CLASS = true;


function init(){
	
}
function popupEvent(){}
function init_start(){
	init();

	setTimeout("popupEvent();", 2000);	
}


function goHome(){
	document.location = URL_ROOT;
}

/** For Flash menu interface *************************************************************/
function goMenu(menu1, menu2, menu3, menu4, target, menu5){	
  // alert(menu1);
	if(menu1 == null){	menu1 = ""	}
	if(menu2 == null){	menu2 = ""	}
	if(menu3 == null){	menu3 = ""	}
	if(menu4 == null){	menu4 = ""	}
	if(target == null){	target = ""	}
	if(menu5 == null){	menu5 = ""	}

	//	alert(URL_ROOT + "/gomenu.asp?menu1=" + menu1 + "&menu2=" + menu2 + "&menu3=" + menu3 + "&menu4=" + menu4 + "&menu5=" + menu5 + "&target=" + target);

	document.location = URL_ROOT + "/gomenu.asp?menu1=" + menu1 + "&menu2=" + menu2 + "&menu3=" + menu3 + "&menu4=" + menu4 + "&menu5=" + menu5 + "&target=" + target
}
function openFindZip(type){
	if(type==null) type = "";
	//window.open(URL_ROOT + "common/zip/popup_findzip.asp?type=" + type, "popup_findzip", "width=480,height=380");
}
function FFOpen(link, winname, option){
	window.open(link, winname, option); 
	return;
}
function sendMail(from_email, from_name, to_email){

}
function popupPrint(){
	open(URL_ROOT + "/etc/pop_print.asp","print", "width=620,height=500,scrollbars=yes");
}
function limitTextarea(obj){
	if(obj.maxlength == null || obj.maxlength == ""){
		alert("개발시에 maxlength속성값을 주셔야 합니다.\n\n ex) mextlength='100'");
		return true;
	}

	var length = parseInt(obj.maxlength);

	if (obj.value.length > length) {
		msg = "";
		if(obj.title!=null && obj.title!=""){
			msg = obj.title + " 은(는) ";
		}
		msg += "한글 " + length + "자 이내로 입력해주세요\n\n한글 " + length + "자 기준으로 자동으로 잘려집니다.";
		alert(msg);
		obj.value = obj.value.substring(0,length);
		obj.focus();

		return false;
	}				

	return true;
}	

/*
 * EX) <input type="text" onKeyDown="javascript:if(isEnterDown()){goCommSubmit();}">
 */
function isEnterDown(){
	if(event.keyCode==13){
		return true;
	}else{
		return false;	
	}
}


//popup
function popup(url,w,h) {
	l = (screen.width) ?	(screen.width-550) / 2	: 0;
	t = (screen.height) ?	(screen.height-400) / 2 : 0;	
	var opt='top='+t+',left='+l+',width='+w+',height='+h;
	opt=opt+',toolbar=no,status=no,directories=no,scrollbars=auto,location=no,resizable=no,menubar=no';
	window.open(url,'Content',opt);
}
function popuplo(url,w,h,s) {
	l = (screen.width) ?	(screen.width-550) / 2	: 0;
	t = (screen.height) ?	(screen.height-400) / 2 : 0;	
	var opt='top='+t+',left='+l+',width='+w+',height='+h+',scrollbars='+s;
	opt=opt+',toolbar=no,status=no,directories=no,location=no,resizable=no,menubar=no';
	window.open(url,'Content',opt);
}


function gotop(){
	scroll(0,0);
}
