<!--
//var message="¿À¸¥ÂÊ ¹öÆ°À» »ç¿ëÇÏ½Ç¼ö ¾ø½À´Ï´Ù."; // °æ°í ¸Þ¼¼Áö¸¦ ³ÖÀ¸·Á¸é ¿©±â¿¡ ÀÔ·ÂÇÕ´Ï´Ù
//function clickIE() {if (document.all) {(alert(message));return false;}}
//function clickNS(e) {if 
//(document.layers||(document.getElementById&&!document.all)) {
//if (e.which==2||e.which==3) {(alert(message));return false;}}}
//if (document.layers) 
//{document.captureEvents(Event.MOUSEDOWN);document.onmousedown=clickNS;}
//else{document.onmouseup=clickNS;document.oncontextmenu=clickIE;}

//document.oncontextmenu=new Function("return false") //ÀÌºÎºÐÀÖÀ½ ¿À¸¥ÂÊ ¹öÆ° Å¬¸¯½Ã message ÀÛµ¿ ¾ÈµÊ


//ÆË¾÷Ã¢ °øÅë ÇÔ¼ö 
function pop(url, width_size, height_size, top_size, left_size, scroll_chk) {
	window.open(url,'pop_up',"width="+width_size+", height="+height_size+", top="+top_size+", left="+left_size+", scrollbars="+scroll_chk);
}
function popuppage(url, pname, width_size, height_size, top_size, left_size, scroll_chk) {
	window.open(url, pname,"width="+width_size+", height="+height_size+", top="+top_size+", left="+left_size+", scrollbars="+scroll_chk);
}

//´Þ·ÂÃ¢ °øÅë ÇÔ¼ö
function calendar_new(url,wid,hei,scr) 	{
	xCoord = event.clientX;
	yCoord = event.clientY;
	void window.open(url,'','width='+wid+', height='+hei+', top='+yCoord+', left='+xCoord+', scrollbars='+scr+' ');
}

//ÀÌ¹ÌÁö ÆÄÀÏ ¿ÀÇÂ
function PopImage(fp, iw, ih) {
	var url = "/Common/ImageView.asp?fpath="+ fp +"&imgW="+ iw +"&imgH="+ih;
	pop(url, iw, ih,'10','10','no');
}

//ÀÌ¹ÌÁö ÆÄÀÏ ¿ÀÇÂ
function GoView(idx,iw,ih) {
	var url = "/Common/ImageViewH.asp?idx="+ idx +"&imgW="+ iw +"&imgH="+ih;
	pop(url, iw, ih,'10','10','auto');
}
//ÆÄÀÏ ´Ù¿î·Îµå
function DownFile(fp, fn) {
	var url = "/Common/FileDownWIn.asp?fpath="+ fp +"&file="+ fn;
	var cw = screen.availWidth; //È­¸é ³Êºñ
	var ch=screen.availHeight; //È­¸é ³ôÀÌ
	var sw=400;//¶ç¿ï Ã¢ÀÇ ³Êºñ
	var sh=200;//¶ç¿ï Ã¢ÀÇ ³ôÀÌ
	var ml=(cw-sw)/2;//°¡¿îµ¥ ¶ç¿ì±âÀ§ÇÑ Ã¢ÀÇ xÀ§Ä¡
	var mt=(ch-sh)/2;//°¡¿îµ¥ ¶ç¿ì±âÀ§ÇÑ Ã¢ÀÇ yÀ§Ä¡
	//window.open(url,'tst','width='+sw+',height='+sh+',top='+mt+',left='+ml+',resizable=no,scrollbars=no');
	location.href = url;
}

// ÇÃ·¡½¬ ¿¬°á °í¸®
function INflash(txt,wid,hei) {
	var flash_tag = "";
	flash_tag = '<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" ';
	flash_tag +='codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" ';
	flash_tag +='WIDTH="'+wid+'" HEIGHT="'+hei+'" style="z-index:-10">';
	flash_tag +='<param name="allowScriptAccess" value="always">'; 
	flash_tag +='<param name="wmode" value="transparent">'; 
	flash_tag +='<param name="movie" value="'+txt+'">';
	flash_tag +='<param name="quality" value="high">';
	flash_tag +='<embed src="'+txt+'" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" ';
	flash_tag +='allowScriptAccess="always" type="application/x-shockwave-flash"  WIDTH="'+wid+'" HEIGHT="'+hei+'" wmode="transparent"></embed></object>';
	document.write(flash_tag);
}

