function playflash(file,width,height){
        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="'+width+'" height="'+height+'">');  //ÇÃ·¡½¬ÇÃ·¹ÀÌ¾î ¹öÀüÀÌ ÀÌÀü¹öÀüÀÏ°æ¿ì ¹öÀü 8À» º¯°æ
        document.write('<param name="movie" value="'+file+'" />');
        document.write('<param name="quality" value="high" />');
		document.write('<param name="wmode" value="transparent" />');  //Åõ¸íÇÃ·¡½¬°¡ ¾Æ´Ò°æ¿ì ÀÌ ¶óÀÎÀ» »èÁ¦
		document.write('<param name="menu" value="false" />');	//ÇÃ·¡½¬ ¸¶¿ì½º¿À¸¥ÂÊ¸Þ´º¿¡ È®´ë,Ãà¼Ò  ¾ø¾Ö±â
        document.write('<embed src="'+file+'" quality="high" width="'+width+'" height="'+height+'" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />');
        document.write('</object>')
}

function flashmovie1(file_name, width, height)
{
	var sTag = "";
	sTag = "<OBJECT classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' width='"+width+"' height='"+height+"' codebase='http://active.macromedia.com/flash2/cabs/swflash.cab#version=4,0,0,0' id=ShockwaveFlash1>" +
			"<param name='movie' value='"+file_name+"' >" +
			"<PARAM NAME=quality VALUE=high>" +
//			"<PARAM NAME=bgcolor VALUE=#000000>" +
			"<EMBED src='"+file_name+"' quality='high' bgcolor='#000000' WIDTH='"+width+"' HEIGHT='"+height+"' TYPE='application/x-shockwave-flash' PLUGINSPAGE='http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash'></EMBED>" +
		   " </object>";

	document.write(sTag);
}

function flashmovie2(file_name, width, height)
{
	var sTag = "";
	sTag = "<OBJECT classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' width='"+width+"' height='"+height+"' codebase='http://active.macromedia.com/flash2/cabs/swflash.cab#version=4,0,0,0' id=ShockwaveFlash1>" +
			"<param name='movie' value='"+file_name+"' >" +
			"<PARAM NAME=quality VALUE=high>" +
			"<param name=wmode value=transparent>" +
		"<PARAM NAME=bgcolor VALUE=#000000>" +
			"<EMBED src='"+file_name+"' quality='high' bgcolor='#000000' WIDTH='"+width+"' HEIGHT='"+height+"' TYPE='application/x-shockwave-flash' PLUGINSPAGE='http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash'></EMBED>" +
		   " </object>";

	document.write(sTag);
}

function flashmovie3(file_name, width, height)
{
	var sTag = "";
	sTag = "<OBJECT classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' width='"+width+"' height='"+height+"' codebase='http://active.macromedia.com/flash2/cabs/swflash.cab#version=4,0,0,0' id=ShockwaveFlash1>" +
			"<param name='movie' value='"+file_name+"' >" +
			"<PARAM NAME=quality VALUE=high>" +
			"<EMBED src='"+file_name+"' quality='high' bgcolor='#ffffff' WIDTH='"+width+"' HEIGHT='"+height+"' TYPE='application/x-shockwave-flash' PLUGINSPAGE='http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash'></EMBED>" +
		   " </object>";

	document.write(sTag);
}

