1/***************************************************************************
 * filename : head.js<br>
 * °øÅëÀ¸·Î »ç¿ëµÇ´Â ÇÔ¼ö¹× ¼Ó¼º<br>
 *
 * @version	: 1.0
 * @author	: free270
****************************************************************************/
if(HEAD_CLASS!=null) {
	alert("[head.js]´Â ÀÌ¹Ì include µÇ¾îÀÖ½À´Ï´Ù!!");
}
var HEAD_CLASS = true;

//BODYÅÂ±×ÀÇ onLoad() ÀÌº¥Æ®¿¡¼­ È£ÃâÇÏ´Â ÇÔ¼ö
function init(){
	//ÇØ´çÆäÀÌÁö³»¿¡¼­ overridingµÇ¾îÁü
}
function popupEvent(){}
function init_start(){
	// code here ...  init()ÇÔ¼ö°¡ ÇØ´çÆäÀÌÁö³»¿¡¼­ overridingµÇ¾îÁö±â ¶§¹®¿¡ ±× ÀÌÀü¿¡ ½ÇÇàÇÏ°íÀÚ ÇÏ´Â ±â´ÉÀ» ¿©±â¿¡ ³ÖÀ¸½Ã¿À	
	init();

	setTimeout("popupEvent();", 2000);	
}

function goLeave(){

	loginPopup_pageUrl = "https://sso.hite.com/s_log/quit_01.asp";
	
	var loginPopup = window.open(loginPopup_pageUrl, "login", "top=0,left=0,width=820, height=520,scrollbars=yes,resizable=no");

	if (loginPopup == null)
	{
		alert("È¸¿øÅ»Åð¸¦ ÇÏ½Ç·Á¸é Â÷´ÜµÈ ÆË¾÷Ã¢À» Çã¿ëÇØ ÁÖ½Ê½Ã¿À.");
	}

	loginPopup.focus();

}

function goLeaveMem(){

	loginPopup_pageUrl = "https://sso.hite.com/s_log/login.asp?login_channel=1&memcode=leave";
	
	var loginPopup = window.open(loginPopup_pageUrl, "login", "top=0,left=0,width=820, height=520,scrollbars=yes,resizable=no");

	if (loginPopup == null)
	{
		alert("È¸¿øÅ»Åð¸¦ ÇÏ½Ç·Á¸é Â÷´ÜµÈ ÆË¾÷Ã¢À» Çã¿ëÇØ ÁÖ½Ê½Ã¿À.");
	}

	loginPopup.focus();

}

function goLogin(url){

	var returnUrl = "";

	if(url == null){
		returnUrl = escape(CURRENT_PAGE);
	}else{
		returnUrl = escape(url);
	}

	loginPopup_pageUrl = "https://sso.hite.com/s_log/login.asp?login_channel=1&memcode=login&returnUrl=" + returnUrl;
	var loginPopup = window.open(loginPopup_pageUrl, "login", "top=0,left=0,width=820, height=520,scrollbars=yes,resizable=no");

	if (loginPopup == null)
	{
		alert("·Î±×ÀÎ ÇÏ½Ç·Á¸é Â÷´ÜµÈ ÆË¾÷Ã¢À» Çã¿ëÇØ ÁÖ½Ê½Ã¿À.");
	}

	loginPopup.focus();

}

function goJoin(url){
	
	var returnUrl = "";

	if(url == null){
		returnUrl = escape(CURRENT_PAGE);
	}else{
		returnUrl = escape(url);
	}

	joinPopup_pageUrl = "https://sso.hite.com/s_log/login.asp?login_channel=1&returnUrl=" + returnUrl;
	var joinPopup = window.open(joinPopup_pageUrl, "login", "top=0,left=0,width=820, height=520,scrollbars=yes,resizable=no");

	if (joinPopup == null)
	{
		alert("È¸¿ø°¡ÀÔÀ» ÇÏ½Ç·Á¸é Â÷´ÜµÈ ÆË¾÷Ã¢À» Çã¿ëÇØ ÁÖ½Ê½Ã¿À.");
	}

	joinPopup.focus();

}

