// JavaScript Document

// GNB »ó´Ü ¸Þ´º
var Topnavtimer = '';

function fnMinwonTopMenu() {

	this.MDepth1 = new Array();
	this.MDepth2 = new Array();
	this.MDepth3 = new Array();
	this.menuseq = 0;
	this.CurrentOn = null;

	this.Start = function() {
		this.M1Box = document.getElementById(this.DivName).getElementsByTagName("ul")[0].childNodes;

		// ÇöÀç¸Þ´º Ã¼Å©
		this.CurrentM = this.DefaultMenu.split("-");

		// ¸Þ´ºÀÇ °¹¼ö¸¦ ÆÄ¾ÇÇÏ´Â ºÎºÐ
		this.M1Len = this.M1Box.length;

		// ¸Þ´ºÀÇ 1µª½º ¸µÅ©ºÎºÐ¿¡ ¸¶¿ì½º³ª Å°º¸µåÀÇ ¹ÝÀÀÀ» ³Ö´Â ºÎºÐ
		for ( var i=0; i<this.M1Len; i++ ) {
			if ( this.M1Box.item(i).tagName != "LI" ) { continue; }

			if ( this.DivName + "_" + Number(this.CurrentM[0]) == this.M1Box.item(i).className ) { 	this.CurrentOn = i }

			this.MDepth1[i] = this.M1Box.item(i)
			this.M1Link = this.M1Box.item(i).getElementsByTagName("a")[0];
			this.M1Link.i = i;
			this.M1Link.fnName = this.fnName;
			this.M1Link.onmouseover = this.M1Link.onfocus = function()	{ eval(this.fnName +".fnM1Over(" + this.i + ")"); clearTimeout(Topnavtimer); }
			this.M1Link.onmouseout = this.M1Link.onblur = function()	{ eval("Topnavtimer = setTimeout('" + this.fnName +".moreMenuClose()', 1500 )"); }

			if ( this.CurrentOn == i ) {
				this.MenuLinkPic = this.M1Link;
				this.MenuLinkPic.className = this.MenuLinkPic.className.replace("_off", "_curr");;
			}

			this.M2BoxTemp = this.M1Box.item(i).getElementsByTagName("ul")[0];

			if ( this.M2BoxTemp != undefined ) {
				this.M2Box = this.M2BoxTemp.childNodes;
				this.M2Len = this.M2Box.length;

				this.MDepth2[i] = new Array();
				// ¸Þ´ºÀÇ 2µª½º ¸µÅ©ºÎºÐ¿¡ ¸¶¿ì½º³ª Å°º¸µåÀÇ ¹ÝÀÀÀ» ³Ö´Â ºÎºÐ
				for ( var j=0; j<this.M2Len; j++ ) {
					if ( this.M2Box.item(j).tagName != "LI" ) { continue; }

					this.MDepth2[i][j] = this.M2Box.item(j);

					this.M2Link = this.M2Box.item(j).getElementsByTagName("a")[0];
					this.M2Link.i = i;
					this.M2Link.j = j;
					this.M2Link.fnName = this.fnName;
					this.M2Link.onmouseover = this.M2Link.onfocus = function()		{ eval(this.fnName +".fnM2Over(" + this.i + "," + this.j + ")"); clearTimeout(Topnavtimer); }
					this.M2Link.onmouseout = this.M2Link.onblur = function()			{
						eval(this.fnName +".fnM2Out(" + this.i + "," + this.j + ")");
						eval("Topnavtimer = setTimeout('" + this.fnName +".moreMenuClose()', 1500 )");
					}

					this.M3BoxTemp = this.M2Box.item(j).getElementsByTagName("ul")[0];

					if ( this.M3BoxTemp != undefined ) {
						this.M3Box = this.M3BoxTemp.childNodes;
						this.M3Len = this.M3Box.length;

						this.MDepth3[i] = new Array();
						this.MDepth3[i][j] = new Array();
						// ¸Þ´ºÀÇ 3µª½º ¸µÅ©ºÎºÐ¿¡ ¸¶¿ì½º³ª Å°º¸µåÀÇ ¹ÝÀÀÀ» ³Ö´Â ºÎºÐ
						for ( var k=0; k<this.M3Len; k++ ) {
							if ( this.M3Box.item(k).tagName != "LI" ) { continue; }

							this.MDepth3[i][j][k] = this.M3Box.item(k);

							this.M3Link = this.M3Box.item(k).getElementsByTagName("a")[0];
							this.M3Link.i = i;
							this.M3Link.j = j;
							this.M3Link.k = k;
							this.M3Link.fnName = this.fnName;
							this.M3Link.onmouseover = this.M3Link.onfocus = function() {
								eval(this.fnName +".fnM3Over(" + this.i + "," + this.j + "," + this.k + ")"); clearTimeout(Topnavtimer);
							}
							this.M3Link.onmouseout = this.M3Link.onblur = function()			{
								eval(this.fnName +".fnM3Out(" + this.i + "," + this.j + "," + this.k + ")");
								eval("Topnavtimer = setTimeout('" + this.fnName +".moreMenuClose()', 1500 )");
							}
						}
					}
				}
			}
		}
	}

	// ¸Þ´ºÀÇ 1µª½º ¸µÅ©ºÎºÐ¿¡ ¸¶¿ì½º³ª Å°º¸µåÀÇ ¹ÝÀÀ¿¡ ÀÇÇØ ½ÇÇàÇÏ´Â ºÎºÐ
	this.fnM1Over = function(val) {
		for ( var i=0; i<this.MDepth1.length; i++ ) {
			if ( this.M1Box.item(i).tagName != "LI" ) { continue; }

			this.MS1Link = this.M1Box.item(i).getElementsByTagName("a")[0];
			this.MS1Div = this.M1Box.item(i).getElementsByTagName("div")[0];
			this.MS2Ul = this.M1Box.item(i).getElementsByTagName("ul")[0];
			if ( i == val ) {
				if ( this.CurrentOn == i ) {
					this.MS1Link.className = this.MS1Link.className.replace("_curr", "_on");
				} else {
					this.MS1Link.className = this.MS1Link.className.replace("_off", "_on");
				}
				if ( this.MS2Ul != undefined ) {
					this.MS2Ul.style.display = "block";

					/* IE6 Select ¿À·ù ÇØ°á Js */
					if ( navigator.appName.indexOf("Explorer") != -1 && navigator.appVersion.indexOf("MSIE 6.0") != -1 ) {
						if ( this.M1Box.item(i).getElementsByTagName("iframe")[0] == undefined ) {
							this.TempIframe = document.createElement('iframe');
							this.TempIframe.style.position = "absolute";
							this.TempIframe.style.zIndex = "1";
							this.TempIframe.style.width = this.MS1Div.offsetWidth + "px";
							this.TempIframe.style.height = this.MS1Div.offsetHeight + "px";
							this.TempIframe.style.border = 0;
							this.TempIframe.style.left = getStyle(this.MS1Div,"left","left");
							this.TempIframe.style.top = getStyle(this.MS1Div,"top","top");
							this.TempIframe.style.filter = "alpha(opacity=0)";
							this.TempIframe.title = "ºóÇÁ·¹ÀÓ";
							this.M1Box.item(i).appendChild(this.TempIframe);

						}
					}
				}
			} else {
				if ( this.CurrentOn == i ) {
					this.MS1Link.className = this.MS1Link.className.replace("_on", "_curr");
				} else {
					this.MS1Link.className = this.MS1Link.className.replace("_on", "_off");
				}
				if ( this.MS2Ul != undefined ) {
					this.MS2Ul.style.display = "none";
				}
				if ( navigator.appName.indexOf("Explorer") != -1 && navigator.appVersion.indexOf("MSIE 6.0") != -1 ) {
					if ( this.M1Box.item(i).getElementsByTagName("iframe")[0] != undefined ) {
						this.M1Box.item(i).removeChild(this.M1Box.item(i).getElementsByTagName("iframe")[0]);
					}
				}
			}
		}
	}

	// ¸Þ´ºÀÇ 2µª½º ¸µÅ©ºÎºÐ¿¡ ¸¶¿ì½º³ª Å°º¸µåÀÇ ¹ÝÀÀ¿¡ ÀÇÇØ ½ÇÇàÇÏ´Â ºÎºÐ
	this.fnM2Over = function(inum,jnum) {
		this.MDepth2[inum][jnum].getElementsByTagName("a")[0].className = this.MDepth2[inum][jnum].getElementsByTagName("a")[0].className.replace("_off", "_on")
	}

	// ¸Þ´ºÀÇ 2µª½º ¸µÅ©ºÎºÐ¿¡ ¸¶¿ì½º³ª Å°º¸µåÀÇ ¹ÝÀÀ¿¡ ÀÇÇØ ½ÇÇàÇÏ´Â ºÎºÐ
	this.fnM2Out = function(inum,jnum) {
		this.MDepth2[inum][jnum].getElementsByTagName("a")[0].className = this.MDepth2[inum][jnum].getElementsByTagName("a")[0].className.replace("_on", "_off")
	}

	// ¸Þ´ºÀÇ 3µª½º ¸µÅ©ºÎºÐ¿¡ ¸¶¿ì½º³ª Å°º¸µåÀÇ ¹ÝÀÀ¿¡ ÀÇÇØ ½ÇÇàÇÏ´Â ºÎºÐ
	this.fnM3Over = function(inum,jnum,knum) {
		this.MDepth2[inum][jnum].getElementsByTagName("a")[0].className = this.MDepth2[inum][jnum].getElementsByTagName("a")[0].className.replace("_off", "_on")
		this.MDepth3[inum][jnum][knum].getElementsByTagName("a")[0].className = this.MDepth3[inum][jnum][knum].getElementsByTagName("a")[0].className.replace("_off", "_on")
	}

	// ¸Þ´ºÀÇ 2µª½º ¸µÅ©ºÎºÐ¿¡ ¸¶¿ì½º³ª Å°º¸µåÀÇ ¹ÝÀÀ¿¡ ÀÇÇØ ½ÇÇàÇÏ´Â ºÎºÐ
	this.fnM3Out = function(inum,jnum,knum) {
		this.MDepth2[inum][jnum].getElementsByTagName("a")[0].className = this.MDepth2[inum][jnum].getElementsByTagName("a")[0].className.replace("_on", "_off")
		this.MDepth3[inum][jnum][knum].getElementsByTagName("a")[0].className = this.MDepth3[inum][jnum][knum].getElementsByTagName("a")[0].className.replace("_on", "_off")
	}

	// ¸Þ´º ´Ý±â
	this.moreMenuClose = function() {
		for ( var i=0; i<this.M1Len; i++ ) {
			if ( this.M1Box.item(i).tagName != "LI" ) { continue; }

			this.MS1Link = this.M1Box.item(i).getElementsByTagName("a")[0];
			this.MS2Ul = this.M1Box.item(i).getElementsByTagName("ul")[0];

			if ( this.CurrentOn == i ) {
				this.MS1Link.className = this.MS1Link.className.replace("_off", "_curr");
				this.MS1Link.className = this.MS1Link.className.replace("_on", "_curr");
			} else {
				this.MS1Link.className = this.MS1Link.className.replace("_on", "_off");
			}
			if ( this.MS2Ul != undefined ) {
				this.MS2Ul.style.display = "none";
			}
		}
	}

}