function activemovie2(file_name, width, height)
{
	var sTag = "";
	sTag = "<object align='middle' classid='CLSID:22D6F312-B0F6-11D0-94AB-0080C74C7E95' codeBase width='"+width+"' height='"+height+"' id='Player' type='application/x-oleobject' standby='Loading Microsoft Windows Media Player components...' VIEWASTEXT>" +
	"<param name='Filename' value='"+file_name+"'>" +
	"<param NAME='AudioStream' VALUE='-1'>" +
	"<param NAME='AutoSize' VALUE='0'>" +
	"<param NAME='AutoStart' VALUE='-1'>" +
	"<param NAME='AnimationAtStart' VALUE='0'>" +
	"<param NAME='AllowScan' VALUE='-1'>" +
	"<param NAME='AutoResize' value='-1'>" +
	"<param NAME='AllowChangeDisplaySize' VALUE='true'>" +
	"<param NAME='AutoRewind' VALUE='0'>" +
	"<param NAME='Balance' VALUE='0'>" +
	"<param NAME='BaseURL' VALUE>" +
	"<param name='BufferingTime' value='5'>" +
	"<param NAME='CaptioningID' VALUE>" +
	"<param NAME='ClickToPlay' VALUE='-1'>" +
	"<param NAME='CursorType' VALUE='0'>" +
	"<param NAME='CurrentPosition' VALUE='-1'>" +
	"<param NAME='CurrentMarker' VALUE='-1'>" +
	"<param NAME='DefaultFrame' VALUE='1'>" +
	"<param NAME='DisplayBackColor' VALUE='0'>" +
	"<param NAME='DisplayForeColor' VALUE='16777215'>" +
	"<param NAME='DisplayMode' VALUE='true'>" +
	"<param NAME='DisplaySize' VALUE='true'>" +
	"<param NAME='Enabled' VALUE='-1'>" +
	"<param NAME='EnableContextMenu' VALUE='-1'>" +
	"<param NAME='EnablePositionControls' VALUE='-1'>" +
	"<param NAME='EnableFullScreenControls' VALUE='0'>" +
	"<param NAME='EnableTracker' VALUE='-1'>" +
	"<param NAME='InvokeURLs' VALUE='-1'>" +
	"<param NAME='Language' VALUE='-1'>" +
	"<param NAME='Mute' VALUE='0'>" +
	"<param NAME='PlayCount' VALUE='1'>" +
	"<param NAME='PreviewMode' VALUE='0'>" +
	"<param NAME='Rate' VALUE='1'>" +
	"<param NAME='SAMILang' VALUE>" +
	"<param NAME='SAMIStyle' VALUE>" +
	"<param NAME='SAMIFileName' VALUE>" +
	"<param NAME='SelectionStart' VALUE='-1'>" +
	"<param NAME='SelectionEnd' VALUE='-1'>" +
	"<param NAME='SendOpenStateChangeEvents' VALUE='-1'>" +
	"<param NAME='SendWarningEvents' VALUE='-1'>" +
	"<param NAME='SendErrorEvents' VALUE='-1'>" +
	"<param NAME='SendKeyboardEvents' VALUE='0'>" +
	"<param NAME='SendMouseClickEvents' VALUE='0'>" +
	"<param NAME='SendMouseMoveEvents' VALUE='0'>" +
	"<param NAME='SendPlayStateChangeEvents' VALUE='-1'>" +
	"<param NAME='ShowCaptioning' VALUE='0'>" +
	"<param NAME='ShowControls' VALUE='1'>" +
	"<param NAME='ShowAudioControls' VALUE='1'>" +
	"<param NAME='ShowDisplay' VALUE='0'>" +
	"<param NAME='ShowGotoBar' VALUE='0'>" +
	"<param NAME='ShowPositionControls' VALUE='1'>" +
	"<param NAME='ShowStatusBar' VALUE='1'>" +
	"<param NAME='ShowTracker' VALUE='1'>" +
	"<param NAME='TransparentAtStart' VALUE='1'>" +
	"<param NAME='VideoBorderWidth' VALUE='0'>" +
	"<param NAME='VideoBorderColor' VALUE='0'>" +
	"<param NAME='VideoBorder3D' VALUE='0'>" +
	"<param NAME='Volume' VALUE='-200'>" +
	"</object>"

	document.write(sTag);
}

function activemovie3(file_name, width, height)
{
	var sTag = "";
	sTag = "<object align='top' CLASSID='CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6' codebase='http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2.inf.cab#Version=5,1,52,701' width='"+width+"' height='"+height+"'' id='Player' name='Player'>" +
			"<param name='URL' value='"+file_name+"' >" +
			"<PARAM NAME=uimode VALUE=none>" +
			"<PARAM NAME=autostart VALUE=false>" +
			"<EMBED src='"+file_name+"' quality='high' bgcolor='#000000' WIDTH='"+width+"' HEIGHT='"+height+"' TYPE='application/x-shockwave-flash' PLUGINSPAGE='http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash'></EMBED>" +
		   " </object>";

	document.write(sTag);
}