function goModify(){

	var returnUrl = "";

	returnUrl = escape(CURRENT_PAGE);

	joinPopup_pageUrl = "https://sso.hite.com/s_log/edit.asp?returnUrl=" + escape(CURRENT_PAGE);
	var joinPopup = window.open(joinPopup_pageUrl, "login", "top=0,left=0,width=820, height=520,scrollbars=yes,resizable=no");

	if (joinPopup == null)
	{
		alert("È¸¿øÁ¤º¸¸¦ ¼öÁ¤ ÇÏ½Ç·Á¸é Â÷´ÜµÈ ÆË¾÷Ã¢À» Çã¿ëÇØ ÁÖ½Ê½Ã¿À.");
	}

	joinPopup.focus();
}

function goLogout(){
	document.location = URL_ROOT + "h_customer/member/xt_logout.asp?returnURL=" + escape(CURRENT_PAGE);;
}

//[ ¹Ù·Î°¡±â ÇÔ¼ö ] ==================================================================================================
function goHome(){
	document.location = "/";
}
function goLogin2007(url){
	if(url == null){
		document.location = URL_ROOT + "h_customer/member/login.asp?returnURL=" + escape(CURRENT_PAGE);
	}else{
		document.location = URL_ROOT + "h_customer/member/login.asp?returnURL=" + escape(url);
	}
}
function goDirectLogin(p_current_page, p_sso_logininfo){
	document.location = URL_ROOT + "h_customer/member/xt_login.asp?returnURL=" + escape(p_current_page) + "&loginParam=" + p_sso_logininfo;
}
function syncSSO(){
	if(ISLOGINED != SSO_LOGINED){
		if(ISLOGINED==true){
			goLogout();			
		}else{			
//			goDirectLogin(CURRENT_PAGE, SSO_LOGININFO);
			document.location = URL_ROOT + "h_customer/member/xt_login.asp?returnURL=" + escape(CURRENT_PAGE) + "&loginParam=" + escape(SSO_LOGININFO);
		}
	}
}
function goLogout2007(){
	document.location = URL_ROOT + "h_customer/member/xt_logout.asp?returnURL=" + escape(CURRENT_PAGE);;
}
function goJoin2007(){
	document.location = URL_ROOT + "h_customer/member/join_agreement.asp";
}
function goModify2007(){
	document.location = URL_ROOT + "h_customer/member/join.asp?MODE=edit";
}
function goPRStout(){
	window.open('/pr/stout/staut01.htm','popwin','width=782,height=731,top=0,left=100,scrollbars=no'); 
}
function goIDCheck(){
	document.location = URL_ROOT + "h_customer/member/checkname.asp";
}


function goAbout(){
	goMenu('about','','');
	//document.location = URL_ROOT + "h_about/index.asp";
}
function goPR(){
	goMenu('pr','','');
	//document.location = URL_ROOT + "h_pr/index.asp";
}
function goAcademy(){
	goMenu('academy','','');
	//document.location = URL_ROOT + "h_academy/index.asp";
}
function goStory(){
	goMenu('story','','');
	//document.location = URL_ROOT + "h_story/index.asp";
}
function goMyHite(){
	goMenu('myhite','','');
	//document.location = URL_ROOT + "h_myhite/index.asp";
}
function goCustomer(){
	goMenu('customer','','');
	//document.location = URL_ROOT + "h_customer/index.asp";
}
function goFactory(){
	goMenu('factory','','');
	//document.location = URL_ROOT + "h_factory/index.asp";
}
function goCommunity(){
//	alert("ÁØºñÁßÀÔ´Ï´Ù");
//return;
	if(ISLOGINED){
		open("http://club.hite.com/main.asp","_blank","");
	}else{
		alert("·Î±×ÀÎÀ» ¸ÕÀú ÇÏ¼Å¾ß ÇÕ´Ï´Ù.\n\nÈ®ÀÎÀ» ´©¸£½Ã¸é ·Î±×ÀÎ ÆäÀÌÁö·Î ÀÌµ¿ÇÕ´Ï´Ù.");
		goLogin();
	}
}
function goRecruit(){
	document.location = URL_ROOT + "h_recruit/index.asp";
}
function goSitemap(){
	document.location = URL_ROOT + "sitemap.asp";
}
function goEnglish(){
	document.location = "http://english.hite.com";
}
function goSearchSUB( keyword ){
	document.location.href = "/h_customer/search/search.asp?ckey=" + escape(keyword);
}




