// One Depth : oDN

// Two Depth : tDN

//

// online : ¿Â¶óÀÎ ÁöÁ¡, mall : ±ÝÀ¶»óÇ°¸ô, research : ¸®¼­Ä¡¼¾ÅÍ, asset : ÀÚ»ê°ü¸®, giup : ±â¾÷±ÝÀ¶, wts : Æ®·¹ÀÌµù, company : È¸»ç¼Ò°³, support : °í°´Áö¿ø, community : Ä¿¹Â´ÏÆ¼, global : ±Û·Î¹ú, membership : È¸¿ø°¡ÀÔ

//



myUrl = self.location.href;

myAdd = myUrl.split("/",6);

//alert(myAdd[3]) : Æú´õ¸í



if(myAdd[3] == "online") {oDN = 1;}

else if(myAdd[3] == "wts") {oDN = 2;}

else if(myAdd[3] == "mall") {oDN = 3;}

else if(myAdd[3] == "research") {oDN = 4;}

else if(myAdd[3] == "asset") {oDN = 5;}

else {oDN = 1;}



var flash_login = "";

var flash_staff = "";



if(isLogin =="Y") {flash_login=1}else{flash_login=0}

if(isStaff =="Y") {flash_staff=0}else{flash_staff=0}



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="990" height="180" id="Top_flash" align="middle">');

document.write('<param name="allowScriptAccess" value="sameDomain" />');

document.write('<param name="movie" value="/images/flash/sub_0'+fDn+'.swf?dm='+kDn+'&amp;ds='+tDn+'&amp;login='+flash_login+'&amp;prv='+flash_staff+'"  />');

document.write('<param name="quality" value="high" />');

document.write('<param name="wmode" value="transparent" />');

document.write('<embed src="/images/flash/sub_0'+fDn+'.swf?dm='+kDn+'&amp;ds='+tDn+'&amp;login='+flash_login+'&amp;prv='+flash_staff+'" quality="high" bgcolor="#ffffff" width="990" height="180" name="Top_flash" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" /> ');

document.write('</object>');





try {

	var hostName	= top.document.location.hostname;	// Host ¸íÄª

	var topFullUrl	= top.document.location.href;		// ÆÄ¶ó¹ÌÅÍÆ÷ÇÔ Full URL

	var arrParamGbn	= topFullUrl.split("?",2);

	var topUrl		= arrParamGbn[0];					// ÆÄ¶ó¹ÌÅÍÆ÷ÇÔÇÏÁö ¾ÊÀº URL	

	var arrTopUrl	= topUrl.split("/",6);	

	var rootDir		= arrTopUrl[3];						// ÃÖ»óÀ§Æú´õ¸í	



	if(escape(hostName) == escape("www.hanadaetoo.com")){

		var s			= topUrl.lastIndexOf("/");

		var m			= topUrl.lastIndexOf(".");

		var e			= topUrl.length;

		var filename	= topUrl.substring(s+1,m);	// ÆÄÀÏ¸í

		var extname		= topUrl.substring(m+1,e);	// È®ÀåÀÚ¸í



		if(rootDir != "malladmin"){	// malladminÆú´õ´Â URLÁ÷Á¢Á¢±Ù°¡´É

			var i			= topFullUrl.lastIndexOf(rootDir);

			var paramUrl	= topFullUrl.substring(i-1,topFullUrl.length);
			

			document.write("<FORM NAME='top_form' METHOD='post'>");
			document.write("<INPUT TYPE='hidden' name='paramUrl' value='"+paramUrl+"'>");
			document.write("</FORM>");



			if(rootDir == "mall_cp" || rootDir == "membership_cp" || rootDir == "misson_cp" || rootDir == "pms_cp"){
				document.top_form.action="/index.jsp";
				document.top_form.target="_self";

				document.top_form.submit();

				//top.document.location.href = "/index.jsp?paramUrl="+paramUrl;

			}else{

				if(filename != "index"){

					if(extname == "jsp"){
						document.top_form.action="/index.jsp";
						document.top_form.target="_self";

						document.top_form.submit();

						//top.document.location.href = "/index.jsp?paramUrl="+paramUrl;

						//top.document.location.href = "/index.html";

					}

				}

			}			

		}

	}

} catch( e ) {		

}