var myUrl = self.location.href;
var myAdd = myUrl.split("/",6);
//alert(myAdd[3]) : Æú´õ¸í »èÁ¦ÇÏ¸é ¾ÈµÊ banner.js¿¡¼­ »ç¿ëÇÏ´Â º¯¼öÀÓ

try {
	if(top.document.title == "Untitled" || top.document.title == "" || top.document.title == "´ëÇÑÅõÀÚÁõ±Ç"){
		top.document.title = "*ÇÏ³ª´ëÅõÁõ±Ç*";
	}
} catch( e ) {		
}

/**
 Xecure¸¦ »ç¿ëÇÏÁö ¾ÊÀº ÆäÀÌÁö¿¡¼­
 Xecure¸¦ »ç¿ëÇÏ´Â ÆäÀÌÁö·Î ÀÌµ¿ÇÒ ¶§ »ç¿ëÇÑ´Ù.
************************************************************************************/
function XecureGate(_returnURL,_target,_feature) {
	var sReturnURL = "";
	var sTarget = "_self";
	var sFeature = "";
	if (_returnURL!=null) sReturnURL = _returnURL;
	if (_target!=null&&_target!="") sTarget = _target;
	if (_feature!=null&&_feature!="") sFeature = _feature;
	if (sReturnURL!="") {
		var sFullUrl = "/common/html/XecureLink.html?returnURL="+sReturnURL.replace(/&/g,"%26");
		if (sTarget.toLowerCase()=="_opener") {
			try {
				opener.XecureGate(_returnURL,"_self");
			} catch(e) {
				open(sFullUrl,"_blank",sFeature);
			}
		} else {
			open(sFullUrl,sTarget,sFeature);
		}
	} else {
		alert("URLÀÌ Á¤ÀÇµÇÁö ¾Ê¾Ò½À´Ï´Ù.");
	}
}

function XecureGateCp(_returnURL,_target,_feature) {
	var sReturnURL = "";
	var sTarget = "_self";
	var sFeature = "";
	if (_returnURL!=null) sReturnURL = _returnURL;
	if (_target!=null&&_target!="") sTarget = _target;
	if (_feature!=null&&_feature!="") sFeature = _feature;
	if (sReturnURL!="") {
		var sFullUrl = "http://www.hanadaetoo.com/common/html/XecureLink.html?returnURL="+sReturnURL.replace(/&/g,"%26");
		if (sTarget.toLowerCase()=="_opener") {
			try {
				opener.XecureGate(_returnURL,"_self");
			} catch(e) {
				open(sFullUrl,"_blank",sFeature);
			}
		} else {
			open(sFullUrl,sTarget,sFeature);
		}
	} else {
		alert("URLÀÌ Á¤ÀÇµÇÁö ¾Ê¾Ò½À´Ï´Ù.");
	}
}


/**
 ·Î±×ÀÎ
************************************************************************************/
function goLogin(_returnURL) {
	var currentURL = location.pathname;
	var query = location.search;
	var goURL = (_returnURL==undefined) ? currentURL + query : _returnURL;
	var loginPageURL = "/membership/memberLogin.jsp?go_url=" + goURL;
	XecureGate(loginPageURL);
}

function goLoginWithConfirm(_returnURL, _msg) {
	var msg = (_msg==undefined) ? "·Î±×ÀÎÀÌ ÇÊ¿äÇÑ ¼­ºñ½ºÀÔ´Ï´Ù.\n·Î±×ÀÎ ÇÏ½Ã°Ú½À´Ï±î?" : _msg;
	if (confirm(msg)) {
		goLogin(_returnURL);
	}
}

function goLoginWithConfirmCp(_returnURL) {
        var msg = "·Î±×ÀÎÀÌ ÇÊ¿äÇÑ ¼­ºñ½ºÀÔ´Ï´Ù.\n·Î±×ÀÎ ÇÏ½Ã°Ú½À´Ï±î?";
        if (confirm(msg)) {
           var loginPageURL = "/membership/memberLogin.jsp?go_url=" + _returnURL;
           XecureGateCp(loginPageURL,"_top");
        }
}

