// gnb, quick µî ÇÃ·¡½Ã »ðÀÔ =======================================================================================================

function flashWrite(url,w,h,id,bg,vars,win){
var flashStr=
"<object classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' codebase='http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0' width='"+w+"' height='"+h+"' id='"+id+"' align='middle'>"+
"<param name='allowScriptAccess' value='always' />"+
"<param name='movie' value='"+url+"' />"+
"<param name='FlashVars' value='"+vars+"' />"+
"<param name='wmode' value='"+win+"' />"+
"<param name='menu' value='false' />"+
"<param name='quality' value='high' />"+
"<param name='bgcolor' value='"+bg+"' />"+
"<param name='base' value='.'>"+

"<embed src='"+url+"' FlashVars='"+vars+"' wmode='"+win+"' menu='false' qinitTabMenu uality='high' bgcolor='"+bg+"' width='"+w+"' height='"+h+"' name='"+id+"' align='middle' allowScriptAccess='always' type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/etflashplayer' />"+
"</object>";
document.write(flashStr);
}

// ÇÃ·¡½Ã »ðÀÔ =======================================================================================================

function FlashObject(swf, width, height, bgcolor, id, flashvars)
{
    var strFlashTag = new String();
    
    if (navigator.appName.indexOf("Microsoft") != -1)
    {
        strFlashTag += '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" ';
        strFlashTag += 'codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=version=8,0,0,0" ';
        strFlashTag += 'id="' + id + '" width="' + width + '" height="' + height + '">';
        strFlashTag += '<param name="movie" value="' + swf + '"/>';
        
        if(flashvars != null) {strFlashTag += '<param name="flashvars" value="' + flashvars + '"/>'};
        strFlashTag += '<param name="quality" value="best"/>';
        strFlashTag += '<param name="bgcolor" value="' + bgcolor + '"/>';
        strFlashTag += '<param name="menu" value="false"/>';
        strFlashTag += '<param name="salign" value="LT"/>';
        strFlashTag += '<param name="scale" value="noscale"/>';
        strFlashTag += '<param name="wmode" value="transparent"/>';
        strFlashTag += '<param name="allowScriptAccess" value="always"/>';
        strFlashTag += '</object>';
    }
    else
    {
        strFlashTag += '<embed src="' + swf + '" ';
        strFlashTag += 'quality="best" ';
        strFlashTag += 'bgcolor="' + bgcolor + '" ';
        strFlashTag += 'width="' + width + '" ';
        strFlashTag += 'height="' + height + '" ';
        strFlashTag += 'menu="false" ';
        strFlashTag += 'scale="noscale" ';
        strFlashTag += 'id="' + id + '" ';
        strFlashTag += 'salign="LT" ';
        strFlashTag += 'wmode="transparent" ';
        strFlashTag += 'allowScriptAccess="always" ';
        if(flashvars != null) {strFlashTag += 'flashvars="' + flashvars + '" '};
        strFlashTag += 'type="application/x-shockwave-flash" ';
        strFlashTag += 'pluginspage="http://www.macromedia.com/go/getflashplayer">';
        strFlashTag += '</embed>';
    }

 document.write(strFlashTag);
}

// ÆË¾÷ //	
function OpenWindow(url,intWidth,intHeight) {
	window.open(url, "_blank", "width="+intWidth+",height="+intHeight+",resizable=0,scrollbars=no") ;
}

// °æ°íÃ¢ //	
function warning(){  
    alert("ÁØºñÁßÀÔ´Ï´Ù.");
}

