﻿//<![CDATA[



function FNflash_insert(Tobj,flashvars){

	var tot_url =document.URL;
	var flashPath="";

	if(tot_url.substr(0,4)=="http") flashPath="/flash/";
	else flashPath="./";

	var Fswf="";			var Fwidth="";		var Fheight="";
	var Fid="";			var Fwmode="";	var Falign="";
	var Fbgcolor="";	var Fquality="";		var FallowScriptAccess="";

	var seperate1=",";	var seperate2="=";
	var ARobj=Tobj.split(seperate1);

	for(var i=0; i<=ARobj.length-1; i++){
		var prop=this["Ftag"+i]=ARobj[i].split(seperate2);
		if(prop[0].search("swf") !=-1) Fswf=prop[1];
		if(prop[0].search("width") !=-1) Fwidth=prop[1];
		if(prop[0].search("height") !=-1) Fheight=prop[1];
		if(prop[0].search("flashID") !=-1) Fid=prop[1];
		if(prop[0].search("wmode") !=-1) Fwmode=prop[1];
		if(prop[0].search("align") !=-1) Falign=prop[1];
		if(prop[0].search("bgcolor") !=-1) Fbgcolor=prop[1];
		if(prop[0].search("quality") !=-1) Fquality=prop[1];
		if(prop[0].search("allowScriptAccess") !=-1) FallowScriptAccess=prop[1];
	}


	Fswf=flashPath+Fswf;
	if(Fwidth == "") Fwidth="100%";
	if(Fheight == "") Fheight="100%";
	if(Fid == ""){var Tid=Fswf.split("."); Fid=Tid[0];}
	if(Fwmode == "") Fwmode="";
	if(Falign == "") Falign="LT";
	if(Fbgcolor == "") Fbgcolor="#FFFFFF";
	if(Fquality=="") Fquality="best";
	if(FallowScriptAccess=="") FallowScriptAccess="always";

	var Tvars=""
	if(flashvars == "") Tvars="Rpath="+flashPath+"&";
	else Tvars=flashvars+"&Rpath="+flashPath+"&";

	var str=new String();



	if (navigator.appName.indexOf("Microsoft") != -1){
		str+='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" ';
		str+='codebase="https://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=version=8,0,0,0" ';
		str+='width="'+Fwidth+'" height="'+Fheight+'"id="'+Fid+'">';
				str+='<param name="movie" value="'+Fswf+'"/>';
				str+='<param name="flashvars" value="'+Tvars+'">';
				str+='<param name="quality" value="'+Fquality+'"/>';
				str+='<param name="bgcolor" value="'+Fbgcolor+'"/>';
				str+='<param name="wmode" value="'+Fwmode+'"/>';
				str+='<param name="allowScriptAccess" value="always"/>';
				str+='<param name="allowNetworking" value="all"/>';
		str+= '</object>';
	}else{
		str+='<embed src="'+Fswf+'" ';
				str+='quality="'+Fquality+'" ';
				str+='bgcolor="'+Fbgcolor+'" ';
				str+='width="'+Fwidth+'" ';
				str+='height="'+Fheight+'" ';
				str+='name="'+Fid+'" ';
				str+='wmode="'+Fwmode+'" ';
				str+='allowScriptAccess="always"';
				str+='allowNetworking="all"';
				str+='flashvars="'+Tvars+'"';
				str+='type="application/x-shockwave-flash" ';
				str+='pluginspage="https://www.macromedia.com/go/getflashplayer">';
		str+='</embed>';
	}
	document.write(str);

}





function FNgetURL(){
	var tot_url =document.URL;
	var get_host=tot_url.split("?");
	var url=get_host[0];
	var query=get_host[1];
	var glen = get_host.length;
	Depth1=0;Depth2=0;Depth3=0;


	//------------------------01
	if(url.search("/travel/") !=-1){

		Depth1=1;

		if(url.search("thema") !=-1){
			Depth2=1;
		}else if(url.search("trip") !=-1){
			Depth2=2;
		}else if(url.search("calendar") !=-1){
			Depth2=3;
		}

	}



	//------------------------02
	else if(url.search("/enjoy/") !=-1){

		Depth1=2;

		if(url.search("card") !=-1){
			Depth2=1;
		}else if(url.search("crash") !=-1){
			Depth2=2;
		}else if(url.search("shot") !=-1){
			Depth2=3;
		}else if(url.search("myCom") !=-1){
			Depth2=4;
		}

	}



	//------------------------03
	else if(url.search("/fun/") !=-1){

		Depth1=3;

		if(url.search("game.asp") !=-1){
			Depth2=4;
		}

		
		else if(url.search("faction.asp") !=-1){
			Depth2=3;
			Depth3=1;
		}
		
		else if(url.search("faction_") !=-1){
			Depth2=3;
			Depth3=2;
		}
		
		else if(url.search("ilove") !=-1){
			Depth2=1;
		}
		else if(url.search("vita") !=-1){
			Depth2=2;

		}

		/*
		else if(url.search("game.asp") !=-1){
			Depth2=3;
		}
		*/

	}

	//------------------------04
	else if(url.search("/product/") !=-1){

		Depth1=4;

		if(url.search("introduction.asp") !=-1){
			Depth2=1;
		}else if(url.search("introduction_01.asp") !=-1){
			Depth2=2;
		}else if(url.search("introduction_02.asp") !=-1){
			Depth2=3;
		}else if(url.search("introduction_03.asp") !=-1){
			Depth2=4;
		}
		
		
		else if(url.search("cf.asp") !=-1){
			Depth2=5;
			Depth3=1;
		}else if(url.search("cf_") !=-1){
			Depth2=5;
			Depth3=2;
		}


	}


	//------------------------05
	else if(url.search("/event/") !=-1){

		Depth1=5;

		if(url.search("prize") !=-1){
			Depth2=2;
		}else if(url.search("last") !=-1){
			Depth2=3;
		}

		else if(url.search("event") !=-1){
			Depth2=1;
		}

	}


	//------------------------06 customer
	else if(url.search("/customer/") !=-1){

		Depth1=6;

		if(url.search("notice") !=-1){
			Depth2=1;
		}else if(url.search("faq") !=-1){
			Depth2=2;
		}else if(url.search("inquiry") !=-1){
			Depth2=3;
		}else if(url.search("email") !=-1){
			Depth2=4;
		}else if(url.search("sitemap") !=-1){
			Depth2=5;
		}

	}



	//------------------------07 membership
	else if(url.search("/membership/") !=-1){

		Depth1=7;
		//---------------------------------(before login)
		if(url.search("login") !=-1){//로그인

			Depth2=1;
		}



		//회원가입
		else if(url.search("join") !=-1){
			Depth2=2;
		}else if(url.search("KDwell_info") !=-1){
			Depth2=2;
		}else if(url.search("KDwell_agreement") !=-1){
			Depth2=2;
		}








		//---------------------------------(after login)
		else if(url.search("logout") !=-1){//로그아웃
			Depth2=1;
		}else if(url.search("modify") !=-1){//회원정보 수정
			Depth2=2;
		}


		else if(url.search("id_pw_search") !=-1){//아이디/비밀번호찾기
			Depth2=3;
		}


		else if(url.search("secede") !=-1){//회원탈퇴
			Depth2=6;//top.asp에서 다시 수정
		}


		//---------------------------------(공통)
		else if(url.search("terms") !=-1){//이용약관
			Depth2=4;
		}else if(url.search("privacy") !=-1){//개인정보취급방침
			Depth2=5;
		}




	}
	//alert("DEPTH :"+[Depth1, Depth2]);
}

FNgetURL()
//]]>