//»õÃ¢¶ç¿ì±â
function na_open_window(name, url, left, top, width, height, toolbar, menubar, statusbar, scrollbar, resizable)
{
  toolbar_str = toolbar ? 'yes' : 'no';
  menubar_str = menubar ? 'yes' : 'no';
  statusbar_str = statusbar ? 'yes' : 'no';
  scrollbar_str = scrollbar ? 'yes' : 'no';
  resizable_str = resizable ? 'yes' : 'no';

  cookie_str = document.cookie;
  cookie_str.toString();

  pos_start  = cookie_str.indexOf(name);
  pos_start  = cookie_str.indexOf('=', pos_start);
  pos_end    = cookie_str.indexOf(';', pos_start);

  if (pos_end <= 0) pos_end = cookie_str.length;
  cookie_val = cookie_str.substring(pos_start + 1, pos_end);

  if (cookie_val  == "done")
    return;

  window.open(url, name, 'left='+left+',top='+top+',width='+width+',height='+height+',toolbar='+toolbar_str+',menubar='+menubar_str+',status='+statusbar_str+',scrollbars='+scrollbar_str+',resizable='+resizable_str);
}

//¼­ºê ¸ÞÀÎ ·Ñ¸µ ÇÃ·¡½Ã(3°³)¿¡ ÀÌ¿ëµÇ´Â ÇÔ¼ö ½ÃÀÛ
function ObjectInit(AMovie, AWMode, AWidth, AHeight) {
 document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="' + AWidth + '" height="' + AHeight + '">');
 document.write('<param name="movie" value="' + AMovie + '">');
 document.write('<param name="wmode" value="' + AWMode + '">');
 document.write('<embed src="' + AMovie + '" quality="high" wmode="'+AWMode+'" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="' + AWidth + '" height="' + AHeight + '"></embed>');
 document.write('</object>');
}