//*****************************************************************************
// Description : À¯È¿¼º Ã¼Å©
// Parameter:
// Return:
// Usage:
//*****************************************************************************
function CheckValid(String,	space)
{
	 var retvalue	=	false;
	 for (var	i=0; i<String.length;	i++)
	 {		//StringÀÌ 0(""	ÀÌ³ª null)ÀÌ¸é ¹«Á¶°Ç	false
			if (space	== true)
			{
				 if	(String.charAt(i)	== ' ')
				 {			//StringÀÌ 0ÀÌ ¾Æ´Ò¶§	space°¡	ÀÖ¾î¾ß¸¸ true(valid)
						retvalue = true;
						break;
				 }
			} else {
				 if	(String.charAt(i)	!= ' ')
				 {			//stringÀÌ 0ÀÌ ¾Æ´Ò¶§	space°¡	¾Æ´Ñ ±ÛÀÚ°¡	ÀÖ¾î¾ß¸¸ true(valid)
						retvalue = true;
						break;
				 }
			}
	 }
	 return	retvalue;
}
//*****************************************************************************
// Description : Ç×¸ñÀÌ	ºñ¾îÀÖ´ÂÁö Ã¼Å©
// Parameter: isFocus:°´Ã¼¿¡ focusing¿©ºÎ
// Return:
// Usage:
//*****************************************************************************
function isEmpty(field,	error_msg,isFocus)
{
	// error_msg°¡ ""ÀÌ¸é	alert¿Í	focusingÀ» ÇÏÁö¾Ê´Â´Ù
	if(error_msg ==	"")	{
		if(!CheckValid(field.value,	false))		{
			return true;
		}	else {
			return false;
		}
	}	else {
		if(!CheckValid(field.value,	false))	{
			alert(error_msg);
			if(isFocus!=false) field.focus()	;
			return true;
		}	else {
			return false;
		}
	}
}
//*****************************************************************************
// Description : ¸Þ¼¼Áö Ã³¸®ÈÄ focusing
// Parameter:
// Return:
// Usage:
//*****************************************************************************
function altFocus(field,error_msg,isFocus)
{
	alert(error_msg);
	if(isFocus!=false) field.focus();
	return false;
}

//*****************************************************************************
//Description :
//Parameter:
//Return:
//Usage:
//*****************************************************************************
function chkPattern(str,type)	//Çü½Ä Ã¼Å©
{
	switch(type)
	{
	 case "NUM": //¼ýÀÚ¸¸
	 pattern = /^[0-9]+$/;
	   break;
	
		case "PHONE" :		// ÀüÈ­¹øÈ£ (####-####-####)
			pattern = /^[0-9]{2,4}-[0-9]{3,4}-[0-9]{4}$/;
			break;
	
		case "MOBILE" :		// ÈÞ´ëÀüÈ­ (0##-####-####)
			pattern = /^0[0-9]{2,3}-[0-9]{3,4}-[0-9]{4}$/;
			break;
	
		case "ZIPCODE" :	// ¿ìÆí¹øÈ£ (###-###)
			pattern = /^[0-9]{3}-[0-9]{3}$/;
			break;
			
	 case "EMAIL": //¸ÞÀÏ
	 //pattern = /^[._a-zA-Z0-9-]+@[._a-zA-Z0-9-]+\.[a-zA-Z]+$/;
	 pattern = /^[a-zA-Z0-9._-]+@([a-zA-Z0-9.-]+\.)+[a-zA-Z]{2,4}$/;
	   break;
	
	 case "DOMAIN": //¿µÀÚ ¼ýÀÚ¿Í	.	´ÙÀ½µµ ¿µÀÚ
	 pattern = /^[.a-zA-Z0-9-]+.[a-zA-Z]+$/;
	   break;
	
	 case "ENG": //¿µÀÚ¸¸
	   pattern = /^[a-zA-Z]+$/;
	   break;
	
	 case "ENGNUM": //¿µÀÚ¿Í	¼ýÀÚ
	   pattern = /^[a-zA-Z0-9]+$/;
	   break;
	
		case "KOR" :		// ÇÑ±Û
			pattern = /^[¤¡-¤¾|¤¿-¤Ó|°¡-ÆR]+$/;
			break;
			
	 case "ACCOUNT": //¼ýÀÚ	¿Í '-'
	   pattern = /^[0-9-]+$/;
	   break;     
	
	 case "HOST": //¿µÀÚ	¿Í '-'
	   pattern = /^[a-zA-Z-]+$/;
	   break;
	 case "ID": //Ã¹±ÛÀÚ´Â ¿µÀÚ ±× µÚ¿£ ¿µ¾î¼ýÀÚ 4ÀÌ»ó 15ÀÚ¸®	ÀÌÇÏ
	   //pattern = /^[a-zA-Z]{1}[a-zA-Z0-9_-]{4,15}$/;
	   pattern = /^[a-zA-Z]{1}[a-zA-Z0-9]{4,15}$/;
	   break;
	
	 case "ID2": //Ã¹±ÛÀÚ´Â	¿µÀÚ ±×µÚ¿£	¿µ¾î¼ýÀÚ 4ÀÌ»ó 15ÀÚ¸®	ÀÌÇÏ
	   pattern = /^[a-zA-Z0-9._-]+$/;
	   break;
	
	 case "DATE": //	Çü½Ä : 2002-08-15
	   pattern = /^[0-9]{4}-[0-9]{2}-[0-9]{2}$/;
	   break;
	
		case "JUMIN" :		// ÁÖ¹Îµî·Ï¹øÈ£
			//pattern = /^[0-9]{6}-[0-9]{7}$/;
			pattern = /^[0-9]{13}$/;
			break;
	
	 default :
	   return false;
	}
	return pattern.test(str);
}

