//location link

function home(){
	location.href="/_site/index.asp";
}
function ir(){
	location.href="/_site/ir/news_list.asp";
}
function pr(){
	location.href="http://www.ts.co.kr/_site/pr/news_list.asp";
}
function customer(){
	location.href="/_site/customer/event.asp";
}
function recruit(){
	location.href="/_site/recruit/recruit.asp";
}
function ts(){
	location.href="/_site/ts/ceo.asp";
}
function ts_vision(){
	location.href="/_site/ts/vision.asp";
}
function ts_busi(){
	location.href="/_site/ts/abroad.asp";
}
function ts_store(){
	location.href="/_site/ts/store_kor.asp";
}

function product(){
	location.href="/_site/product/sugar.asp";
}

function product_food(){
	location.href="/_site/product/food.asp";
}







// flash 

if(!Depth1){
var Depth1, Depth2, Depth3
	Depth1=0;
	Depth2=0;
	Depth3=0;
}
function flash(AMovie, AWidth, AHeight) {
 document.write('<object id="setval" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="https://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0" width="' + AWidth + '" height="' + AHeight + '">'
 + '<param name="movie" value="' + AMovie + '">'
  + '<param name="wmode" value="opaque">'
 + '<embed src="' + AMovie + '" id="setval" quality="high" pluginspage="https://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="' + AWidth + '" height="' + AHeight + '"></embed>'
 + '</object>');
}
function LeftFlash(AMovie, AWidth, AHeight) {
 document.write('<object id="setval" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="https://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0" width="' + AWidth + '" height="' + AHeight + '">'
 + '<param name="movie" value="' + AMovie + '">'
 + '<param name="wmode" value="transparent">'
 + '<param name="flashvars" value="Depth1=' + Depth1 + '&Depth2='+Depth2+'&Depth3='+Depth3+'">'
 + '<embed src="' + AMovie + '" id="setval" quality="high" pluginspage="https://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="' + AWidth + '" height="' + AHeight + '"></embed>'
 + '</object>');
}

//ÆäÀÌÁö·ÎÄÉÀÌ¼Ç