function play_mp3(file_name, width, height)
{
	var sTag = "";
	sTag = "<object align='middle' classid='CLSID:22D6F312-B0F6-11D0-94AB-0080C74C7E95'  width='"+width+"' height='"+height+"'' id='Player' type='application/x-oleobject' standby='Loading Microsoft Windows Media Player components...' VIEWASTEXT>" +
           "<param name='Filename' value='"+file_name+"'>" +
           "<param NAME='AudioStream' VALUE='-1'>" +
           "<param NAME='AutoSize' VALUE='-1'>" +
           "<param NAME='AutoStart' VALUE='-1'>" +
           "<param NAME='AnimationAtStart' VALUE='-1'>" +
           "<param NAME='AllowScan' VALUE='-1'>" +
           "<param NAME='AllowChangeDisplaySize' VALUE='-1'>" +
           "<param NAME='AutoRewind' VALUE='0'>" +
           "<param NAME='Balance' VALUE='0'>" +
           "<param NAME='BaseURL' VALUE>" +
           "<param NAME='CaptioningID' VALUE>" +
           "<param NAME='ClickToPlay' VALUE='-1'>" +
           "<param NAME='CursorType' VALUE='0'>" +
           "<param NAME='CurrentPosition' VALUE='-1'>" +
           "<param NAME='CurrentMarker' VALUE='-1'>  " +
           "<param NAME='DefaultFrame' VALUE='1'>" +
           "<param NAME='DisplayBackColor' VALUE='0'>" +
           "<param NAME='DisplayForeColor' VALUE='16777215'>" +
           "<param NAME='DisplayMode' VALUE='0'>" +
           "<param NAME='DisplaySize' VALUE='0'>" +
           "<param NAME='Enabled' VALUE='-1'>" +
           "<param NAME='EnableContextMenu' VALUE='-1'>" +
           "<param NAME='EnablePositionControls' VALUE='-1'>" +
           "<param NAME='EnableFullScreenControls' VALUE='0'>" +
           "<param NAME='EnableTracker' VALUE='-1'>" +
           "<param NAME='InvokeURLs' VALUE='-1'>" +
           "<param NAME='Language' VALUE='-1'>" +
           "<param NAME='Mute' VALUE='0'>" +
           "<param NAME='PlayCount' VALUE='1'>" +
           "<param NAME='PreviewMode' VALUE='0'>" +
           "<param NAME='Rate' VALUE='1'>" +
           "<param NAME='SAMILang' VALUE>" +
           "<param NAME='SAMIStyle' VALUE>" +
           "<param NAME='SAMIFileName' VALUE>" +
           "<param NAME='SelectionStart' VALUE='-1'>" +
           "<param NAME='SelectionEnd' VALUE='-1'>" +
           "<param NAME='SendOpenStateChangeEvents' VALUE='-1'>" +
           "<param NAME='SendWarningEvents' VALUE='-1'>" +
           "<param NAME='SendErrorEvents' VALUE='-1'>" +
           "<param NAME='SendKeyboardEvents' VALUE='0'>" +
           "<param NAME='SendMouseClickEvents' VALUE='0'>" +
           "<param NAME='SendMouseMoveEvents' VALUE='0'>" +
           "<param NAME='SendPlayStateChangeEvents' VALUE='-1'>" +
           "<param NAME='ShowCaptioning' VALUE='0'>" +
           "<param NAME='ShowControls' VALUE='1'>" +
           "<param NAME='ShowAudioControls' VALUE='1'>" +
           "<param NAME='ShowDisplay' VALUE='0'>" +
           "<param NAME='ShowGotoBar' VALUE='0'>" +
           "<param NAME='ShowPositionControls' VALUE='1'>" +
           "<param NAME='ShowStatusBar' VALUE='1'>" +
           "<param NAME='ShowTracker' VALUE='1'>" +
           "<param NAME='TransparentAtStart' VALUE='1'>" +
           "<param NAME='VideoBorderWidth' VALUE='0'>" +
           "<param NAME='VideoBorderColor' VALUE='0'>" +
           "<param NAME='VideoBorder3D' VALUE='0'>" +
           "<param NAME='Volume' VALUE='-200'>" +
                  "</object>"
					 
	document.write(sTag);
}