//*****************************************************************************
//Description : ÀÔ·Â°ª¿¡ Æ¯Á¤ ¹®ÀÚ(chars)°¡ ÀÖ´ÂÁö Ã¼Å©
//				Æ¯Á¤ ¹®ÀÚ¸¦ Çã¿ëÇÏÁö ¾ÊÀ¸·Á ÇÒ ¶§ »ç¿ë
//				ex) if (containsChars(form.name,"!,*&^%$#@~;")) {
//		         alert("ÀÌ¸§ ÇÊµå¿¡´Â Æ¯¼ö ¹®ÀÚ¸¦ »ç¿ëÇÒ ¼ö ¾ø½À´Ï´Ù.");
//Parameter:
//Return:
//Usage:
//*****************************************************************************

function containsChars(input){
   var chars = "*&^%$'#@~;<>";
   for (var inx = 0; inx < input.value.length; inx++) {
      if (chars.indexOf(input.value.charAt(inx)) != -1)
          return true;
   }   
   return false;
}

//*****************************************************************************
//Description : iframe NO ½ºÅ©·Ñ,   Auto resize
//Parameter:
//Return:
//Usage:
//*****************************************************************************
function do_resize() {
    resizeFrame("iframe_main",1);
}

function resizeFrame(ifr_id,re){
    //°¡·Î±æÀÌ´Â À¯µ¿ÀûÀÎ °æ¿ì°¡ µå¹°±â ¶§¹®¿¡ ÁÖ¼®Ã³¸®!
    var ifr= document.getElementById(ifr_id) ;
    var innerBody = ifr.contentWindow.document.body;
    var innerHeight = innerBody.scrollHeight + (innerBody.offsetHeight - innerBody.clientHeight);
    //var innerWidth = document.body.scrollWidth + (document.body.offsetWidth - document.body.clientWidth);
    
    if (ifr.style.height != innerHeight) //ÁÖ¼®Á¦°Å½Ã ´ÙÀ½ ±¸¹®À¸·Î ±³Ã¼ -> if (ifr.style.height != innerHeight || ifr.style.width != innerWidth)
    {
        ifr.style.height = innerHeight;
        //ifr.style.width = innerWidth;
    }
    
    if(!re) {
        try{
            innerBody.attachEvent('onclick',parent.do_resize);
            innerBody.attachEvent('onkeyup',parent.do_resize);
            //±ÛÀÛ¼º »óÈ²¿¡¼­ Å¬¸¯¾øÀÌ Å¸ÀÌÇÎÇÏ¸é¼­ Ã¢ÀÌ ´Ã¾î³ª´Â »óÈ²ÀÌ¸é À­ÁÙ ÁÖ¼®Á¦°Å
        } catch(e) {
            innerBody.addEventListener("click", parent.do_resize, false);
            innerBody.addEventListener("keyup", parent.do_resize, false);
            //±ÛÀÛ¼º »óÈ²¿¡¼­ Å¬¸¯¾øÀÌ Å¸ÀÌÇÎÇÏ¸é¼­ Ã¢ÀÌ ´Ã¾î³ª´Â »óÈ²ÀÌ¸é À­ÁÙ ÁÖ¼®Á¦°Å
        }
    }
}