// ÇÃ·¡½¬ µ¿¿µ»ó
function INflashMovie(src,width,height) {
	document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=4,0,2,0" width="'+width+'" height="'+height+'"> ');
	document.write('<param name=movie value="'+src+'">');
	document.write('<param NAME=bgcolor value=#FFFFFF>');
	document.write('<param name=wmode Value=Transparent>');
	document.write('<param name=quality value=high>');
	document.write('<embed src="'+src+'" allowFullScreen=true quality=high pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="'+width+'" height="'+height+'"></embed>');
	document.write('</object>');
}

// ÇÃ·¡½¬ µ¿¿µ»ó width 100% °íÁ¤ (20100219_CRYS)
function INflashMovie2(src,width,height) {
	document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=4,0,2,0" width="100%" height="'+height+'"> ');
	document.write('<param name=movie value="'+src+'">');
	document.write('<param NAME=bgcolor value=#FFFFFF>');
	document.write('<param name=wmode Value=Transparent>');
	document.write('<param name=quality value=high>');
  // »õ·Î Ãß°¡ÇÑ ÆÄ¶ó¹ÌÅÍ
  document.write('<param name="allowScriptAccess" value="sameDomain">');
  document.write('<param name="allowFullScreen" value="false">');
  document.write('<param name="menu" value="false">');
  //document.write('<param name="align" value="T">');
  //document.write('<param name="stageMode" value="exactFit">');
  document.write('<embed src="'+src+'" allowFullScreen=false quality=high pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="100%" height="'+height+'" wmode="transparent"></embed>');
	document.write('</object>');
}

/*ÇÃ·¡½Ã ¸Þ´º*/
function Topmenu_flash(txt,wid,hei,num) {
	var flash_tag = "";
	flash_tag = '<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" ';
	flash_tag +='codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" ';
	flash_tag +='WIDTH="'+wid+'" HEIGHT="'+hei+'" style="z-index:-10">';
	flash_tag +='<param name="allowScriptAccess" value="always">'; 
	flash_tag +='<param name="wmode" value="transparent">'; 
	flash_tag +='<param name="movie" value="'+txt+'?pageNum='+num+'">';
	flash_tag +='<param name="quality" value="high">';
	flash_tag +='<embed src="'+txt+'" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" ';
	flash_tag +='allowScriptAccess="always" type="application/x-shockwave-flash"  WIDTH="'+wid+'" HEIGHT="'+hei+'" wmode="transparent"></embed></object>';
	document.write(flash_tag);
}

// µ¿¿µ»ó ¿¬°á °í¸®
function INmovie(src, width, height) {
	document.write('<embed src="' + src + '" width="' + width + '" height="' + height + '"></embed>');
}

function Zippop(pageUrl,idx){		
		window.open("/gem/search_u.asp", 'IntraNet','width=300,height=400,top=50,left=50,toolbar=no,scrollbars=auto');
	}

//PDF º¸±â
function PDF_view(pageUrl){		
		window.open(pageUrl, 'PDFNEW','top=50,left=50,toolbar=no,scrollbars=auto');
	}

//ºÐ·ù ¸®½ºÆ® ¼±ÅÃ ÇÔ¼ö
function goCateList(url,TableName,mode,code,no,cateL) {
	var goVal;
	if (mode=="d")
	{
		if (confirm("»èÁ¦ÇÏ½Ã°Ú½À´Ï±î?") == false) return;
	}
	goVal=url+".asp?TableName="+TableName
	goVal=goVal+"&mode="+mode
	goVal=goVal+"&code="+code
	goVal=goVal+"&no="+no
	goVal=goVal+"&cateL="+cateL

	window.location=goVal;
}

//ºÐ·ù µî·Ï,¼öÁ¤½Ã Ã¼Å©ÇÔ¼ö
function cateInsert(sel) {
	var form=window.frmCate;

	if (sel=="L") {
		if (CheckStr(form.name1.value, " ", "")==0) {
				alert("1Â÷ ºÐ·ù¸¦ ÀÔ·ÂÇÏ¼¼¿ä");
				form.name1.value=""
				form.name1.focus();
				return;
		}
	} else if (sel=="M") {
		if (form.cateL.value=="")	{
			alert("1Â÷ ºÐ·ù¸¦ ¸ÕÀú ¼±ÅÃÇÏ¼¼¿ä");
			form.name2.value=""
			return;
		}

		if (CheckStr(form.name2.value, " ", "")==0) {
			alert("2Â÷ ºÐ·ù¸¦ ÀÔ·ÂÇÏ¼¼¿ä");
			form.name2.value=""
			form.name2.focus();
			return;
		}
	}

	form.code.value=sel;
	form.submit();
}

//°ø¹éÃ¼Å© ÇÔ¼ö
function CheckStr(strOriginal, strFind, strChange)
{
	var position, strOri_Length;
	position = strOriginal.indexOf(strFind); 
    
	while (position != -1){
		strOriginal = strOriginal.replace(strFind, strChange);
		position = strOriginal.indexOf(strFind);
	}

	strOri_Length = strOriginal.length;
	return strOri_Length;
}