/**
 ·Î±×¾Æ¿ô
************************************************************************************/
function goLogout() {
	var logoutPageURL = "/common/logoutProcess.jsp";
	XecureGate(logoutPageURL);
}

/********************************************************************************************************
	ÆË¾÷Ã¢ ¿ÀÇÂ 2008/01/30 ÀÌµ¿¿íK Ãß°¡  
********************************************************************************************************/
function popOpenSize(url, width, height ) {
	var positionX = (screen.width-450)/2;
	var positionY = (screen.height-250)/2;
	window.open(url,"","left="+positionX+",top="+positionY+",width="+width+",height="+height+",toolbar=no,scrollbars=no" );
}
/********************************************************************************************************
	ÆË¾÷Ã¢ ¿ÀÇÂ
********************************************************************************************************/
function popOpen(url) {
	var positionX = (screen.width-450)/2;
	var positionY = (screen.height-250)/2;
	window.open(url,"","left="+positionX+",top="+positionY+",width=350,height=250,toolbar=no,scrollbars=no" );
}

/****** ÆË¾÷Ã¢ ¸®»çÀÌÁî **************************************************************/
function popResize() {
	var thisX = document.getElementById("offsetTable").offsetWidth;
	var thisY = document.getElementById("offsetTable").offsetHeight;
	var maxThisX = screen.width - 50;
	var maxThisY = screen.height - 80;
	
	/*
	if (window.navigator.userAgent.indexOf("SV1") != -1){	//IE6.0
	var marginY = 58; //¸¶Áö¸· ¼ö´Â »óÈ²¿¡µû¶ó ¾Ë¸Â°Ô ³ÖÀ¸¼¼¿ä. (ÅÛÇÃ¸´ÀÇ Çì´õ³ôÀÌ + Ç²ÅÍ ³ôÀÌ + ¾ËÆÄ)
	} else if (window.navigator.userAgent.indexOf("MSIE 7.0") != -1){ //IE7.0
	var marginY = 82;
	}else {
	//var marginY = 29; //¸¶Áö¸· ¼ö´Â »óÈ²¿¡µû¶ó ¾Ë¸Â°Ô ³ÖÀ¸¼¼¿ä. (ÅÛÇÃ¸´ÀÇ Çì´õ³ôÀÌ + Ç²ÅÍ ³ôÀÌ + ¾ËÆÄ)
	var marginY = 85; //¸¶Áö¸· ¼ö´Â »óÈ²¿¡µû¶ó ¾Ë¸Â°Ô ³ÖÀ¸¼¼¿ä. (ÅÛÇÃ¸´ÀÇ Çì´õ³ôÀÌ + Ç²ÅÍ ³ôÀÌ + ¾ËÆÄ)
	}
	*/
	if (window.navigator.userAgent.indexOf("MSIE 7.0") != -1){ //IE7.0
		var marginY = 82;
	}
	else if (window.navigator.userAgent.indexOf("SV1") != -1){	//IE6.0
		var marginY = 58; //¸¶Áö¸· ¼ö´Â »óÈ²¿¡µû¶ó ¾Ë¸Â°Ô ³ÖÀ¸¼¼¿ä. (ÅÛÇÃ¸´ÀÇ Çì´õ³ôÀÌ + Ç²ÅÍ ³ôÀÌ + ¾ËÆÄ)
	}else {
	//var marginY = 29; //¸¶Áö¸· ¼ö´Â »óÈ²¿¡µû¶ó ¾Ë¸Â°Ô ³ÖÀ¸¼¼¿ä. (ÅÛÇÃ¸´ÀÇ Çì´õ³ôÀÌ + Ç²ÅÍ ³ôÀÌ + ¾ËÆÄ)
		var marginY = 85; //¸¶Áö¸· ¼ö´Â »óÈ²¿¡µû¶ó ¾Ë¸Â°Ô ³ÖÀ¸¼¼¿ä. (ÅÛÇÃ¸´ÀÇ Çì´õ³ôÀÌ + Ç²ÅÍ ³ôÀÌ + ¾ËÆÄ)
	}
	
	if (thisX > maxThisX) {
		window.document.body.scroll = "yes";
		thisX = maxThisX;
	}
	if (thisY > maxThisY - marginY) {
		window.document.body.scroll = "yes";
		thisX += 19;
		thisY = maxThisY - marginY;
	}
	
	var windowX = (screen.width - (thisX+10))/2;
	var windowY = (screen.height - (thisY+marginY))/2 - 20;
	window.moveTo(windowX,windowY);
	
	window.resizeTo(thisX+10,thisY+marginY);
}