//*****************************************************************************
//Description : ±ÛÀÚ¼ö ¼¼±â À§ÇÑ textarea ÁÙ¹Ù²Þ °ø¹é Á¦°Å¿ë
//Parameter: ±Û ³»¿ë
//Return:
//Usage: À¥Áø 100 ÇÃ
//*****************************************************************************
function trim(value) {
	 value = value.replace(/^\s+/, ""); // ¿ÞÂÊ °ø¹é Á¦°Å
	 value = value.replace(/\s+$/g, "");//¿À¸¥ÂÊ °ø¹é Á¦°Å

	 value = value.replace(/\n/g, "");//Çà¹Ù²ÞÁ¦°Å

	 value = value.replace(/\r/g, "");//¿£ÅÍÁ¦°Å 

	 return value;
}




//*****************************************************************************
//Description : ±ÛÀÚ¼ö ¼¼±â
//Parameter: trim()¿¡¼­ Á¤Á¦µÈ ¹ë·ù°ª, Á¦ÇÑ ÀÚ¸®¼ö  (100 ÀÌ¸é ÇÑ±ÛÀº 50 ¿µ¹®Àº 100 ÀÚ¸®)
//Return:
//Usage: °Ô½ÃÆÇ °øÅë
//*****************************************************************************
function checklen(msgtext, maxlength)
{

 var msgtext, msglen;

 //msgtext = frm.user_comment.value;

 var i=0,l=0;
 var temp,lastl;

 //±æÀÌ¸¦ ±¸ÇÑ´Ù.
 while(i < msgtext.length)
 {
  temp = msgtext.charAt(i);

  if (escape(temp).length > 4)
   l+=2;
  else if (temp!='\r')
   l++;
  // OverFlow
  if(l>maxlength)
  {
   alert("Çã¿ë ±æÀÌ ÀÌ»óÀÇ ±ÛÀ» ¾²¼Ì½À´Ï´Ù.\nÇÑ±Û "+ maxlength/2 +"ÀÚ, ¿µ¹®"+ maxlength +"ÀÚ±îÁö¸¸ ¾²½Ç ¼ö ÀÖ½À´Ï´Ù.");
   temp = msgtext.substr(0,i);
   msgtext = temp;
   l = lastl;
   return false;
   //break;
  }
  lastl = l;
  i++;
 }
 return true;
}

//*****************************************************************************
//Description : °øÅë ÀÌ¹ÌÁö ºä¾î Ã¢
//Parameter:
//Return:
//Usage:
//*****************************************************************************
function img_view(what) { 
	var imgwin = window.open("",'WIN','scrollbars=yes,status=no,toolbar=no,resizable=1,location=no,menu=no,width=10,height=10'); 
	imgwin.focus(); 
	imgwin.document.open(); 
	imgwin.document.write("<html>\n"); 
	imgwin.document.write("<head>\n"); 
	imgwin.document.write("<title>**</title>\n"); 
	
	imgwin.document.write("<sc"+"ript>\n"); 
	imgwin.document.write("function resize() {\n"); 
	imgwin.document.write("pic = document.il;\n"); 
	//imgwin.document.write("alert(eval(pic).height);\n"); 
	imgwin.document.write("if (eval(pic).height) { var name = navigator.appName\n"); 
	imgwin.document.write("  if (name == 'Microsoft Internet Explorer') { myHeight = eval(pic).height + 40; myWidth = eval(pic).width + 12;\n"); 
	imgwin.document.write("  } else { myHeight = eval(pic).height + 9; myWidth = eval(pic).width; }\n"); 
	imgwin.document.write("  clearTimeout();\n"); 
	imgwin.document.write("  var height = screen.height;\n"); 
	imgwin.document.write("  var width = screen.width;\n"); 
	imgwin.document.write("  var leftpos = width / 2 - myWidth / 2;\n"); 
	imgwin.document.write("  var toppos = height / 2 - myHeight / 2; \n"); 
	imgwin.document.write("  self.moveTo(leftpos, toppos);\n"); 
	imgwin.document.write("  self.resizeTo(myWidth, myHeight);\n"); 
	imgwin.document.write("}else setTimeOut(resize(), 100);}\n"); 
	imgwin.document.write("</sc"+"ript>\n"); 
	
	imgwin.document.write("</head>\n"); 
	imgwin.document.write('<body topmargin="0" leftmargin="0" marginheight="0" marginwidth="0" bgcolor="#FFFFFF">\n'); 
	
	imgwin.document.write("<a href='javascript:self.close();'><img border=0 src="+what+" xwidth=100 xheight=9 name=il onload='resize();'>\n"); 
	imgwin.document.write("</body>\n"); 
	imgwin.document.close(); 
	
} 
//*****************************************************************************
//Description : ÆÄÀÏ´Ù¿î·Îµå
//Parameter:
//Return:
//Usage:
//*****************************************************************************
function fileDown(val1, val2) {	
	var frm = document.getElementById("download");
	frm.org_name.value = val1;
	frm.new_name.value = val2;
	frm.submit();
}