function subimg10() {
	window.location.href="http://www.koreaidc.com/05_solution/solution_distant.html"
}
function subimg11() {
	window.location.href="http://www.koreaidc.com/05_solution/solution_admin.html"
}
function subimg12() {
	window.location.href="http://www.koreaidc.com/04_alone/index.html"
}


function subimg20() {
	window.location.href="http://www.koreaidc.com/17_security/solution_prevention.html"
}
function subimg21() {
	window.location.href="http://www.koreaidc.com/17_security/solution_firewall.html"
}
function subimg22() {
	window.location.href="http://www.koreaidc.com/17_security/s_virus.html"
}
function subimg23() {
	window.location.href="http://www.koreaidc.com/17_security/solution_ssl.html"
}



function subimg30() {
	window.location.href="http://www.koreaidc.com/05_solution/solution_backup00.html"
}
function subimg31() {
	window.location.href="http://www.koreaidc.com/05_solution/solution_dbhosting.html"
}
function subimg32() {
	window.location.href="http://www.koreaidc.com/05_solution/solution_short.html"
}
//¼­ºê ¸ÞÀÎ ·Ñ¸µ ÇÃ·¡½Ã(3°³)¿¡ ÀÌ¿ëµÇ´Â ÇÔ¼ö ³¡




//¸ÞÀÎ¸Þ´º ¸µÅ© ½ÃÀÛ