/********************************************************************************************************
	FAQ ¸®½ºÆ® VIEW(IE Àü¿ë)
********************************************************************************************************/

var FAQ_cm = 1;

function FAQ_dis(obj,num){
//alert(obj.parentElement.tagName)
	obj.style.display = "none";
	obj.parentElement.children[eval(num)*2-1].style.display = "block"
	
	if ((num!=FAQ_cm) && (FAQ_cm)) {
		obj.parentElement.children[eval(FAQ_cm)*2-1].style.display="none";
		obj.parentElement.children[eval(FAQ_cm)*2-2].style.display="block";
	}
	FAQ_cm = num;
	
//	alert(FAQ_cm)
//obj.parentElement.children[eval(num)+1].style.display = "block";
}

/********************************************************************************************************
	Tab Image & Layer Show Hide
********************************************************************************************************/

function Tab_div_SH(divNum,selNum,idName,imgUrl){//ÅÇ°¹¼ö, ¼±ÅÃµÈÅÇ ¹øÈ£, idÀÌ¸§, ÀÌ¹ÌÁö °æ·Î
	for(i=1;i<eval(divNum+1);i++){
		document.getElementById('tab_' + idName + '0' + i).src = "/images/" + imgUrl + "/tab_" + idName + "0" + i + "_off.gif";
		document.getElementById('layer_' + idName + '0' + i).style.display = "none";
	}
	
	document.getElementById('tab_' + idName + '0' + selNum).src = "/images/" + imgUrl + "/tab_" + idName + "0" + selNum + "_on.gif";
	document.getElementById('layer_' + idName + '0' + selNum).style.display = "block";
}

/********************************************************************************************************
	Provision iframe Loading
********************************************************************************************************/

function Load_prov(totalNum,selNum,titleTxt){//¾à°ü°¹¼ö,
	var selNum2 = selNum;	//¾à°ü ÅØ½ºÆ® id °ª (¼ýÀÚ¼¼ÆÃ)
	 
	for(i=1;i<eval(totalNum+1);i++){
		document.getElementById('prov_list' + i).style.fontWeight = "normal";
		document.getElementById('prov_list' + i).style.textDecorationUnderline = false;
	}
	
	if(isNaN(parseInt(selNum,10))){ //¹®ÀÚ¿­ Á¦°Å
		selNum2 = selNum.substring(1,selNum.length)
	}
	
	//alert(selNum)
	document.getElementById('prov_list' + selNum2).style.fontWeight = "bold";
	document.getElementById('prov_list' + selNum2).style.textDecorationUnderline = true;
	document.getElementById('prov_title').innerHTML = titleTxt;
	document.getElementById('prov_iframe').src = "/membership/provision0" + selNum + ".html";

}


//¼­ºê¸ÞÀÎ Áö¼ö ÅÇ
function CH_index() {
 if(document.getElementById('index_local').style.display == "block") {
 	document.getElementById('index_local').style.display = "none";
 	document.getElementById('index_fore').style.display = "block";
 } else {
 	document.getElementById('index_local').style.display = "block";
 	document.getElementById('index_fore').style.display = "none"; 
 }
}