//*****************************************************************************
//Description : ÇÃ·¡½¬ ¿ÀºêÁ§Æ® È£Ãâ
//Parameter:
//Return:
//Usage:
//*****************************************************************************
function swf(src,w,h){
	html = '';
	html += '<object type="application/x-shockwave-flash" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="https://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" id="param" width="'+w+'" height="'+h+'">';
	html += '<param name="movie" value="'+src+'">';
	html += '<param name="quality" value="best">';
	html += '<param name="wmode" value="transparent">';
	html += '<embed src="'+src+'" quality=best width="'+w+'" height="'+h+'" quality="best" pluginspage="https://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" wmode="transparent"><\/embed>';
	html += '<\/object>';
	document.write(html);
}


function swfHeader(src,w,h){
	html = '';
	html += '<object type="application/x-shockwave-flash" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="https://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" id="param" width="'+w+'" height="'+h+'">';
	html += '<param name="movie" value="'+src+'">';
	html += '<param name="quality" value="best">';
	html += '<param name="wmode" value="transparent">';
	html += '<embed src="' + src + '" quality=best width="'+w+'" height="'+h+'" quality="best" pluginspage="https://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" wmode="transparent"><\/embed>';
	html += '<\/object>';
	document.write(html);
}

function swfLeft(src,w,h){
	html = '';
	html += '<object type="application/x-shockwave-flash" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="https://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" id="param" width="'+w+'" height="'+h+'">';
	html += '<param name="movie" value="'+src+'">';
	html += '<param name="quality" value="best">';
	html += '<param name="wmode" value="transparent">';
	html += '<embed src="' + src + '" quality=best width="'+w+'" height="'+h+'" quality="best" pluginspage="https://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" wmode="transparent"><\/embed>';
	html += '<\/object>';
	document.write(html);
}


//*****************************************************************************
//Description : ¸ÞÀÎÆäÀÌÁö È­¾à, ¹«¿ª ³×ºñ°ÔÀÌ¼Ç
//Parameter:
//Return:
//Usage:
//*****************************************************************************
function mainType(gbn) {	
	if (gbn == 3) {		
		document.getElementById("index").style.display = "none";
		document.getElementById("exp_index").style.display = "block";
		document.getElementById("trade_index").style.display = "none";
	}else if (gbn == 2) {
		document.getElementById("index").style.display = "none";
		document.getElementById("exp_index").style.display = "none";
		document.getElementById("trade_index").style.display = "block";
	}else{
		document.getElementById("index").style.display = "block";
		document.getElementById("exp_index").style.display = "none";
		document.getElementById("trade_index").style.display = "none";
	}		
}

//*****************************************************************************
//Description : businessMap
//Parameter:
//Return:
//Usage:
//*****************************************************************************
function viewOpen() {

	var obj = document.getElementById("businessMap");		
		
	obj.style.visibility="visible";
	obj.style.top="0";
	obj.style.left="0";
	obj.style.width="1000";
	obj.style.height="290";
	obj.innerHTML = flashSwf("/common/images/swf/BusinessMap.swf","1000","290");
		
}