function mainmenu0() {
	window.location.href="http://www.koreaidc.com/02_server/server_type.html"
}
function mainmenu1() {
	window.location.href="http://www.koreaidc.com/13_special/vhosting_type_cloud01.html"
}
function mainmenu2() {
	window.location.href="http://www.koreaidc.com/03_colo/index.html"
}
function mainmenu3() {
	window.location.href="http://www.koreaidc.com/04_management/index.html"
}
function mainmenu4() {
	window.location.href="http://www.koreaidc.com/05_solution/index.html"
}
function mainmenu5() {
	window.location.href="http://www.koreaidc.com/06_cs/index.html"
}
function mainmenu6() {
	window.location.href="http://www.koreaidc.com/12_monitor/index.html"
}
function mainmenu7() {
	window.location.href="http://www.koreaidc.com/14_ddos/index.html"
}
function mainmenu8() {
	window.location.href="http://www.koreaidc.com/15_imghosting/index.html"
}

function home() {
	window.location.href="http://www.koreaidc.com"
}
function add() {
	window.external.AddFavorite('http://www.koreaidc.com', '¢Æ¢Æ´ëÇÑ¹Î±¹ ´ëÇ¥ IDC "KOREA IDC" ¼­¹öÈ£½ºÆÃ, ÄÚ·ÎÄÉÀÌ¼Ç, ¸Å´ÏÁöµåÈ£½ºÆÃ, IDC, µµ¸ÞÀÎ, À¥È£½ºÆÃ¢Æ¢Æ')
}
function nayana() {
	window.location.href="http://www.nayana.com"
}
function hosting() {
	window.location.href="http://www.nayana.com/hosting/"
}
function domain() {
	window.location.href="http://www.nayana.com/domain/"
}
function agency() {
	window.location.href="http://www.nayana.com/agency/"
}
function sitemap() {
	window.location.href="http://www.koreaidc.com/08_sitemap/index.html"
}
function myidc() {
	window.location.href="http://www.koreaidc.com/07_my/index.html"
}
function contactus() {
	window.location.href="mailto:server@koreaidc.com"
}

//¸ÞÀÎ¸Þ´º ¸µÅ© ³¡


//¸ÞÀÎ Áß¾ÓÀÌº¥Æ®¿µ¿ª ¸µÅ© ½ÃÀÛ

function mainevent1() {
	window.location.href="http://www.koreaidc.com/02_server/server_type_step02.html?idx=119"
}
function mainevent2() {
	window.location.href="http://www.koreaidc.com/02_server/server_type_step02.html?idx=129"
}
function mainevent3() {
	window.location.href="http://www.koreaidc.com/02_server/server_type_step02.html?idx=104"
}

//¸ÞÀÎ Áß¾ÓÀÌº¥Æ®¿µ¿ª ¸µÅ© ³¡


//¸ÞÀÎ Áß¾ÓÀÌº¥Æ®¿µ¿ª ¸µÅ© ½ÃÀÛ

function main_flash_banner1() {
	window.location.href="http://www.koreaidc.com/02_server/server_type_step02.html?idx=147"
}
function main_flash_banner2() {
	window.location.href="http://www.koreaidc.com/02_server/server_type_step02.html?idx=150"
}
function main_flash_banner3() {
	window.location.href="http://www.koreaidc.com/02_server/server_type_step02.html?idx=104"
}

//¸ÞÀÎ ÃßÃµ»óÇ° ¸µÅ©½ÃÀÛ

function mainserver0() {
	window.location.href="http://www.koreaidc.com/02_server/server_type_step02.html?idx=158"
}
function mainserver1() {
	window.location.href="http://www.koreaidc.com/02_server/server_type_step02.html?idx=168"
}
function mainserver2() {
	window.location.href="http://www.koreaidc.com/02_server/server_type_step02.html?idx=151"
}
function mainserver3() {
	window.location.href="http://www.koreaidc.com/02_server/server_type_step02.html?idx=142"
}
function mainserver4() {
	window.location.href="http://www.koreaidc.com/02_server/server_type_step02.html?idx=140"
}

//¸ÞÀÎ ÃßÃµ»óÇ° ¸µÅ©½ÃÀÛ

// -->