function activemovieMain()
{
	var sTag = "";
	sTag =  "<OBJECT ID='Player' Name='Player' 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-oleobject ' width='319' Height='239' VIEWASTEXT>" +
	"<PARAM NAME='AutoStart' VALUE='1'>" +
	"<PARAM NAME='AutoSize' VALUE='1'>" +
	"<PARAM NAME='AnimationAtStart' VALUE='0'>" +
	"<PARAM NAME='DisplayMode' VALUE='4'>" +
	"<PARAM NAME='Enabled' VALUE='1'>" +
	"<PARAM NAME='ShowControls' VALUE='0'>" +
	"<PARAM NAME='ShowAudioControls' VALUE='0'>" +
	"<PARAM NAME='ShowDisplay' VALUE='0'>" +
	"<PARAM NAME='ShowGotoBar' VALUE='0'>" +
	"<PARAM NAME='ShowPositionControls' VALUE='0'>" +
	"<PARAM NAME='ShowStatusBar' VALUE='0'>" +
	"<PARAM NAME='Volume' VALUE='50'>" +
	"<PARAM NAME='ShowCaptioning' VALUE='0'>" +
	"<PARAM NAME='TransparentAtStart' value='1'>" +
	"<EMBED invokeURLs='false' type='application/x-mplayer2' bgcolor='#FFFFFF' pluginspage='http://www.microsoft.com/Windows/Downloads/Contents/Products/MediaPlayer/' id='Player' Name='Player' DisplaySize='4' AutoSize='1' ShowControls='0' ShowDisplay='0' ShowStatusBar='1' autostart='1'>" +
	"</EMBED>" +
	"</OBJECT>";

	document.write(sTag);
}

function activemovieMain2()
{
	var sTag = "";
	sTag =  "<OBJECT ID='Player' Name='Player' 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-oleobject ' width='400' Height='300' VIEWASTEXT>" +
	"<PARAM NAME='AutoStart' VALUE='1'>" +
	"<PARAM NAME='AutoSize' VALUE='1'>" +
	"<PARAM NAME='AnimationAtStart' VALUE='0'>" +
	"<PARAM NAME='DisplayMode' VALUE='4'>" +
	"<PARAM NAME='Enabled' VALUE='1'>" +
	"<PARAM NAME='ShowControls' VALUE='0'>" +
	"<PARAM NAME='ShowAudioControls' VALUE='0'>" +
	"<PARAM NAME='ShowDisplay' VALUE='0'>" +
	"<PARAM NAME='ShowGotoBar' VALUE='0'>" +
	"<PARAM NAME='ShowPositionControls' VALUE='0'>" +
	"<PARAM NAME='ShowStatusBar' VALUE='0'>" +
	"<PARAM NAME='Volume' VALUE='50'>" +
	"<PARAM NAME='ShowCaptioning' VALUE='0'>" +
	"<PARAM NAME='TransparentAtStart' value='1'>" +
	"<EMBED invokeURLs='false' type='application/x-mplayer2' bgcolor='#FFFFFF' pluginspage='http://www.microsoft.com/Windows/Downloads/Contents/Products/MediaPlayer/' id='Player' Name='Player' DisplaySize='4' AutoSize='1' ShowControls='0' ShowDisplay='0' ShowStatusBar='1' autostart='1'>" +
	"</EMBED>" +
	"</OBJECT>";

	document.write(sTag);
}

function activemovieMain12()
{
	var sTag = "";
	sTag =  "<OBJECT ID='Player' Name='Player' 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-oleobject ' width='544' Height='306' VIEWASTEXT>" +
	"<PARAM NAME='AutoStart' VALUE='1'>" +
	"<PARAM NAME='AutoSize' VALUE='1'>" +
	"<PARAM NAME='AnimationAtStart' VALUE='0'>" +
	"<PARAM NAME='DisplayMode' VALUE='4'>" +
	"<PARAM NAME='Enabled' VALUE='1'>" +
	"<PARAM NAME='ShowControls' VALUE='0'>" +
	"<PARAM NAME='ShowAudioControls' VALUE='0'>" +
	"<PARAM NAME='ShowDisplay' VALUE='0'>" +
	"<PARAM NAME='ShowGotoBar' VALUE='0'>" +
	"<PARAM NAME='ShowPositionControls' VALUE='0'>" +
	"<PARAM NAME='ShowStatusBar' VALUE='0'>" +
	"<PARAM NAME='Volume' VALUE='50'>" +
	"<PARAM NAME='ShowCaptioning' VALUE='0'>" +
	"<PARAM NAME='TransparentAtStart' value='1'>" +
	"<EMBED invokeURLs='false' type='application/x-mplayer2' bgcolor='#FFFFFF' pluginspage='http://www.microsoft.com/Windows/Downloads/Contents/Products/MediaPlayer/' id='Player' Name='Player' DisplaySize='4' AutoSize='1' ShowControls='0' ShowDisplay='0' ShowStatusBar='1' autostart='1'>" +
	"</EMBED>" +
	"</OBJECT>";

	document.write(sTag);
}