function flashSwf(s,w,h){
    return "<object classid=\"clsid:d27cdb6e-ae6d-11cf-96b8-444553540000\" codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0\" width=\""+w+"\" height=\""+h+"\" id=\"main\" align=\"middle\"param name=\"allowScriptAccess\" value=\"always\" /><param name=\"allowScriptAccess\" value=\"always\" /><param name=\"movie\" value=\""+s+"\" /><param name=\"wmode\" value=\"transparent\" /><param name=\"quality\" value=\"high\" /><param name=\"bgcolor\" value=\"#000000\" /><embed src=\""+s+"\" quality=\"high\" bgcolor=\"#000000\" width=\""+w+"\" height=\""+h+"\" name=\"main\" align=\"middle\" allowScriptAccess=\"always\" type=\"application/x-shockwave-flash\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\" /></object>";
}

//*****************************************************************************
//Description : ¹Ìµð¾îÇÃ·¹ÀÌ¾î È£Ãâ
//Parameter:
//Return:
//Usage:
//*****************************************************************************
function diplayPlayer(s){
	var returnval = "";
	
	returnval= '<OBJECT ID="MediaPlayer" Name="MediaPlayer" classid="clsid:22D6F312-B0F6-11D0-94AB-0080C74C7E95" codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701" standby="Loading Microsoft Windows Media Player components..." type="application/x-mplayer2" bgcolor="DarkBlue" ';
	returnval +=' width="280" Height="260" >';
	returnval += '<PARAM NAME="AutoStart" VALUE="0">';
	returnval += '<PARAM NAME="AutoSize" VALUE="1">';
	returnval += '<PARAM NAME="AnimationAtStart" VALUE="0">';
	returnval += '<param name="fullScreen" value="0">';
	returnval += '<PARAM NAME="DisplayMode" VALUE="4">';
	returnval += '<PARAM NAME="Enabled" VALUE="1">';
	returnval += " <param name=\"Filename\" value=\""+ s +"\">";
	returnval += '<PARAM NAME="ShowControls" VALUE="1">';
	returnval += '<PARAM NAME="ShowAudioControls" VALUE="1">';
	returnval += '<PARAM NAME="ShowDisplay" VALUE="0">';
	returnval += '<PARAM NAME="ShowGotoBar" VALUE="0">';
	returnval += '<PARAM NAME="ShowPositionControls" VALUE="1">';
	returnval += '<PARAM NAME="ShowStatusBar" VALUE="0">';
	returnval += '<PARAM NAME="Volume" VALUE="30">';
	returnval += '<PARAM NAME="ShowCaptioning" VALUE="0">';
	returnval += '<PARAM NAME="TransparentAtStart" value="0">';
	returnval += '<EMBED invokeURLs="false" type="application/x-mpPlayerOnPlayBtn_div" pluginspage="http://www.microsoft.com/Windows/Downloads/Contents/Products/MediaPlayer/" id="MediaPlayer" Name="MediaPlayer" DisplaySize="4" AutoSize="1" ShowControls="0" ShowDisplay="0" ShowStatusBar="1" autostart="1"></EMBED>';
	returnval += '</OBJECT>';
	
	/*
	returnval = "<object id=\"NSPlay\" name=\"NSPlay\"";
	returnval += " classid=\"CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95\"";
	returnval += " codebase=\"http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701\"";
	returnval += " align=\"center\" valign=\"middle\" border=\"0\" width=\"280\" height=\"260\" ";  
	returnval += " type=\"application/x-oleobject\"";
	returnval += " standby=\"Loading Microsoft Windows Media Player components...\"";
	returnval += " bgcolor=\"Black\">";
	returnval += " <param name=\"AnimationAtStart\" value=\"false\">";
	returnval += " <param name=\"AutoStart\" value=\"true\">";
	returnval += " <param name=\"EnableContextMenu\" value=\"false\">";
	returnval += " <param name=\"Filename\" value=\""+ s +"\">";
	returnval += " <param name=\"ShowControls\" value=\"1\">";
	returnval += " <param name=\"ShowDisplay\" value=\"0\">";
	returnval += " <param name=\"ShowStatusBar\" value=\"0\">";
	returnval += " <param name=\"TransparentatStart\" value=\"true\">";
	returnval += " </object>";

	*/
	return returnval;
}