/** For Flash menu interface *************************************************************/
function MM_controlShockwave(objStrNS,objStrIE,cmdName,frameNum) { //v2.0
	var objStr = (navigator.appName=='Netscape')?objStrNS:objStrIE;
	if ((objStr.indexOf('document.layers[')==0 && document.layers==null) ||	(objStr.indexOf('document.all[') ==0 && document.all ==null)){
		objStr = 'document'+objStr.substring(objStr.lastIndexOf('.'),objStr.length);
	}
	if (eval(objStr) != null){
		eval(objStr+'.'+cmdName+'('+((cmdName=='GotoFrame')?frameNum:'')+')');
	}
} 

function goMenu(menu1, menu2, menu3, menu4){	
//	document.location = "/h_" + menu1 + "/index.asp";
	if(menu1==null) menu1 = "";
	if(menu2==null) menu2 = "";
	if(menu3==null) menu3 = "";
	if(menu4==null) menu4 = "";
	if(menu1=="") return;

	//alert("menu1=" + menu1 + ",menu2=" + menu2 + ",menu3=" + menu3);

	if(MEMBER_ID=="free270"){
		//alert("menu1=" + menu1 + "\nmenu2=" + menu2 + "\nmenu3=" + menu3);
	}

	if(menu1=="leports" && menu2=="03" && menu3=="03"){
		goSlideShow('38',false);
		return;
	}
	if(menu1=="leports" && menu2=="03" && menu3=="05"){
		goSlideShow('30',false);
		return;
	}
	if(menu1=="story" && menu2=="04"){
		goPRStout();
		return;
	}


	document.location = "/gomenu.asp?menu1=" + menu1 + "&menu2=" + menu2 + "&menu3=" + menu3 + "&menu4=" + menu4;
}

//¿ìÆí¹øÈ£ °Ë»öÃ¢
function openFindZip(type){
	if(type==null) type = "";
	window.open(URL_ROOT + "common/zip/popup_findzip.asp?type=" + type, "popup_findzip", "top=100,left=100,width=350,height=360");
}
function goCyber(){
	window.open("/h_pr/cyber/fr_main.htm","","fullscreen=yes,type=fullWindow,scrollbar=0");
}
function goSlideShow(num, list_opt){
	if(list_opt==null || !list_opt){
		list_opt = "N";
	}else if(list_opt){
		list_opt = "Y";
	}
    url = "/common/slideshow/slideshow.asp?album_no=" + num + "&list_opt=" + list_opt;
	window.open(url, 'slideshow', 'width=1024, height=800, status=no,toolbar=no,scrollbars=no,top=0,left=0,location=no,menubar=no, resizeable=no, fullscreen=yes');
}
function FFOpen(link, winname, option){
	window.open(link, winname, option); 
	return;
}
function sendMail(from_email, from_name, to_email){
	open("/common/mail/send.asp?fe=" + from_email + "&fn=" + from_name + "&te=" + to_email,'sendmail','width=600,height=300');
}

//È¸¿ø°Ë»ö
function searchMember(){
	open("/common/member_search_popup.asp", "member_search", 'width=600,height=300')
}


// °´¿ø¸¶ÄÉÅÍ È¸¿øÁ¤º¸ ÆË¾÷
function openMemberInfo(id){
	winResult = window.open("/h_marketer/memberroom/member_view_pop.asp?id="+id,"view", "scrollbars=yes,status=no,resizable=no,top=1,left=1,width=520,height=460" );
}

/****** MAIN FLASH LINK************/
function goHistory(){
	open('/root_event/20030612/quiz/history.asp','ÇÏÀÌÆ®¿ª»ç°ü','width=760,height=400')
}

function goMainCalendar(){
	document.location = "/h_pr/html2/pr_wallpaper.asp?menu1=enjoy";
}

function goMainBell(){
	document.location = "/h_enjoy/html2/bell_main.asp";
}

function goMainEcard(){
	document.location = "/h_enjoy/html2/ecard_main.asp";
}

function justice(){
	window.open('/h_customer/member/justice.asp');
}

function event_link(value){
	if (value=="1")	 window.open('http://www.maxbeer.co.kr/event/event_ing.asp');
	if (value=="2")	 window.open('http://www.s-beer.com/s_girl/');
	//if (value=="3")	 window.open('http://www.s-beer.com/s_girl/');
	//if (value=="4")	 window.open('http://www.thehite.com/hitepiff/');
	//if (value=="1")	 window.location.href='http://www.hite.com/campus/skicamp_apply/2007/ski_info2007.asp'; ¹Ù·Î°¡±â
}

/****** SITEMAP LAYER CONTROL ************/

function sitemapHeight(value){
	document.getElementById("sitemap").style.height = value+"px";
}