function activemovieMain3()
{
	var sTag = "";
	sTag =  "<OBJECT ID='Player' Name='Player' 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-oleobject ' width='680' Height='384' VIEWASTEXT>" +
	"<PARAM NAME='AutoStart' VALUE='1'>" +
	"<PARAM NAME='AutoSize' VALUE='1'>" +
	"<PARAM NAME='AnimationAtStart' VALUE='0'>" +
	"<PARAM NAME='DisplayMode' VALUE='4'>" +
	"<PARAM NAME='Enabled' VALUE='1'>" +
	"<PARAM NAME='ShowControls' VALUE='0'>" +
	"<PARAM NAME='ShowAudioControls' VALUE='0'>" +
	"<PARAM NAME='ShowDisplay' VALUE='0'>" +
	"<PARAM NAME='ShowGotoBar' VALUE='0'>" +
	"<PARAM NAME='ShowPositionControls' VALUE='0'>" +
	"<PARAM NAME='ShowStatusBar' VALUE='0'>" +
	"<PARAM NAME='Volume' VALUE='50'>" +
	"<PARAM NAME='ShowCaptioning' VALUE='0'>" +
	"<PARAM NAME='TransparentAtStart' value='1'>" +
	"<EMBED invokeURLs='false' type='application/x-mplayer2' bgcolor='#FFFFFF' pluginspage='http://www.microsoft.com/Windows/Downloads/Contents/Products/MediaPlayer/' id='Player' Name='Player' DisplaySize='4' AutoSize='1' ShowControls='0' ShowDisplay='0' ShowStatusBar='1' autostart='1'>" +
	"</EMBED>" +
	"</OBJECT>";

	document.write(sTag);
}

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; }
}

function CenterWin(url,winname,features) 
{ 
	features = features.toLowerCase(); 
	len = features.length; 
	sumchar= ""; 
	
	for (i=1; i <= len; i++) // ºóÄ­ Á¦°Å 
	{ 
		onechar = features.substr(i-1, 1); 
		if (onechar != " ") sumchar += onechar; 
	} 
	
	features = sumchar; 
	sp = new Array(); 
	sp = features.split(',', 10); // ¹è¿­¿¡ ¿É¼ÇÀ» ºÐ¸®ÇØ¼­ ÀÔ·Â 
	splen = sp.length; // ¹è¿­ °¹¼ö 
	
	for (i=0; i < splen; i++) // width, height °ªÀ» ±¸ÇÏ±â À§ÇÑ ºÎºÐ 
	{ 
		if (sp[i].indexOf("width=") == 0) // width °ªÀÏ¶§ 
		{ 
			width = Number(sp[i].substring(6)); 
		}
		else if (sp[i].indexOf("height=") == 0) // height °ªÀÏ¶§ 
		{ 
			height = Number(sp[i].substring(7)); 
		} 
	} 
	
	sleft = (screen.width - width) / 2; 
	stop = (screen.height - height) / 2; 
	features = features + ",left=" + sleft + ",top=" + stop; 
	popwin = window.open(url,winname,features); 
} 

function onlyNumber()
{
	 if((event.keyCode<48)||(event.keyCode>57))
	 event.returnValue=false
} 

function checkNum(obj)
{
	var kc = event.keyCode;
	if((kc < 48 || kc > 57) && (kc < 96 || kc > 105) && (kc != 8 && kc != 9))
	{                  
		alert('¼ýÀÚ¸¸ ÀÔ·ÂÇÒ ¼ö ÀÖ½À´Ï´Ù.');  
		obj.focus();
		window.event.returnValue = false;                
	}
}

