/*Image Rollover Function by DreamWeaver Maked*/
function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);

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_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_findObj(n, d) { //v4.01
  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 && d.getElementById) x=d.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 MM_showHideLayers() { //v6.0
  var i,p,v,obj,args=MM_showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v=='hide')?'hidden':v; }
    obj.visibility=v; }
}

/*FAQ ÀÚ¹Ù½ºÅ©¸³Æ® ½ÃÀÛ*/
var clickvalue='';
function qclick(idnum){

	answer=eval("answerid"+idnum+".style");

	if(clickvalue!=answer)
	{
		if(clickvalue!='')
		{
			clickvalue.display='none';
		}
		answer.display='block';
		clickvalue=answer;
	}
	else
	{
		answer.display='none';
		clickvalue='';
	}
}

/*FAQ ÀÚ¹Ù½ºÅ©¸³Æ® ³¡*/

/*Toop Navigation Script*/
topmenuclick = 1;
function setTopmenu(num,code){
	if(num < 5){
		try{ 
		if(topmenuclick==1) var preimg="whc0100";
		if(topmenuclick==2) var preimg="whc0200";
		if(topmenuclick==3) var preimg="whc0300";
		if(topmenuclick==4) var preimg="whc0400";
		//alert(topmenuclick);
		var imgdir = "http://www.whimori.com/at_whc/whc_images/img_whcmenu/";
		eval("document.getElementById('divtop"+topmenuclick+"').style.display = 'none'");
		eval("document.getElementById('imgtop"+topmenuclick+"').src = '"+imgdir+"ctit_off_"+preimg+".gif'");
		eval("document.getElementById('divtop"+num+"').style.display = ''");
		eval("document.getElementById('imgtop"+num+"').src = '"+imgdir+"ctit_on_"+code+".gif'");
		topmenuclick = num;
		
		}catch(e){
			return;
		}
	}else{
		return;
	}
}

/*±âº» ·Ñ¿À¹ö½ºÅ©¸³Æ® ½ÃÀÛ*/
function imgrollover(img,overname){
	img.src = overname;	
}
function imgrollout(img,outname){
	img.src = outname;
}
/*±âº» ·Ñ¿À¹ö½ºÅ©¸³Æ® ³¡*/

/*window popup*/
function popupwin(url, name, opt){
	if(url != ""){
		window.open(url,name,opt);
	}
	return;
}
/*FAQ ÀÚ¹Ù½ºÅ©¸³Æ® ½ÃÀÛ*/
var clickvalue='';
function qclick(idnum){

	answer=eval("answerid"+idnum+".style");

	if(clickvalue!=answer)
	{
		if(clickvalue!='')
		{
			clickvalue.display='none';
		}
		answer.display='block';
		clickvalue=answer;
	}
	else
	{
		answer.display='none';
		clickvalue='';
	}
}

/*FAQ ÀÚ¹Ù½ºÅ©¸³Æ® ³¡*/

/*Attach File Download Script*/
function linkCheck(link){
var dir = link.substring(0,link.lastIndexOf('/')+1);
var url = link.substring(dir.length,link.length+1);
document.write("" + url + "");
}

/*¸Þ´º·Ñ¿À¹ö*/

nowrollNum = 0; //ÇöÀç ÆäÀÌÁö ¸Þ´º

function rollMenu(num, chimg){
	try{
		if(nowrollNum != num){
			eval("document.getElementById('rollimg"+num+"').src = '"+chimg+"'");
		}
	}catch(e){
		return;
	}
}

function setMenu(num, chimg){
	try{
		eval("document.getElementById('rollimg"+num+"').src = '"+chimg+"'");
		nowrollNum = num;
	}catch(e){
		return;
	}
}


/*ÇÃ·¡½Ã ¸µÅ© & ¼­ºê Å¾¸Þ´º ¸µÅ©*/
function GoUrl(num){
	switch(num){
		/*HOME*/
		case 0 :
			location.href = "http://www.whimori.com/at_whc/whc0100/whc0101/whc0101.html";
			break;

		/*ÈÖ¸ð¸®¼Ò°³*/
		case "0100" :
			location.href = "http://www.whimori.com/at_whc/whc0100/whc0101/whc0101.html";
			break;
		case "0101" :
			location.href = "http://www.whimori.com/at_whc/whc0100/whc0101/whc0101.html";
			break;
		case "0102" :
			location.href = "http://www.whimori.com/at_whc/whc0100/whc0102/whc0102.html";
			break;
		case "0103" :
			location.href = "http://www.whimori.com/at_whc/whc0100/whc0103/whc0103.html";
			break;
		case "0104" :
			location.href = "http://www.whimori.com/at_whc/whc0100/whc0104/whc0104.html";
			break;
		case "0105" :
			location.href = "http://www.whimori.com/at_whc/whc0100/whc0105/whc0105.html";
			break;
		
		/*ÈÖ¸ð¸®»óÇ°Á¤º¸*/
		case "0200" :
			location.href = "http://www.whimori.com/at_whc/whc0200/whc0201/whcb010100/whcb010100.html";
			break;
		case "0201" :
			location.href = "http://www.whimori.com/at_whc/whc0200/whc0201/whcb010100/whcb010100.html";
			break;
		case "0202" :
			location.href = "http://www.whimori.com/at_whc/whc0200/whc0202/whcb020100/whcb020100.html";
			break;
		case "0203" :
			location.href = "http://www.whimori.com/at_whc/whc0200/whc0203/whcb030100/whcb030100.html";
			break;
		case "0204" :
			location.href = "http://www.whimori.com/at_whc/whc0200/whc0204/whcb040100/whcb040100.html";
			break;
		case "0209" :
			location.href = "http://www.whimori.com/at_whc/whc0200/whc0209/whcb090100/whcb090100.html";
			break;
		case "02010" :
			location.href = "http://www.whimori.com/at_whc/whc0200/whc02010/whcb0100100/whcb0100100.html";
			break;
		
		/*»ý»êÀÌ·ÂÁ¤º¸½Ç*/
		case "0300" :
			location.href = "http://www.whimori.com/at_whc/whc0300/whc0301/whc0301.html";
			break;
		case "0301" :
			location.href = "http://www.whimori.com/at_whc/whc0300/whc0301/whc0301.html";
			break;
		case "0302" :
			location.href = "http://www.whimori.com/at_whc/whc0300/whc0302/whc0302.jsp";
			break;
		
		/*ÈÖ¸ð¸®ÀÌ¾ß±â*/
		case "0400" :
			location.href = "http://www.whimori.com/at_whc/whc0400/whc0401/whc0401.jsp";
			break;
		case "0401" :
			location.href = "http://www.whimori.com/at_whc/whc0400/whc0401/whc0401.jsp";
			break;
		case "0402" :
			location.href = "http://www.whimori.com/at_whc/whc0400/whc0406/whc0402/whc0402.html";
			break;
		case "0403" :
			location.href = "http://www.whimori.com/at_whc/whc0400/whc0403/whc0403.html";
			break;
		case "0406" :
			location.href = "http://www.whimori.com/at_whc/whc0400/whc0406/whc0406.jsp";
			break;
		
		/*»çÀÌÆ®¸Ê*/
		case "0500" :
			location.href = "http://www.whimori.com/at_whc/whc0500/whc0501/whc0501.html";
			break;

		case "0501" :
			location.href = "http://www.whimori.com/at_whc/whc0500/whc0501/whc0501.html";
			break;
		
		
	}
	
	return;
}

