function go_site(code) {
	if ( !code )						{	window.location = "/";	}
	else if ( code == "main" )			{	window.location = "../main/main.html";		}	
	
	//1. È¸»ç¼Ò°³
	else if ( code == "sub1_1" )		{	window.location = "../company/company_01.html"; }  //1_1.È¸»ç°³¿ä
	else if ( code == "sub1_2" )		{	window.location = "../company/company_02.html"; }  //1_2.CEOÀÎ»ç¸»
	else if ( code == "sub1_3" )		{	window.location = "../company/company_03.html"; }  //1_3.Á¶Á÷µµ
	else if ( code == "sub1_3_2" )		{	window.location = "../company/company_03_02.html"; }  //1_3_2.¿¬Çõ
	else if ( code == "sub1_4" )		{	window.location = "../company/company_04.html"; }  //1_4.CI¼Ò°³
    else if ( code == "sub1_5" )		{	window.location = "../company/company_05.html"; }  //1_5.ÀÚÈ¸»ç¼Ò°³  
	else if ( code == "sub1_5_2" )		{	window.location = "../company/company_05_02.html"; }  //1_5_2.ÀÚÈ¸»ç¼Ò°³  
	else if ( code == "sub1_6" )		{	window.location = "../company/company_06.html"; }  //1_6.¿À½Ã´Â±æ
	else if ( code == "sub1_6_2" )		{	window.location = "../company/company_06_02.html"; }  //1_6.¿À½Ã´Â±æ

	//2 .Á¦Ç°¼Ò°³
	else if ( code == "sub2_1" )		{	window.location = "../product/product_01.html"; }  //2-1. ¹Ùµð
	else if ( code == "sub2_2" )		{	window.location = "../product/product_02.html"; }  //2-2. »þ½Ã
	else if ( code == "sub2_3" )		{	window.location = "../product/product_03.html"; }  //2-3. ÆÄ¿öÆ®·¹ÀÎ
    else if ( code == "sub2_4" )		{	window.location = "../product/product_04.html"; }  //2-4. ´ë¹°¹Ùµð
	else if ( code == "sub2_5" )		{	window.location = "../product/product_05.html"; }  //2-5. ¼Ò¹°¹Ùµð
	else if ( code == "sub2_6" )		{	window.location = "../product/product_06.html"; }  //2-6. »þ½Ã



	//3.¿¬±¸°³¹ß
	else if ( code == "sub3_1" )		{	window.location = "../study/study_01.html"; }  //3_1.¿¬±¸¼Ò¼Ò°³
	else if ( code == "sub3_2" )		{	window.location = "../study/study_02.html"; }  //3_2.»çÀÌ¹ö°øÁ¤



	
	//4. °í°´¼¾ÅÍ
	else if ( code == "sub4_1" )		{	window.location = "../customer/customer_01.html"; }  //4-1. ´º½º&ÇÁ·¹½º
	else if ( code == "sub4_2" )		{	window.location = "../customer/customer_02.html"; }  //4-2. °í°´»ó´ã½Ç
	else if ( code == "sub4_3" )		{	window.location = "../customer/customer_03.html"; }  //4-3. È«º¸ÀÚ·á½Ç			
	else if ( code == "sub4_4" )		{	window.location = "../customer/customer_04.html"; }  //4-4. È«º¸µ¿¿µ»ó


	 //5. IR
	else if ( code == "sub5_1" )		{	window.location = "../ir/ir_01.html"; }  //5-1. ½Ç½Ã°£ ÁÖ°¡
	else if ( code == "sub5_2" )		{	window.location = "../ir/ir_02.html"; }  //5-2. ÁÖ°¡ÃßÀÌÂ÷Æ®
	else if ( code == "sub5_3" )		{	window.location = "../ir/ir_03.html"; }  //5-3. °ø½Ã
	else if ( code == "sub5_4" )		{	window.location = "../ir/ir_04.html"; }  //5-4. È¯À²


	 //6. ÇÏ´Ü¸Þ´º
	else if ( code == "sub6_1" )		{	window.open('http://mail.guyoungtech.com','_blank'); }  //6-1. ect
	else if ( code == "sub6_2" )		{	window.location = "../ect/ect_02.html"; }  //6-2.ect
	else if ( code == "sub6_3" )		{	window.location = "../ect/ect_03.html"; }  //6-3. ect
	else if ( code == "sub6_4" )		{	window.location = "../ect/ect_04.html"; }  //6-4. ect

	//7. »çÀÌÆ®¸Ê
	else if ( code == "sub7_1" )		{	window.location = "../sitemap/sitemap.html"; }  //7-1. »çÀÌÆ®¸Ê


//È¸»ç°³¿ä_»çÁøº¸±â


	else if ( code == "map1" )		{	window.open("../company/map1.html", "", "width=500,height=333,scrollbars=0") }  // map1
	else if ( code == "map2" )		{	window.open("../company/map2.html", "", "width=500,height=400,scrollbars=0") }  // map2
	else if ( code == "map3" )		{	window.open("../company/map3.html", "", "width=500,height=400,scrollbars=0") }  // map3
	else if ( code == "map4" )		{	window.open("../company/map4.html", "", "width=500,height=400,scrollbars=0") }  // map4


}

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v4.0
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && document.getElementById) x=document.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
function open_win(val, wname, wopt, menu) {
	var newopt = "", wHeight = 0, wWidth = 0;
	if (wopt != undefined) {
		var woptlist = wopt.replace(/ /g, "").split(",");
		for (var i in woptlist) {
			if (woptlist[i].match(/^height=/i)) {
				wHeight = parseInt(woptlist[i].substr(7),10);
				if (!isNaN(wHeight)) newopt += "top=" + Math.floor((screen.availHeight - wHeight) / 2) + ",";
			}
			if (woptlist[i].match(/^width=/i)) {
				wWidth = parseInt(woptlist[i].substr(6),10);
				if (!isNaN(wWidth)) newopt += "left=" + Math.floor((screen.availWidth - wWidth) / 2) + ",";
			}
		}
	}

	url = val + "?" + menu;
	window.open(url, wname, newopt + wopt); 
} 