function email_chk(str,email) 
{
	var invalidChars = "\"|&;<>!*\'\\";
	for (var i = 0; i < invalidChars.length; i++)
	{
		if (email.indexOf(invalidChars.charAt ) != -1)
		{
			alert("Àß¸øµÈ ÀÌ¸ÞÀÏ ÁÖ¼ÒÀÔ´Ï´Ù.");
			str.value="";
			return false;
		}
	}
	
	if (email.indexOf("@")==-1)
	{
		alert("Àß¸øµÈ ÀÌ¸ÞÀÏ ÁÖ¼ÒÀÔ´Ï´Ù. '@'°¡ ¾ø½À´Ï´Ù..");
		str.value="";
		return false;
	}
	
	if (email.indexOf(" ") != -1)
	{
		alert("Àß¸øµÈ ÀÌ¸ÞÀÏ ÁÖ¼ÒÀÔ´Ï´Ù.");
		str.value="";
		return false;
	}
	
	if (window.RegExp)
	{
		var reg1str = "(@.*@)|(\\.\\.)|(@\\.)|(\\.@)|(^\\.)";
		var reg2str = "^.+\\@(\\[?)[a-zA-Z0-9\\-\\.]+\\.([a-zA-Z]{2,3}|[0-9]{1,3})(\\]?)$";
		var reg1 = new RegExp (reg1str);
		var reg2 = new RegExp (reg2str);
		
		if (reg1.test(email) || !reg2.test(email)) 
		{
			alert("Àß¸øµÈ ÀÌ¸ÞÀÏ ÁÖ¼ÒÀÔ´Ï´Ù.");
			str.value="";
			return false;
		}
	}
} 

function nextFocus(arg, len, nextname)
{
	if (arg.value.length == len)
	{
		nextname.focus ();
		return;
	}
}


focusColorAll.color = '#f7f5ea';

function focusColorAll(strId)
{ 
	var objParent = document.getElementById(strId);
	
	var arrInput = document.forms[strId].elements;
	
	for(var i=0; i<arrInput.length; i++)
	{
		var objSrc = arrInput[i];
		
		if(objSrc.type == 'text' || objSrc.type == 'textarea')
		{
			objSrc.onfocus = function()
			{  
				focusColorAll.oldcolor = this.style.backgroundColor;
				this.style.backgroundColor = focusColorAll.color;
			}
			
			objSrc.onblur = function()
			{  
				this.style.backgroundColor = focusColorAll.oldcolor;
			}
		}
	}
}


function uploadCheck(obj)
{
	// ¼±ÅÃÆÄÀÏÀÇ °æ·Î¸¦ ºÐ¸®ÇÏ¿© È®ÀåÀÚ¸¦ ±¸ÇÕ´Ï´Ù.
	pathpoint = obj.lastIndexOf('.');
	filepoint = obj.substring(pathpoint+1,obj.length);
	filetype = filepoint.toLowerCase();
	
	// È®ÀåÀÚ°¡ ÀÌ¹ÌÁö ÆÄÀÏÀÌ¸é Ã¼Å©¸¦ À§ÇØ ÀÓ½Ã·Î ·ÎµùÇÕ´Ï´Ù.
	if(filetype == 'jpg' || filetype == 'gif' || filetype == 'png' || filetype == 'jpeg' || filetype == 'bmp') 
	{
	}
	else
	{
		alert("ÀÌ¹ÌÁö ÆÄÀÏ¸¸ ¾÷·ÎµåÇÒ ¼ö ÀÖ½À´Ï´Ù.");
		return false;
	}
}