/* Family Site Url ***************************************** */
function DiretoryName() {	
 str=location.href;  //ÁÖ¼Ò³»¿ëÀúÀå
  var myID=str.substr(str.indexOf("?")+1,str.length-1);
  var impIDs=["/eng/"];  //ID¿¡ Æ÷ÇÔ ºÒ°¡ÇÑ Ç×¸ñµé
  for (var i=0; i<impIDs.length; i++) {
	if (myID.indexOf(impIDs[i])>=0) {
	  str = "/eng"
	}else{
	  str = ""
		}
	}  	
}
function Menu(siteNum) {
  DiretoryName();
  switch(siteNum) {
    // ±³³» °ü·Ã »çÀÌÆ®
    case '1000':
      window.location.href =str+ "/about/message/"
      break;
	case '1010':
      window.location.href =str+ "/about/message/"
      break;
	case '1020':
      window.location.href =str+ "/about/history/"
      break;
	case '1030':
      window.location.href =str+ "/about/organization/"
      break;
	case '1040':
      window.location.href =str+ "/about/business/"
      break;
	case '1050':
      window.location.href =str+ "/about/corporate/"
      break;
	case '1060':
      window.location.href =str+ "/about/join/"
      break;
	case '1070':
      window.location.href =str+ "/about/location/"
      break;
	case '1080':
	  window.location.href =str+ "/about/vision/"
	  break;

	case '2000':
      window.location.href =str+ "/industry/"
      break;
	case '2010':
      window.location.href =str+ "/industry/mold/"
      break;
	case '2020':
      window.location.href =str+ "/industry/statistics/"
      break;

	case '3000':
      window.location.href =str+ "/suppliers/company/"
      break;
	case '3010':
      window.location.href =str+ "/suppliers/company/"
      break;

	case '4000':
      window.location.href =str+ "/information/notice/"
      break;
	case '4010':
      window.location.href =str+ "/information/notice/"
      break;	
	case '4020':
      window.location.href =str+ "/information/cooperative/"
      break;
	case '4030':
      window.location.href =str+ "/information/members/"
      break;
	case '4040':
      window.location.href =str+ "/information/industrial/"
      break;
	case '4050':
      window.location.href =str+ "/information/data/"
      break;
	case '4060':
      window.location.href =str+ "/information/forum/"
      break;
	 
    case '5000':
      window.location.href =str+ "/magazine/paper/"
      break;
	case '5010':
      window.location.href =str+ "/magazine/paper/"
      break;
	case '5020':
      window.location.href =str+ "/magazine/article/"
      break;
	 
	case '6000':
      window.location.href =str+ "/links/site/"
      break;  
	case '6010':
      window.location.href =str+ "/links/site/"
      break; 
	  
	
	case '9000':
      window.location.href =str+ "/main/"
      break;  
	case '9010':
      window.location.href =str+ "/main/sitemap/"
      break;  
	case '9020':
      window.location.href ="mailto:koreamold@koreamold.com"
      break;  
	/*case '9030':
		if (str=="/eng"){
			window.location.href ="/main/"
		}else{
			window.location.href ="/eng/main/"
		}      
		break;  
	*/
	case '9030':		
	  window.location.href ="/main/"
	  break;  
	case '9031':		
	  window.location.href ="/eng/main/"
	  break;  
	case '9032':		
	  window.location.href ="/jp/main/"
	  break; 
	case '9040':
      window.location.href =str+ "/main/pr/"
      break;  
	case '9050':
	   PDF_view('/files/industry/whats_mold.pdf');
	   break; 
	/*case '410':			
      window.open("http://economics.yonsei.ac.kr/economics");
      break;*/
  }
}

function menu_left(siteNum) {
  DiretoryName();
  switch(siteNum) {
    // ±³³» °ü·Ã »çÀÌÆ®
	case "11":
      window.location.href = str+ "/about/message/"
      break;
	case "12":
      window.location.href = str+ "/about/history/"
      break;
	case "13":
      window.location.href = str+ "/about/organization/"
      break;
	case "14":
      window.location.href = str+ "/about/business/"
      break;
	case "15":
      window.location.href = str+ "/about/corporate/"
      break;
	case "16":
      window.location.href = str+ "/about/join/"
      break;
	case "17":
      window.location.href = str+ "/about/location/"
      break;
	case "18":
      window.location.href = str+ "/about/vision/"
      break;
	
	case "21":
      window.location.href = str+ "/industry/mold/"
      break;
	case "22":
      window.location.href = str+ "/industry/statistics/"
      break;

	case "31":
      window.location.href = str+ "/suppliers/company/"
      break;
	
	case "41":
      window.location.href = str+ "/information/notice/"
      break;	
	case "42":
      window.location.href = str+ "/information/cooperative/"
      break;
	case "43":
      window.location.href = str+ "/information/members/"
      break;
	case "44":
      window.location.href = str+ "/information/industrial/"
      break;
	case "45":
      window.location.href = str+ "/information/data/"
      break;
	case "46":
      window.location.href = str+ "/information/forum/"
      break;	 
    
	case "51":
      window.location.href = str+ "/magazine/paper/"
      break;
	case "52":
      window.location.href = str+ "/magazine/article/"
      break;	 
	
	case "61":
      window.location.href = str+ "/links/site/"
      break; 
	
  }
}