function mediaPlayer(s){
	var returnval = "";
	
	returnval= '<OBJECT ID="MediaPlayer" Name="MediaPlayer" classid="clsid:22D6F312-B0F6-11D0-94AB-0080C74C7E95" codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701" standby="Loading Microsoft Windows Media Player components..." type="application/x-mplayer2" bgcolor="DarkBlue" ';
	returnval +=' width="303" Height="251" >';
	returnval += '<PARAM NAME="AutoStart" VALUE="0">';
	returnval += '<PARAM NAME="AutoSize" VALUE="1">';
	returnval += '<PARAM NAME="AnimationAtStart" VALUE="0">';
	returnval += '<param name="fullScreen" value="0">';
	returnval += '<PARAM NAME="DisplayMode" VALUE="4">';
	returnval += '<PARAM NAME="Enabled" VALUE="1">';
	returnval += " <param name=\"Filename\" value=\""+ s +"\">";
	returnval += '<PARAM NAME="ShowControls" VALUE="1">';
	returnval += '<PARAM NAME="ShowAudioControls" VALUE="1">';
	returnval += '<PARAM NAME="ShowDisplay" VALUE="0">';
	returnval += '<PARAM NAME="ShowGotoBar" VALUE="0">';
	returnval += '<PARAM NAME="ShowPositionControls" VALUE="1">';
	returnval += '<PARAM NAME="ShowStatusBar" VALUE="0">';
	returnval += '<PARAM NAME="Volume" VALUE="-3400">';
	returnval += '<PARAM NAME="ShowCaptioning" VALUE="0">';
	returnval += '<PARAM NAME="TransparentAtStart" value="0">';
	returnval += '<EMBED invokeURLs="false" type="application/x-mpPlayerOnPlayBtn_div" pluginspage="http://www.microsoft.com/Windows/Downloads/Contents/Products/MediaPlayer/" id="MediaPlayer" Name="MediaPlayer" DisplaySize="4" AutoSize="1" ShowControls="0" ShowDisplay="0" ShowStatusBar="1" autostart="1"></EMBED>';
	returnval += '</OBJECT>';	
	
	return returnval;
}

function winMediaPlayer(s){
	var returnval = "";
	
	returnval= '<OBJECT ID="MediaPlayer" Name="MediaPlayer" classid="clsid:22D6F312-B0F6-11D0-94AB-0080C74C7E95" codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701" standby="Loading Microsoft Windows Media Player components..." type="application/x-mplayer2" bgcolor="DarkBlue" ';
	returnval +=' width="303" Height="251" >';
	returnval += '<PARAM NAME="AutoStart" VALUE="0">';
	returnval += '<PARAM NAME="AutoSize" VALUE="1">';
	returnval += '<PARAM NAME="AnimationAtStart" VALUE="0">';
	returnval += '<param name="fullScreen" value="0">';
	returnval += '<PARAM NAME="DisplayMode" VALUE="4">';
	returnval += '<PARAM NAME="Enabled" VALUE="1">';
	returnval += " <param name=\"Filename\" value=\""+ s +"\">";
	returnval += '<PARAM NAME="ShowControls" VALUE="1">';
	returnval += '<PARAM NAME="ShowAudioControls" VALUE="1">';
	returnval += '<PARAM NAME="ShowDisplay" VALUE="0">';
	returnval += '<PARAM NAME="ShowGotoBar" VALUE="0">';
	returnval += '<PARAM NAME="ShowPositionControls" VALUE="1">';
	returnval += '<PARAM NAME="ShowStatusBar" VALUE="0">';
	returnval += '<PARAM NAME="Volume" VALUE="10">';
	returnval += '<PARAM NAME="ShowCaptioning" VALUE="0">';
	returnval += '<PARAM NAME="TransparentAtStart" value="0">';
	returnval += '<EMBED invokeURLs="false" type="application/x-mpPlayerOnPlayBtn_div" pluginspage="http://www.microsoft.com/Windows/Downloads/Contents/Products/MediaPlayer/" id="MediaPlayer" Name="MediaPlayer" DisplaySize="4" AutoSize="1" ShowControls="0" ShowDisplay="0" ShowStatusBar="1" autostart="1"></EMBED>';
	returnval += '</OBJECT>';	
	
	return returnval;
}