function fileCheck(obj) 
{
	// ¼±ÅÃÆÄÀÏÀÇ °æ·Î¸¦ ºÐ¸®ÇÏ¿© È®ÀåÀÚ¸¦ ±¸ÇÕ´Ï´Ù.
	pathpoint = obj.lastIndexOf('.');
	filepoint = obj.substring(pathpoint+1,obj.length);
	filetype = filepoint.toLowerCase();
	
	// È®ÀåÀÚ°¡ ÀÌ¹ÌÁö ÆÄÀÏÀÌ¸é »çÀÌÁî¸¦ Ã¼Å©ÇÕ´Ï´Ù.
	if(filetype=='jpg' || filetype=='gif' || filetype=='png' || filetype=='jpeg' || filetype=='bmp') 
	{
		/*var wwd=200;  //Á¦ÇÑÇÒÀÌ¹ÌÁö°¡·Î»çÀÌÁî
		var hhd=100;  //Á¦ÇÑÇÒÀÌ¹ÌÁö¼¼·Î»çÀÌÁî
		
		ImageWidth=document.F.preview.width; //ÀÌ¹ÌÁöÀÇ°¡·Î»çÀÌÁîÃ¼Å© 
		ImageHeight=document.F.preview.height; //ÀÌ¹ÌÁöÀÇ¼¼·Î»çÀÌÁîÃ¼Å©
		
		//ÀÌ¹ÌÁö°¡·Î»çÀÌÁî°¡ÁöÁ¤ÇÑ»çÀÌÁîº¸´ÙÅ¬¶§¸Þ¼¼Áö¿ÍÇÔ²²ÆûÀü¼ÛÀ»ÁßÁöÇÕ´Ï´Ù.   
		if(ImageWidth > wwd)
		{  
			alert('Ã·ºÎÇÑ ÀÌ¹ÌÁöÀÇ °¡·Î»çÀÌÁî´Â'+ImageWidth+'ÀÔ´Ï´Ù.\n\nÀÌ¹ÌÁöÀÇ°¡·Î»çÀÌÁî´Â'+wwd+'ÀÌÇÏ¿©¾ßÇÕ´Ï´Ù.');
			return false;
		}
		
		//ÀÌ¹ÌÁö¼¼·Î»çÀÌÁî°¡ÁöÁ¤ÇÑ»çÀÌÁîº¸´ÙÅ¬¶§¸Þ¼¼Áö¿ÍÇÔ²²ÆûÀü¼ÛÀ»ÁßÁöÇÕ´Ï´Ù.
		if(ImageHeight > hhd)
		{  
			alert('Ã·ºÎÇÑ ÀÌ¹ÌÁöÀÇ ¼¼·Î»çÀÌÁî´Â'+ImageHeight+'ÀÔ´Ï´Ù.\n\nÀÌ¹ÌÁöÀÇ¼¼·Î»çÀÌÁî´Â'+hhd+'ÀÌÇÏ¿©¾ßÇÕ´Ï´Ù.');
			return false;
		}*/
	}
	else
	{
		// ¾÷ÆÄÀÏÀÌ ÀÌ¹ÌÁöÈ®ÀåÀÚ°¡ ¾Æ´Ò°æ¿ì °æ°í¸¦ ÁÝ´Ï´Ù.
		alert('ÀÌ¹ÌÁö ÆÄÀÏ¸¸ ¾÷·Îµå ÇÏ½Ç¼ö ÀÖ½À´Ï´Ù.');
		return false;
	}
	
	// ÀÌ¹ÌÁö È®ÀåÀÚÀÌÁö¸¸ BMP È®ÀåÀÚ¶ó¸é ÀÏ´Ü °æ°í¸¦ ÁØ´Ù.
	if(filetype=='bmp') 
	{
		upload = confirm('BMP ÆÄÀÏÀº À¥»ó¿¡¼­ »ç¿ëÇÏ±â¿£ ÀûÀýÇÑ ÀÌ¹ÌÁö Æ÷¸ËÀÌ ¾Æ´Õ´Ï´Ù.\n±×·¡µµ °è¼Ó ÇÏ½Ã°Ú½À´Ï±î?');
		if(!upload) return false;
	}
}


function selChoice(str1, str2)
{ 
	var str1 = str1;
	var selBox = document.getElementById(str2); 

	for(var i = 0 ; selBox.options.length ; i++) 
	{ 
		if(selBox.options[i].value == str1) 
		{ 
			selBox.options[i].selected = true; 
			break; 
		} 
	} 
} 


//--------------------¼ýÀÚ¿¡ ÄÞ¸¶Âï±â
//[] <--¹®ÀÚ ¹üÀ§ [^] <--ºÎÁ¤ [0-9] <-- ¼ýÀÚ  
//[0-9] => \d , [^0-9] => \D
var rgx1 = /\D/g;  // /[^0-9]/g ¿Í °°Àº Ç¥Çö
var rgx2 = /(^[+-]?\d+)(\d{3})/; 

function getNumber(obj){
	
     var num01;
     var num02;
     num01 = obj.value;
     num02 = num01.replace(rgx1,"");
     num01 = setComma(num02);
     obj.value =  num01;

}

function setComma(inNum){
     
     var outNum;
     outNum = inNum; 
     while (rgx2.test(outNum)) {
          outNum = outNum.replace(rgx2, '$1' + ',' + '$2');
      }
     return outNum;

}
//³¡



function showcontent(num){	
	window.open("/vod/play_Ondemand.asp?vdCode=" + num, "play", "scrollbars=0 , status=0, menubar=0, toolbar=0,width=538, height=511");
}

function livecontent(num){	
	window.open("/vod/play_Live.asp?lvCode=" + num, "play", "scrollbars=0 , status=0, menubar=0, toolbar=0,width=538, height=511");
}