function menu_left_en(siteNum) {
  DiretoryName();
  switch(siteNum) {
    // ±³³» °ü·Ã »çÀÌÆ®
	case "11":
      window.location.href = str+ "/about/message/"
      break;
	case "12":
      window.location.href = str+ "/about/history/"
      break;
	case "13":
      window.location.href = str+ "/about/organization/"
      break;
	case "14":
      window.location.href = str+ "/about/business/"
      break;
	case "15":
      window.location.href = str+ "/about/corporate/"
      break;
	case "16":
      window.location.href = str+ "/about/location/"
      break;	
	
	
	case "21":
      window.location.href = str+ "/industry/statistics/"
      break;

	case "31":
      window.location.href = str+ "/suppliers/company/"
      break;
	
	case "41":
      window.location.href = str+ "/information/notice/"
      break;		
    
	case "51":
      window.location.href = str+ "/magazine/paper/"
      break;
	
	case "61":
      window.location.href = str+ "/links/site/"
      break; 
	
  }
}


function Open_Popup(pop, width, height) {
  if (GetCookie(pop) != "checked") {
    window.open('/main/popup/' + pop, 'popup_' + pop, 'width=' + width + ',height=' + height + ',toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0');
  }
}
function Open_Popup2(pop, width, height,left_size) {
  if (getCookie2(pop) != "done") {
    window.open('/Popup/Popup_page.asp?idx=' + pop, 'popup_' + pop, 'width=' + width + ',height=' + height + ',left='+left_size+',toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0');
  }
}
function Open_Popup3(pop, width, height, top, left) {
  if (GetCookie(pop) != "checked") {
    window.open('/main/popup/' + pop, 'popup_' + pop, 'width=' + width + ',height=' + height + ',top=' + top + ',left=' + left + ',toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0');
  }
}

// ¿ÜºÎÃ¢¿¡¼­ Opener Ã¢ URLÀ» ÀÌµ¿½ÃÅ°´Â ÇÔ¼ö (Opener Ã¢ Æ÷Ä¿½º Æ÷ÇÔ)
function MoveOpener(page) {
  opener.location.href = page;
  //var test = eval("window.popup_" + pop);
  opener.focus();
  window.close()
}


function GetCookie(Name) {
  var search = Name + "="
  if (document.cookie.length > 0) { // ÄíÅ°°¡ ¼³Á¤µÇ¾î ÀÖ´Ù¸é
    offset = document.cookie.indexOf(search)
    if (offset != -1) { // ÄíÅ°°¡ Á¸ÀçÇÏ¸é
      offset += search.length
      // set index of beginning of value
      end = document.cookie.indexOf(";", offset)
      // ÄíÅ° °ªÀÇ ¸¶Áö¸· À§Ä¡ ÀÎµ¦½º ¹øÈ£ ¼³Á¤
      if (end == -1)
        end = document.cookie.length
      return unescape(document.cookie.substring(offset, end))
    }
  }
}

function SetCookie(Name,value, exp) { // popup ¿ë
  var expires = new Date();
  expires.setTime(expires.getTime() + 1000 * 3600 * exp);
  document.cookie = Name + "=" + escape(value) + "; path=/; expires=" + expires.toGMTString();
  window.close();
}

function getCookie2( name ) 
	{ 
			var nameOfCookie = name + "="; 
			var x = 0; 
			while ( x <= document.cookie.length ) 
			{ 
					var y = (x+nameOfCookie.length); 
					if ( document.cookie.substring( x, y ) == nameOfCookie ) { 
							if ( (endOfCookie=document.cookie.indexOf( ";", y )) == -1 ) 
									endOfCookie = document.cookie.length; 
							return unescape( document.cookie.substring( y, endOfCookie ) ); 
					} 
					x = document.cookie.indexOf( " ", x ) + 1; 
					if ( x == 0 ) 
							break; 
			} 
			return ""; 
	} 
//-->