// ·¹ÀÌ¾î ½ºÅ©·Ñ µÇ´Â ¼Ò½º
var bNetscape4plus = (navigator.appName == "Netscape" && navigator.appVersion.substring(0,1) >= "4");
var bExplorer4plus = (navigator.appName == "Microsoft Internet Explorer" && navigator.appVersion.substring(0,1) >= "4");
function CheckUIElements(){
        var yMenuFrom, yMenuTo, yButtonFrom, yButtonTo, yOffset, timeoutNextCheck;

        if ( bNetscape4plus ) { 
                yMenuFrom   = document["divMenu"].top;
                yMenuTo     = top.pageYOffset + 62;
        }
        else if ( bExplorer4plus ) {
                yMenuFrom   = parseInt (divMenu.style.top, 10);
				//·¹ÀÌ¾îÀÇ top°ªÀº ÆäÀÌÁö ¿­¾úÀ»¶§ ½½¶óÀÌµù ½ÃÀÛÁ¡ÀÌ°í ¿©±â ¿·¿¡ ¼ýÀÚ´Â ÃÖÁ¾ÀûÀ¸·Î Å¾À¸·ÎºÎÅÍ µµÂøÇÏ´Â °÷
				yMenuTo     = document.body.scrollTop + 256;
        }

        timeoutNextCheck = 0;

        if ( Math.abs (yButtonFrom - (yMenuTo + 152)) < 6 && yButtonTo < yButtonFrom ) {
                setTimeout ("CheckUIElements()", timeoutNextCheck);
                return;
        }

        if ( yButtonFrom != yButtonTo ) {
                yOffset = Math.ceil( Math.abs( yButtonTo - yButtonFrom ) / 10 );
                if ( yButtonTo < yButtonFrom )
                        yOffset = -yOffset;

                if ( bNetscape4plus )
                        document["divLinkButton"].top += yOffset;
                else if ( bExplorer4plus )
                        divLinkButton.style.top = parseInt (divLinkButton.style.top, 10) + yOffset;

                timeoutNextCheck = 10;
        }
        if ( yMenuFrom != yMenuTo ) {
                yOffset = Math.ceil( Math.abs( yMenuTo - yMenuFrom ) / 20 );
                if ( yMenuTo < yMenuFrom )
                        yOffset = -yOffset;

                if ( bNetscape4plus )
                        document["divMenu"].top += yOffset;
                else if ( bExplorer4plus )
                        divMenu.style.top = parseInt (divMenu.style.top, 10) + yOffset;

                timeoutNextCheck = 10;
        }

        setTimeout ("CheckUIElements()", timeoutNextCheck);
}

function OnLoad()
{
        var y;
        if ( top.frames.length )
        if ( bNetscape4plus ) {
                document["divMenu"].top = top.pageYOffset + 50;//À¥¿¡ ¶ç¿üÀ»¶§ ½ÃÀÛÁ¡
                document["divMenu"].visibility = "visible";
        }
        else if ( bExplorer4plus ) {
                divMenu.style.top = document.body.scrollTop + 250;//À¥¿¡ ¶ç¿üÀ»¶§ ½ÃÀÛÁ¡
                divMenu.style.visibility = "visible";
        }
        CheckUIElements();
        return true;
}