// write document contents
function documentWrite(src){
	document.write(src);
}

//*****************************************************************************
//Description : POPUP Print
//Parameter: /include/ ¿¡ ÀÖ´Â page_name, width, height
//Return: ÆË¾÷ ÆäÀÌÁö¿¡¼­´Â print() ¸Þ¼­µå¸¦ È£ÃâÇÏ¸é µÊ
//Usage:
//*****************************************************************************
function go_print(page_name, width, height)
{
 var url = '/include/'+ page_name;
 var a;
 if( navigator.appName.indexOf("Microsoft") > -1 ){         
	 //alert("MS");
	 a = window.open(url, 'popup_comment', 'width='+width+', height='+height+', top=1, left=1, alwaysRaised=yes, toolbar=no, scrollbars=yes');  

 }else{
    // ÀÍ½ºÇÃ·Î·¯°¡ ¾Æ´Ò °æ¿ì
	 //alert("FIREFOX");
	 var width = width;
	 a = window.open(url, 'popup_comment', 'width='+ width +', height='+height+', top=1, left=1, alwaysRaised=yes, toolbar=no, scrollbars=yes');
 }

}


//*****************************************************************************
//Description : Print
//Parameter: 
//Return: ÆË¾÷ ÆäÀÌÁö¿¡¼­´Â print() ¸Þ¼­µå¸¦ È£ÃâÇÏ¸é µÊ
//Usage:
//*****************************************************************************
function printWindow()
{	
	var bV = parseInt(navigator.appVersion);
	if (bV >= 4) window.print();
	
}




//*****************************************************************************
//Description : ÆîÃÄº¸±â / ´Ý±â¹öÆ° 
//Parameter: 
//Return: 
//Usage:
//*****************************************************************************
function View(val) {

	sub1 = document.getElementById("drop01_0" + val);

	if (sub1.style.display == "") {
		sub1.style.display = "block";
		//sub1.style.font-weight = "bold";
		setImage("/common/images/common/vi_con03_type01_close.gif",val);
			
	}else{
		sub1.style.display = "none";
		//sub1.style.font-weight = "";
		setImage("/common/images/common/vi_con03_type01_close.gif",val);
	}	 
}

function setImage(image_url, val){
	  var tg = document.getElementById("viewImage"+val);
	  if(tg){
	    tg.src = image_url;
	    //tg.title = "´Ý±â";
	  }
	}


//*****************************************************************************
//Description : Æ¯¼ö ¹®ÀÚ Ã¼Å©
//Parameter:
//Return:
//Usage:
//*****************************************************************************
function chkSpeChar(oInputCtrl) {
	//var speChar = "`~!#$%^&*+=|\\[]{}:;-,<>/?'\"";	
	//var speChar = "`%^\/|\\{}:;<>-+'\"";
	//var speChar = "`%^\/|\\{};<>-+'\"";
	var speChar = "&`%^\|\\{};<>+'\"";
	for(var iCnt = 0; iCnt < speChar.length; iCnt++) {
		special = speChar.substr(iCnt, 1);
		if(oInputCtrl.value.indexOf(special) != -1) {
			alert("Æ¯¼ö¹®ÀÚ[" + special + "]¸¦ ÀÔ·Â ÇÒ ¼ö ¾ø½À´Ï´Ù.");
			oInputCtrl.focus();
			//oInputCtrl.value = "";			
			return true;
		}
	}
	return false;	
}

function checkSpeChar(oInputCtrl,alert_msg) {
	//var speChar = "`%^\/|\\{}:;<>-+'\"";
	//var speChar = "`%^\/|\\{};<>-+'\"";
	var speChar = "&`%^\/|\\{};<>+'\"";
	for(var iCnt = 0; iCnt < speChar.length; iCnt++) {
		special = speChar.substr(iCnt, 1);
		if(oInputCtrl.value.indexOf(special) != -1) {
			alert(alert_msg+"¿¡ Æ¯¼ö¹®ÀÚ[" + special + "]¸¦ ÀÔ·Â ÇÒ ¼ö ¾ø½À´Ï´Ù.");
			oInputCtrl.focus();
			return true;
		}
	}
	return false;
}