function PathChk(Depth1,Depth2, Depth3){
        var oneDepth = new Array();
        var twoDepth = new Array();
        var threeDepth = new Array();
 /************** 1 depth ***************/
/* if(Depth1=="1"){
oneDepth[1] = "oneDepth1";
oneDepth[2] = "oneDepth2";
oneDepth[3] = "oneDepth3";
oneDepth[4] = "oneDepth4";
oneDepth[5] = "oneDepth5";
oneDepth[6] = "oneDepth6";
 }*/
 /************** 2 depth ***************/

//TS´ëÇÑÁ¦´ç
 if((Depth1=="1")&&(Depth3==undefined)){
	 twoDepth[1]="/_site/ts/ceo.asp";
	 twoDepth[2]="/_site/ts/vision.asp";
	 twoDepth[3]="/_site/ts/abroad.asp";
	 twoDepth[4]="/_site/ts/laboratory.asp";
	 twoDepth[5]="/_site/ts/store_kor.asp";
	 twoDepth[6]="/_site/ts/family.asp";
	 twoDepth[7]="/_site/ts/Corporate.asp";
location.href = twoDepth[Depth2];

//Á¦Ç°&ºê·»µå
 }else if((Depth1=="2")&&(Depth3==undefined)){
	 twoDepth[1]="/_site/product/sugar.asp";
	 twoDepth[2]="/_site/product/food.asp";
	 twoDepth[3]="/_site/product/set.asp";
	 twoDepth[4]="/_site/product/metal.asp";
	 twoDepth[5]="/_site/product/feed.asp";
	 twoDepth[6]="/_site/product/agro.asp";
	 twoDepth[7]="/_site/product/bio.asp";
	 twoDepth[8]="/_site/product/buy_agree.asp?redir=buy";
location.href = twoDepth[Depth2];

//»çÀÌ¹öIR
 }else if((Depth1=="3")&&(Depth3==undefined)){
	 twoDepth[1]="/_site/ir/news_list.asp";
	 twoDepth[2]="/_site/ir/finance.asp";
	 twoDepth[3]="/_site/ir/investor.asp";
	 twoDepth[4]="/_site/ir/stock.asp";
	 twoDepth[5]="/_site/product/buy_agree.asp?redir=custom";
	 twoDepth[6]="/_site/ir/ir.asp";
	 twoDepth[7]="/_site/ir/ts_rule.asp";
location.href = twoDepth[Depth2];

//PR¼¾ÅÍ
 }else if((Depth1=="4")&&(Depth3==undefined)){
	 twoDepth[1]="/_site/pr/news_list.asp";
	 twoDepth[2]="/_site/pr/ad_list.asp";
location.href = twoDepth[Depth2];

//ÀÎÁ¦Ã¤¿ë
 }else if((Depth1=="5")&&(Depth3==undefined)){
	 twoDepth[1]="/_site/recruit/recruit.asp";
	 twoDepth[2]="/_site/recruit/work.asp";
	 twoDepth[3]="/_site/recruit/news_list.asp";
	 twoDepth[4]="/_site/recruit/apply.asp";
	 twoDepth[5]="/_site/recruit/successful.asp";
	 twoDepth[6]="/_site/recruit/faq.asp";
location.href = twoDepth[Depth2];

//°í°´¸¸Á·
 }else if((Depth1=="6")&&(Depth3==undefined)){
	 twoDepth[1]="/_site/customer/event.asp";
	 twoDepth[2]="/_site/customer/faq.asp?Cate=1";
	 twoDepth[3]="/_site/customer/customer_agree.asp?redir=custom";
	 twoDepth[4]="/_site/customer/customer_agree.asp?redir=data";
	 twoDepth[5]="/_site/customer/sugar.asp";
	 twoDepth[6]="/_site/customer/life.asp";
	 twoDepth[7]="/_site/customer/contactus.asp";
	 twoDepth[8]="/_site/customer/map.asp";
location.href = twoDepth[Depth2];

//ETC
 }else if(Depth1=="7"){
	 twoDepth[1]="/_site/customer/webzine.asp";
	 twoDepth[2]="/_site/customer/sitemap.asp";
	 twoDepth[3]="/_site/customer/site.asp";
location.href = twoDepth[Depth2];
 }


  /************** 3 depth ***************/

  //TS´ëÇÑÁ¦´ç
 if((Depth1=="1") && (Depth2=="2")&&(Depth3!=undefined)){
	 threeDepth[1]="/_site/ts/vision.asp";
	 threeDepth[2]="/_site/ts/history.asp";
	 location.href = threeDepth[Depth3];


 }else if((Depth1=="1") && (Depth2=="3")&&(Depth3!=undefined)){
	 threeDepth[1]="/_site/ts/abroad.asp";
     threeDepth[2]="/_site/ts/sugar.asp";
	 threeDepth[3]="/_site/ts/feed.asp";
     threeDepth[4]="/_site/ts/stock.asp";
	 threeDepth[5]="/_site/ts/bio.asp";
	 location.href = threeDepth[Depth3];


 }else if((Depth1=="1") && (Depth2=="5")&&(Depth3!=undefined)){
	 threeDepth[1]="/_site/ts/store_kor.asp";
	 threeDepth[2]="/_site/ts/store_eng.asp";
	 location.href = threeDepth[Depth3];


 }else if((Depth1=="1") && (Depth2=="7")&&(Depth3!=undefined)){
	 threeDepth[1]="/_site/ts/corporate.asp";
	 threeDepth[2]="/_site/ts/foodream.asp";
	 location.href = threeDepth[Depth3];
 }


 //Á¦Ç°&ºê·£µå
 if((Depth1=="2") && (Depth2=="2")&&(Depth3!=undefined)){
	 threeDepth[1]="/_site/product/food.asp";
	 threeDepth[2]="/_site/product/cona.asp";
	 threeDepth[3]="/_site/product/sampo.asp";
	 threeDepth[4]="/_site/product/resources.asp";
	 threeDepth[5]="/_site/product/can.asp";
	 threeDepth[6]="/_site/product/confec.asp";
	 threeDepth[7]="/_site/product/add.asp";
	 threeDepth[8]="/_site/product/marine.asp";
	 location.href = threeDepth[Depth3];

 }else if((Depth1=="2") && (Depth2=="5")&&(Depth3!=undefined)){
	 threeDepth[1]="/_site/product/feed.asp";
     threeDepth[2]="/_site/product/cow.asp";
	 threeDepth[3]="/_site/product/chi.asp";
	 threeDepth[4]="/_site/product/circulation.asp";
	 location.href = threeDepth[Depth3];
 }
}

  /**************  ¸ÞÀÎº£³Ê ***************/

  function MainBanner(Bnum){
	  var BannerName=new Array();
	  BannerName[1]="javascript:void(window.open('/_site/customer/history.asp','new_win2','resizable=no,width=800,height=480,scrollbars=no'))";
	  BannerName[2]="/_site/customer/webzine.asp";
	  BannerName[3]="javascript:void(window.open('/webzine/0807/ebrochure/VIEW.HTM','new_win','resizable=no,width=1000,height=700,scrollbars=no'))";
	  BannerName[4]="/_site/pr/ad_list.asp?BDCode=2";
	  BannerName[5]="/_site/customer/sugar.asp";
	  BannerName[6]="/_site/customer/life.asp";
location.href = BannerName[Bnum];
  }

  function CustomerBanner(Bnum){
w = window.open('/_site/customer/postscript.asp','','toolbar=no,menubar=no,location=no,directions=no, scrollbars=no,status=no,width=680,height=690,left=40,top=40'); 
w.focus();
  }

    /**************  ¸ÞÀÎ»ó´Ü ***************/

  function MainTop(Tnum){
	  var TopName=new Array();
	  TopName[1]="/_site/index.asp";
	  TopName[2]="/_site/customer/sitemap.asp";
	  TopName[3]="http://www.ts.co.kr/newhomepage/eng/com/com01.asp";
	  if(Tnum=="3"){
w=window.open(TopName[Tnum]);
w.focus();
	  }else{
location.href = TopName[Tnum];
	  }
  }
      /**************  ÇÏ´Ü¸µÅ© ***************/
	    function BtmLink(num){
	  var BtmName=new Array();
	  BtmName[1]="javascript:void(window.open('ts/pop_ts.asp','new_win3','resizable=no,width=720,height=530,scrollbars=no'))";
	  BtmName[2]="customer/site.asp";
	  BtmName[3]="javascript:void(window.open('/_site/customer/email.asp','','resizable=no,width=400,height=221,scrollbars=no'))";
	  BtmName[4]="javascript:void(window.open('/_site/customer/pop_pur.asp','','resizable=no,width=740,height=500,scrollbars=yes'))";
location.href = BtmName[num];
  }


  function NewYearLink(num){	
           var oneDepth = new Array();       
           var win = new Array();		 
           oneDepth[0]="/_site/ts/newgreeting01.asp";
           oneDepth[1]="/_site/ts/newgreeting02.asp";
           win=["self","self"];

           if(win[num]=="self"){
                     location.href = oneDepth[num];
           }else if(win[num]=="blk"){
                     window.open(oneDepth[num]);
           }else if(win[num][1]=="blk"){
                      window.open(oneDepth[num]);
           }
}



function PopOpen(PathNum, widthNum, heightNum){
w = window.open(PathNum,'','toolbar=no,menubar=no,location=no,directions=no, scrollbars=no,status=no,width='+widthNum+',height='+heightNum+',left=10,top=10'); 
w.focus();
}