/* PC¿ø°ÝÁö¿ø ¸µÅ© °ü·Ã*/
  function openNewWindow(url, name, option) {
	window.open(url, name, option);
  }

 function remote(){
	var chk;
	chk = confirm("Å¬·¡½º¿ø´ÚÅÍ´Â °í°´Áö¿ø¼¾ÅÍ(1588-3111)·Î ÀüÈ­ ÈÄ »çÀüµ¿ÀÇ ÇÏ¿¡ \n°í°´´ÔÀÇ PCÈ­¸éÀ» »ó´ã¿ø°ú ÇÔ²² º¸¸é¼­ µµ¿òÀ» µå¸®´Â \n¿ø°ÝÁö¿ø½Ã½ºÅÛÀÔ´Ï´Ù.\n\n¼­ºñ½º °¡´É½Ã°£Àº   ÆòÀÏ 07:30~18:00 ÀÔ´Ï´Ù.");
	if(chk)
	{
		openNewWindow('http://210.107.66.228/');
	}
 }

 function onlineLink() {
	popOpen("http://www.hanaw.com/common/consultLink.jsp");
/**	
	if( USER_IP_CLASS1 == "159"){
		popOpen("http://159.130.159.7/icc/ko/www/icc_caller_www.asp");
	}
	else{
		popOpen("http://icm.daetoo.com/icc/ko/www/icc_caller_www.asp");
	}
**/
 }
 
 /******************************************************************************************* */
/**************************** ´Ü¼øÈ÷ º¸¿©ÁÖ´Â ±â´ÉÀÇ Flash ·Îµù **************************** */
/******************************************************************************************* */

function Flash_display(sFName, nWidth, nHeight ){
	document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="'+ nWidth + '" height="'+ nHeight + '" id="etc_flash" align="middle">');
	document.write('<param name="allowScriptAccess" value="always" />');
	document.write('<param name="movie" value="/common/flash/'+ sFName + '.swf" />');
	document.write('<param name="quality" value="high" />');
	document.write('<param name="wmode" value="transparent" />');
	document.write('<embed src="/common/flash/'+ sFName + '.swf" quality="high" bgcolor="#ffffff" width="'+ nWidth + '" height="'+ nHeight + '" name="etc_flash" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" /> ');
	document.write('</object>');
}

//20070912 05:00 I-ON Add line 550~558
function go_Newhost(a) {
	url = "http://www.hanadaetoo.com"+a ;
	top.location.href = url;
}

function openNew(path){
	window.open(path);
}

//20070917 Emotion Add : ¸¶¿ì½º ¿À¸¥ÂÊ ¹öÆ° ¸·±â
document.oncontextmenu = function() {return false;}

//20071002 H2O Add : F5 Å°ÀÌº¥Æ® ¸·±â
document.onkeydown = function() {
	switch(event.keyCode){ //Å°°ª¿¡ µû¶ó 
		case 114:event.keyCode='';return false; break; //F3 
        case 116:event.keyCode='';return false; break; //F5 
        //case 122:event.keyCode='';return false; break;//F11 
        //case 117:event.keyCode='';return false; break;//F6 
	} 
}
//20080226 Å°º¸µåº¸¾È Ãß°¡ ÀÎ¼ºÁØ
<!-- Å°º¸µå °ü·Ã script -->
var os_ver = window.navigator.appVersion;

if(os_ver.indexOf("WOW64")>0){
  //alert("Å°º¸µåº¸¾ÈÀº 64bit OS¸¦ Áö¿øÇÏÁö ¾Ê½À´Ï´Ù.");
	document.write('<object classid="CLSID:D923AE0C-190D-4EDF-B07A-76AC571FBFD4" codebase="/softcamp/SCSKEX_WOW64.cab#version=4,0,31,31" width=0 height=0 id="secukeyex" style="position:absolute; left:-1px; top:-1px;" >');
	document.write('</object>');  
}
else if(os_ver.indexOf("Win64")>0)
{
	alert("32bit Internet Explorer¸¦ »ç¿ëÇÏ½Ê½Ã¿À.");
}
else 
	 {
	//alert("»ç¿ëÀÚ ¿î¿µÃ¼Á¦´Â À©µµ¿ì ºñ½ºÅ¸°¡ ¾Æ´Õ´Ï´Ù.");
	document.write('<object classid="CLSID:D923AE0C-190D-4EDF-B07A-76AC571FBFD4" codebase="/softcamp/SCSKEX.cab#version=4,0,31,31" width=0 height=0 id="secukeyex" style="position:absolute; left:-1px; top:-1px;" >');
	document.write('</object>');
}