function winOpenSSO(gate,appid,retUrl,failUrl) {
	var winOption="toolbar=no, location=no, directories=no, status=no, menubar=no, resizable=yes, scollbars=yes, width=700, height=800, left=0, top=0";
	var myWin = window.open("","winSSO",winOption);

	var fullUrl = document.URL;  
	var protocal = fullUrl.substring(4,5); 
  
	if( "s" == protocal){
		protocal = "https://";
	}else{
		protocal = "http://";
	}
	var domain = protocal + document.domain;

	var frm=createForm("ssoform", "post", gate, "winSSO");
	frm=addHidden(frm, "app_id_target", appid);
	frm=addHidden(frm, "domain", domain);
	frm=addHidden(frm, "retUrl", retUrl);
	frm=addHidden(frm, "failUrl", failUrl);
	document.insertBefore(frm);
	
	frm.method="post";	
	frm.target="winSSO";	
	frm.submit();
}

function addHidden(f,n,v) {
  var i=document.createElement("input");
  i.type="hidden";
  i.name=n;
  i.value=v;
  f.insertBefore(i);
  return f;
}
function createForm(nm,mt,at,tg) {
  var f=document.createElement("form");
  f.name=nm;
  f.method=mt;
  f.action=at;
  f.target=tg;
  return f;
}


function httpRequest(reqType, url, respHandle){

    var request = init(); 
    var postData = arguments[3];
    
    if(request)  {
        request.onreadystatechange = processRequest; 
    } else {
        //alert("Your browser does not permit the use of all " + "of this application's features!");
    }

    function init() { 
        if(window.XMLHttpRequest){     //Mozilla-based browsers
            return new XMLHttpRequest();
        } else if (window.ActiveXObject){
            temp = new ActiveXObject("Msxml2.XMLHTTP"); 
            if (!temp){
                temp = new ActiveXObject("Microsoft.XMLHTTP");
            }
            return temp;
        }
    } 

    function processRequest () { 

        try{
            if(request.readyState == 4){
                if(request.status == 200){
                    var resp = request.responseText;
                    respHandle(request);    
                } else {
                    //request.status is 503  if the application isn't available; 
                    //500 if the application has a bug
                    
                    alert("A problem occurred with communicating between the XMLHttprequest object and the server program.");
                }
            }
        } catch (err)   {
            //alert(err.name);
            alert(request.status);
            //alert("It does not appear that the server is available for this application. Please"+ " try again very soon. \nError: "+err.message);
        }    

    } 

    this.doGet = function() { 
        
        request.open(reqType, url, true); 

        if(reqType.toLowerCase() == "post") {
            request.setRequestHeader("Content-Type", "application/x-www-form-urlencoded; charset=UTF-8");
            request.send(postData);
        }   else {
            request.send(null);
        }
    }
    
    this.doGet2 = function() { 
        
        request.open(reqType, url, false); 

        if(reqType.toLowerCase() == "post") {
            request.setRequestHeader("Content-Type", "application/x-www-form-urlencoded; charset=UTF-8");
            request.send(postData);
        }   else {
            request.send(null);
        }
    } 

}

function makeRequest(reqType, url, respHandle) { 
    var ai = new httpRequest(reqType, url, respHandle, arguments[3]); 
    ai.doGet(); 
} 

function makeRequest2(reqType, url, respHandle) { 
    var ai = new httpRequest(reqType, url, respHandle, arguments[3]); 
    ai.doGet2(); 
} 

function getNTP(){
	var ntpProcUrl = "/passniapi/passniapi/getNtp.asp";
	var postparam  = "";	    
	
	makeRequest2( "post", ntpProcUrl , fReceiveNtpResult, postparam );
}

function jsTrim(src)
{
	return src.replace(/\s/g, "")
}
var ntp="";
function fReceiveNtpResult(req_obj){	 
	 ntp = req_obj.responseText;	 
	 jsTrim(ntp);	 
}

function jPassniProcess() {	
		document.login_form_0.app_id.value 				= document.login_form_0.app_id.value;
		document.login_form_0.SSOMasterKey.value 	= document.login_form_0.SSOMasterKey.value;
		document.login_form_0.sso_authvnum.value 	= document.login_form_0.sso_authvnum.value;
		document.login_form_0.sso_authchk.value 		= document.login_form_0.sso_authchk.value;
		document.login_form_0.retUrl.value 					= document.login_form_0.retUrl.value;
		document.login_form_0.failUrl.value 					= document.login_form_0.failUrl.value;
		document.login_form_0.q.value 						= document.login_form_0.q.value;
		
		document.login_form_0.action 							= document.login_form_0.actionUrl.value;
		document.login_form_0.method						= "post";
		document.login_form_0.submit();
}
