function ShowFlash(obj,strMediaURL,obj_width,obj_height){
/*
	var myObjectElement = document.createElement('<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="' + obj_width + '" height="' + obj_height + '"></object>');

	var myParamElement1 = document.createElement('<param name="movie" value="' + strMediaURL + '">');  
	var myParamElement2 = document.createElement('<param name="quality" value="high">');

	myObjectElement.appendChild(myParamElement1);
	myObjectElement.appendChild(myParamElement2);

	obj.appendChild(myObjectElement);
*/
	document.write('<OBJECT CLASSID="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"\n');
	document.write('  CODEBASE="http://active.macromedia.com/flash4/cabs/swflash.cab#version=4,0,2,0" ID='+obj+'  WIDTH='+obj_width+' HEIGHT='+obj_height+'>\n');
	document.write('  <PARAM NAME="movie" VALUE="'+strMediaURL+'">\n');
	document.write('  <PARAM NAME=play VALUE=true>\n');
	document.write('  <PARAM NAME=loop VALUE=true>\n');
	document.write('  <PARAM NAME=menu VALUE=true>\n');
	document.write('  <PARAM NAME=quality VALUE=high>\n');
	document.write('  <EMBED SRC="'+strMediaURL+'" name='+obj+' type=application/x-shockwave-flash SWLiveConnect=TRUE play=true loop=false menu=false width='+obj_width+' height='+obj_height+' scale=showall quality=best salign=BR loop=true pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash"></EMBED>\n');
	document.write('</OBJECT>\n');
}

function ShowMovie(obj,strMediaURL,obj_width,obj_height){
//	var myObjectElement = document.createElement('<embed src="' + strMediaURL + '" width="' + obj_width + '" height="' + obj_height + '" autostart="true" onFocus="this.blur();"></embed>');

//	obj.appendChild(myObjectElement);

	document.writeln('<object id="' + obj + '" width="' + obj_width + '" height="' + obj_height + '" ');
	document.writeln('	classid="CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95" ');
	document.writeln('	codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=6,4,7,1112" ');
	document.writeln('	standby="Loading Microsoft Windows Media Player components..." ');
	document.writeln('	type="application/x-oleobject" align="middle">');
	document.writeln('<param name="src" value="' + strMediaURL + '">');
	document.writeln('<param name="FileName" value="' + strMediaURL + '">');
	document.writeln('<param name="ShowControls" value="ture">');
	document.writeln('<param name="ShowStatusBar" value="false">');
	document.writeln('<param name="ShowDisplay" value="false">');
	document.writeln('<param name="ShowPositionControls" value="true">');
	document.writeln('<param name="ShowAudioControls" value="true">');
	document.writeln('<param name="ShowTracker" value="true">');
	document.writeln('<param name="Volume" value="0">');
	document.writeln('<param name="DisplaySize" value="0">');
	document.writeln('<param name="AutoStart" value="true">');
	document.writeln('<param name="AutoRewind" value="true">');
	document.writeln('<embed type="application/x-mplayer2"');
	document.writeln('	pluginspage="http://www.microsoft.com/Windows/Downloads/Contents/Products/MediaPlayer/"');
	document.writeln('	name=MediaPlayer1');
	document.writeln('	showcontrols=1');
	document.writeln('	showstatusbar=0');
	document.writeln('	showdisplay=0');
	document.writeln('	showpositioncontrols=1');
	document.writeln('	showvolumecontrols=1');
	document.writeln('	showtracker=1');
	document.writeln('	volume=0');
	document.writeln('	displaysize=0');
	document.writeln('	autostart=1');
	document.writeln('	autorewind=1');
	document.writeln('	width=' + obj_width + '');
	document.writeln('	height=' + obj_height + '');
	document.writeln('	src="' + strMediaURL + '" filename="' + strMediaURL + '">');
	document.writeln('</embed>');
	document.writeln('</object>');
}

function ShowMusic(obj,obj_width,obj_height){
/*
	var myObjectElement = document.createElement('<object classid="clsid:22D6F312-B0F6-11D0-94AB-0080C74C7E95" width="' + obj_width + '" height="' + obj_height + '" vspace="1" hspace="1" align="middle" id="Music" style="left:0px;top:0px;"></object>');

	var myParamElement1 = document.createElement('<param name="AllowChangeDisplaySize" value="true">');
	var myParamElement2 = document.createElement('<param name="AllowScan" value="true">');
	var myParamElement3 = document.createElement('<param name="AnimationAtStart" value="true">');
	var myParamElement4 = document.createElement('<param name="AudioStream" value="-1">');
	var myParamElement5 = document.createElement('<param name="AutoRewind" value="true">');
	var myParamElement6 = document.createElement('<param name="AutoSize" value="false">');
	var myParamElement7 = document.createElement('<param name="AutoStart" value="true">');
	var myParamElement8 = document.createElement('<param name="Balance" value="0">');
	var myParamElement9 = document.createElement('<param name="BufferingTime" value="5">');
	var myParamElement10 = document.createElement('<param name="ClickToPlay" value="true">');
	var myParamElement11 = document.createElement('<param name="CurrentMarker" value="0">');
	var myParamElement12 = document.createElement('<param name="CurrentPosition" value="-1">');
	var myParamElement13 = document.createElement('<param name="CursorType" value="0">');
	var myParamElement14 = document.createElement('<param name="DisplayBackColor" value="0">');
	var myParamElement15 = document.createElement('<param name="DisplayForeColor" value="16777215">');
	var myParamElement16 = document.createElement('<param name="DisplayMode" value="0">');
	var myParamElement17 = document.createElement('<param name="DisplaySize" value="2">');
	var myParamElement18 = document.createElement('<param name="EnableContextMenu" value="true">');
	var myParamElement19 = document.createElement('<param name="Enabled" value="true">');
	var myParamElement20 = document.createElement('<param name="EnableFullScreenControls" value="false">');
	var myParamElement21 = document.createElement('<param name="EnablePositionControls" value="true">');
	var myParamElement22 = document.createElement('<param name="EnableTracker" value="true">');
	var myParamElement23 = document.createElement('<param name="InvokeURLs" value="true">');
	var myParamElement24 = document.createElement('<param name="Language" value="-1">');
	var myParamElement25 = document.createElement('<param name="Mute" value="false">');
	var myParamElement26 = document.createElement('<param name="PlayCount" value="1">');
	var myParamElement27 = document.createElement('<param name="PreviewMode" value="false">');
	var myParamElement28 = document.createElement('<param name="Rate" value="1">');
	var myParamElement29 = document.createElement('<param name="SelectionEnd" value="-1">');
	var myParamElement30 = document.createElement('<param name="SelectionStart" value="-1">');
	var myParamElement31 = document.createElement('<param name="SendErrorEvents" value="true">');
	var myParamElement32 = document.createElement('<param name="SendKeyboardEvents" value="false">');
	var myParamElement33 = document.createElement('<param name="SendMouseClickEvents" value="true">');
	var myParamElement34 = document.createElement('<param name="SendMouseMoveEvents" value="false">');
	var myParamElement35 = document.createElement('<param name="SendOpenStateChangeEvents" value="true">');
	var myParamElement36 = document.createElement('<param name="SendPlayStateChangeEvents" value="true">');
	var myParamElement37 = document.createElement('<param name="SendWarningEvents" value="true">');
	var myParamElement38 = document.createElement('<param name="ShowAudioControls" value="true">');
	var myParamElement39 = document.createElement('<param name="ShowCaptioning" value="false">');
	var myParamElement40 = document.createElement('<param name="ShowControls" value="true">');
	var myParamElement41 = document.createElement('<param name="ShowDisplay" value="false">');
	var myParamElement42 = document.createElement('<param name="ShowGotoBar" value="false">');
	var myParamElement43 = document.createElement('<param name="ShowPositionControls" value="true">');
	var myParamElement44 = document.createElement('<param name="ShowStatusBar" value="false">');
	var myParamElement45 = document.createElement('<param name="ShowTracker" value="true">');
	var myParamElement46 = document.createElement('<param name="TransparentAtStart" value="false">');
	var myParamElement47 = document.createElement('<param name="VideoBorder3D" value="true">');
	var myParamElement48 = document.createElement('<param name="VideoBorderColor" value="0">');
	var myParamElement49 = document.createElement('<param name="VideoBorderWidth" value="0">');
	var myParamElement50 = document.createElement('<param name="Volume" value="2000">');
	var myParamElement51 = document.createElement('<param name="WindowlessVideo" value="false">');

	myObjectElement.appendChild(myParamElement1);
	myObjectElement.appendChild(myParamElement2);
	myObjectElement.appendChild(myParamElement3);
	myObjectElement.appendChild(myParamElement4);
	myObjectElement.appendChild(myParamElement5);
	myObjectElement.appendChild(myParamElement6);
	myObjectElement.appendChild(myParamElement7);
	myObjectElement.appendChild(myParamElement8);
	myObjectElement.appendChild(myParamElement9);
	myObjectElement.appendChild(myParamElement10);
	myObjectElement.appendChild(myParamElement11);
	myObjectElement.appendChild(myParamElement12);
	myObjectElement.appendChild(myParamElement13);
	myObjectElement.appendChild(myParamElement14);
	myObjectElement.appendChild(myParamElement15);
	myObjectElement.appendChild(myParamElement16);
	myObjectElement.appendChild(myParamElement17);
	myObjectElement.appendChild(myParamElement18);
	myObjectElement.appendChild(myParamElement19);
	myObjectElement.appendChild(myParamElement20);
	myObjectElement.appendChild(myParamElement21);
	myObjectElement.appendChild(myParamElement22);
	myObjectElement.appendChild(myParamElement23);
	myObjectElement.appendChild(myParamElement24);
	myObjectElement.appendChild(myParamElement25);
	myObjectElement.appendChild(myParamElement26);
	myObjectElement.appendChild(myParamElement27);
	myObjectElement.appendChild(myParamElement28);
	myObjectElement.appendChild(myParamElement29);
	myObjectElement.appendChild(myParamElement30);
	myObjectElement.appendChild(myParamElement31);
	myObjectElement.appendChild(myParamElement32);
	myObjectElement.appendChild(myParamElement33);
	myObjectElement.appendChild(myParamElement34);
	myObjectElement.appendChild(myParamElement35);
	myObjectElement.appendChild(myParamElement36);
	myObjectElement.appendChild(myParamElement37);
	myObjectElement.appendChild(myParamElement38);
	myObjectElement.appendChild(myParamElement39);
	myObjectElement.appendChild(myParamElement40);
	myObjectElement.appendChild(myParamElement41);
	myObjectElement.appendChild(myParamElement42);
	myObjectElement.appendChild(myParamElement43);
	myObjectElement.appendChild(myParamElement44);
	myObjectElement.appendChild(myParamElement45);
	myObjectElement.appendChild(myParamElement46);
	myObjectElement.appendChild(myParamElement47);
	myObjectElement.appendChild(myParamElement48);
	myObjectElement.appendChild(myParamElement49);
	myObjectElement.appendChild(myParamElement50);
	myObjectElement.appendChild(myParamElement51);

	obj.appendChild(myObjectElement);
*/
	document.writeln('<object classid="clsid:22D6F312-B0F6-11D0-94AB-0080C74C7E95" width="' + obj_width + '" height="' + obj_height + '" vspace="1" hspace="1" align="middle" id="Music" style="left:0px;top:0px;">');
	document.writeln('<param name="AllowChangeDisplaySize" value="true">');
	document.writeln('<param name="AllowScan" value="true">');
	document.writeln('<param name="AnimationAtStart" value="true">');
	document.writeln('<param name="AudioStream" value="-1">');
	document.writeln('<param name="AutoRewind" value="true">');
	document.writeln('<param name="AutoSize" value="false">');
	document.writeln('<param name="AutoStart" value="true">');
	document.writeln('<param name="Balance" value="0">');
	document.writeln('<param name="BufferingTime" value="5">');
	document.writeln('<param name="ClickToPlay" value="true">');
	document.writeln('<param name="CurrentMarker" value="0">');
	document.writeln('<param name="CurrentPosition" value="-1">');
	document.writeln('<param name="CursorType" value="0">');
	document.writeln('<param name="DisplayBackColor" value="0">');
	document.writeln('<param name="DisplayForeColor" value="16777215">');
	document.writeln('<param name="DisplayMode" value="0">');
	document.writeln('<param name="DisplaySize" value="2">');
	document.writeln('<param name="EnableContextMenu" value="true">');
	document.writeln('<param name="Enabled" value="true">');
	document.writeln('<param name="EnableFullScreenControls" value="false">');
	document.writeln('<param name="EnablePositionControls" value="true">');
	document.writeln('<param name="EnableTracker" value="true">');
	document.writeln('<param name="InvokeURLs" value="true">');
	document.writeln('<param name="Language" value="-1">');
	document.writeln('<param name="Mute" value="false">');
	document.writeln('<param name="PlayCount" value="1">');
	document.writeln('<param name="PreviewMode" value="false">');
	document.writeln('<param name="Rate" value="1">');
	document.writeln('<param name="SelectionEnd" value="-1">');
	document.writeln('<param name="SelectionStart" value="-1">');
	document.writeln('<param name="SendErrorEvents" value="true">');
	document.writeln('<param name="SendKeyboardEvents" value="false">');
	document.writeln('<param name="SendMouseClickEvents" value="true">');
	document.writeln('<param name="SendMouseMoveEvents" value="false">');
	document.writeln('<param name="SendOpenStateChangeEvents" value="true">');
	document.writeln('<param name="SendPlayStateChangeEvents" value="true">');
	document.writeln('<param name="SendWarningEvents" value="true">');
	document.writeln('<param name="ShowAudioControls" value="true">');
	document.writeln('<param name="ShowCaptioning" value="false">');
	document.writeln('<param name="ShowControls" value="true">');
	document.writeln('<param name="ShowDisplay" value="false">');
	document.writeln('<param name="ShowGotoBar" value="false">');
	document.writeln('<param name="ShowPositionControls" value="true">');
	document.writeln('<param name="ShowStatusBar" value="false">');
	document.writeln('<param name="ShowTracker" value="true">');
	document.writeln('<param name="TransparentAtStart" value="false">');
	document.writeln('<param name="VideoBorder3D" value="true">');
	document.writeln('<param name="VideoBorderColor" value="0">');
	document.writeln('<param name="VideoBorderWidth" value="0">');
	document.writeln('<param name="Volume" value="2000">');
	document.writeln('<param name="WindowlessVideo" value="false">');
	document.writeln('<embed type="application/x-mplayer2"');
	document.writeln('	pluginspage="http://www.microsoft.com/Windows/Downloads/Contents/Products/MediaPlayer/"');
	document.writeln('	name=MediaPlayer1');
	document.writeln('	AllowChangeDisplaySize=1');
	document.writeln('	AllowScan=1');
	document.writeln('	AnimationAtStart=1');
	document.writeln('	AudioStream=-1');
	document.writeln('	AutoRewind=1');
	document.writeln('	AutoSize=0');
	document.writeln('	AutoStart=1');
	document.writeln('	Balance=0');
	document.writeln('	BufferingTime=5');
	document.writeln('	ClickToPlay=1');
	document.writeln('	CurrentMarker=0');
	document.writeln('	CurrentPosition=-1');
	document.writeln('	CursorType=0');
	document.writeln('	DisplayBackColor=0');
	document.writeln('	DisplayForeColor=16777215');
	document.writeln('	DisplayMode=0');
	document.writeln('	DisplaySize=2');
	document.writeln('	EnableContextMenu=1');
	document.writeln('	Enabled=1');
	document.writeln('	EnableFullScreenControls=0');
	document.writeln('	EnablePositionControls=1');
	document.writeln('	EnableTracker=1');
	document.writeln('	InvokeURLs=1');
	document.writeln('	Language=-1');
	document.writeln('	Mute=0');
	document.writeln('	PlayCount=1');
	document.writeln('	PreviewMode=0');
	document.writeln('	Rate=1');
	document.writeln('	SelectionEnd=-1');
	document.writeln('	SelectionStart=-1');
	document.writeln('	SendErrorEvents=1');
	document.writeln('	SendKeyboardEvents=0');
	document.writeln('	SendMouseClickEvents=1');
	document.writeln('	SendMouseMoveEvents=0');
	document.writeln('	SendOpenStateChangeEvents=1');
	document.writeln('	SendPlayStateChangeEvents=1');
	document.writeln('	SendWarningEvents=1');
	document.writeln('	ShowAudioControls=1');
	document.writeln('	ShowCaptioning=0');
	document.writeln('	ShowControls=1');
	document.writeln('	ShowDisplay=0');
	document.writeln('	ShowGotoBar=0');
	document.writeln('	ShowPositionControls=1');
	document.writeln('	ShowStatusBar=0');
	document.writeln('	ShowTracker=1');
	document.writeln('	TransparentAtStart=0');
	document.writeln('	VideoBorder3D=1');
	document.writeln('	VideoBorderColor=0');
	document.writeln('	VideoBorderWidth=0');
	document.writeln('	Volume=2000');
	document.writeln('	WindowlessVideo=0');
	document.writeln('	width=' + obj_width + '');
	document.writeln('	height=' + obj_height + '');
	document.writeln('</embed>');
	document.writeln('</object>');
}

function LoginMenu(returnUrl, board_no, page, keyfield, keyword, category){
   	alert("·Î±×ÀÎ ÈÄ ÀÌ¿ëÇØ ÁÖ¼¼¿ä");   	
	location.href="../member/login.asp?returnUrl=" + returnUrl + "&board_no=" + board_no + "&page=" + page + "&keyfield=" + keyfield + "&keyword=" + keyword + "&category=" + category;
}

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_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_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 checkLimit(field) {
    var len = 0;
    var newtext = "";
    if(field.value == null) len = 0;
    
    for(var i = 0 ; i < field.value.length ; i++) {
      var c = escape(field.value.charAt(i));
    
      if(c.length == 1) len ++;
      else if ( c.indexOf("%u") != -1 ) len += 2;
      else if ( c.indexOf("%") != -1 ) len += c.length/3;
    
      if(len <= 500) newtext += unescape(c);
    }
    
    if(len > 500) {
      alert("³»¿ëÀº ¿µ¹® 500ÀÚ, ÇÑ±Û 250ÀÚ¸¦ ³ÑÀ» ¼ö ¾ø½À´Ï´Ù.");
      field.value = newtext;
      field.focus();
      return;
    }
}

function CheckChar(str) {
	len=str.value.length;
	
	for(i=0;i<len;i++) {
		if(str.value.charAt(i)=='"' || str.value.charAt(i)=="%" || 
			str.value.charAt(i)=="\"" || str.value.charAt(i)=="&")  {
			alert("Æ¯¼ö¹®ÀÚ( \,%,&,...)´Â »ç¿ëÇÏÁö ¸¶¼¼¿ä!");
			str.focus();
			return false;
		}
	}
	return true;  
}
	
function CheckSpace(str) {
	var len;
	
	while(true) {
		if(str.value.charAt(0)!=" ") break;
		len=str.value.length;
		str.value = str.value.substring(1,len);
	}
	
	while(true) {
		len=str.value.length;
		if(str.value.charAt(len-1)!=" ") break;
		str.value = str.value.substring(0,len-1);
	}
}

// °ø¹éÀ» ¸ðµÎ ¾ø¾Ø´Ù.
function CheckSpaceAll(str){
	var index;
	var len;
	
	while(true) {
		index=str.value.indexOf(" ");
		if(index==-1) break;
		len=str.value.length;
		str.value = str.value.substring(0,index) + 
                str.value.substring((index+1),len);
	}	
	return str.value;
}

function CheckMail(email){	
	aIndex=email.value.indexOf("@");
	dotIndex=email.value.indexOf(".");
  	
	if(aIndex==-1 || dotIndex==-1 || aIndex >= (dotIndex-1)) {
		alert("¸ÞÀÏ ÀÔ·ÂÇü½ÄÀÌ ¿Ã¹Ù¸£Áö ¾Ê½À´Ï´Ù.");
		email.focus();
		return false;
	}
  	return true;
}

function isNum(inputStr) {
	for (var i = 0; i < inputStr.length; i++){
		var oneChar = inputStr.substring(i, i+1)
		if ((oneChar < "0" || oneChar > "9") && (oneChar != "-") && (oneChar != "+")){
			return false
		}
	}
    return true;
}  

function isAllSpace(inputStr) {
	for (var i = 0; i < inputStr.length; i++){
		var oneChar = inputStr.substring(i, i+1)
		if (oneChar != " "){
			return (false)
		}
	}
	return (true);
}

function parseFloat(str) {
	var buf;
    buf="";
    for (var i=0; i<str.length; i++)
		if(str.charAt(i) >= "0"  && str.charAt(i) <= "9") {
			buf=buf+str.charAt(i);
		}
	return buf;
}

function isNum2(inputStr) {
	for (var i = 0; i < inputStr.length; i++){
		var oneChar = inputStr.substring(i, i+1)
		if (oneChar < "0" || oneChar > "9"){
			return false
		}
	}
    return (true);
}  

function ncheck(c){
	if( (c>='0' && c<='9') ) {
		return true
	}
	return false
}

function ConfirmBox() {
   	if(confirm("µî·ÏµÈ Á¤º¸¸¦ »èÁ¦ÇÏ½Ã°ÚÀ¾´Ï±î?")) return true;
   	
   	return false;    
}

function MM_openBrWindow(theURL,winName,features) { //v2.0
	window.open(theURL,winName,features);
}

// ÁÖ¹Î¹øÈ£¸¦ °Ë»çÇÕ´Ï´Ù.
function checkSSN(ssn) {   
	var ssn1 = new String(ssn);

	if (ssn1.length != 13) {
		alert("ÁÖ¹Îµî·Ï¹øÈ£°¡ 13ÀÚ¸®ÀÎÁö È®ÀÎÇØÁÖ½Ê½Ã¿ä!");
		return false;
	}
	
	var a=ssn1.substring(0,1);
	var b=ssn1.substring(1,2);
	var c=ssn1.substring(2,3);
	var d=ssn1.substring(3,4);
	var e=ssn1.substring(4,5);
	var f=ssn1.substring(5,6);
	var g=ssn1.substring(6,7);
	var h=ssn1.substring(7,8);
	var i=ssn1.substring(8,9);
	var j=ssn1.substring(9,10);
	var k=ssn1.substring(10,11);
	var l=ssn1.substring(11,12);
	var m=ssn1.substring(12,13);
	
	var sum = 2*a + 3*b + 4*c+ 5*d + 6*e+ 7*f+ 8*g + 9*h+ 2*i+3*j+ 4*k+ 5*l;
	var r1 = sum%11;
	var temp = 11* ((sum-r1)/11) + 11 - sum;
	var r2 = temp%10;
	var temp1 = temp- 10*((temp-r2)/10);
	
	if (m != temp1) { 
		alert("¿Ã¹Ù¸¥ ÁÖ¹Îµî·Ï¹øÈ£°¡ ¾Æ´Õ´Ï´Ù.");
		return false;
	}	
	return true;
}	

function input_value() {
	alert("ÁÖ¼ÒÃ£±â ±â´ÉÀ» ÀÌ¿ëÇÏ¼¼¿ä.");
}

function checkBizID( bizID ){
	// bizID´Â ¼ýÀÚ¸¸ 10ÀÚ¸®·Î ÇØ¼­ ¹®ÀÚ¿­·Î ³Ñ±ä´Ù.
	var checkID = new Array(1, 3, 7, 1, 3, 7, 1, 3, 5, 1);
	var tmpBizID, i, chkSum=0, c2, remander;

	for (i=0; i<=7; i++) chkSum += checkID[i] * bizID.charAt(i);

	c2 = "0" + (checkID[8] * bizID.charAt(8));
	c2 = c2.substring(c2.length - 2, c2.length);

	chkSum += Math.floor(c2.charAt(0)) + Math.floor(c2.charAt(1));

	remander = (10 - (chkSum % 10)) % 10 ;

//	if (Math.floor(bizID.charAt(9)) == remander) return true; // OK!
//	return false;
	if (Math.floor(bizID.charAt(9)) != remander){
		alert("¿Ã¹Ù¸¥ »ç¾÷ÀÚ µî·Ï¹øÈ£°¡ ¾Æ´Õ´Ï´Ù.");
		return false;
	}
	return true; // OK!
}

/* flash */
/*
IE Flash ActiveContent Activation Script
Author: Faisal Iqbal (chall3ng3r)
Blog: http://www.orison.biz/blog/chall3ng3r/

Feel free to modify or distribute.
*/
 
/*
Method: FlashObject
 Param1: SWF path
 Param2: Movie width
 Param3: Movie height
 Param4: BGColor
 Param5: Flashvars (Optional)
*/
function FlashObject(swf, width, height, bgcolor,wmode, 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 += '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="'+wmode+'"/>';
				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 += 'salign="LT" ';
  			strFlashTag += 'wmode="'+wmode+'" ';
  			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);
}

//DextUploadX
function DextUploadObject(UpDown)
{
	var strObject;
	
	if(UpDown=='down')
	{
		strObject = "<OBJECT ID='FileDownloadManager' height='100' width='550' CodeBase = '/DEXTUploadX/DEXTUploadX.cab#version=2,3,0,0' CLASSID='CLSID:535AE497-8E85-45F8-AF36-2DFCBCA8B68A'>";
		strObject += "<PARAM NAME='ListViewStyle' VALUE='LVS_REPORT'>";
		strObject += "<PARAM NAME='OpenWindow' VALUE='TRUE'>";
		strObject += "</OBJECT>";
	}else
	{
		strObject = "<OBJECT id='FileUploadManager' codeBase='/DEXTUploadX/DEXTUploadX.cab#version=2,3,0,0' height='100' width='550' classid='CLSID:DF75BAFF-7DD5-4B83-AF5E-692067C90316' VIEWASTEXT>";
		strObject += "<PARAM NAME='DefaultPath' VALUE='C:\'>";
		strObject += "<PARAM NAME='Filter' VALUE='All Files|*.*|'>";
		strObject += "<PARAM NAME='ButtonVisible' VALUE='TRUE'>";
		strObject += "<PARAM NAME='StatusBarVisible' VALUE='TRUE'>";
		strObject += "<PARAM NAME='EnableAddFileButton' VALUE='TRUE'>";
		strObject += "<PARAM NAME='EnableAddFolderButton' VALUE='TRUE'>";
		strObject += "<PARAM NAME='EnableDeleteButton' VALUE='TRUE'>";
		strObject += "<PARAM NAME='EnableTransferButton' VALUE='FALSE'>";
		strObject += "<PARAM NAME='ListViewStyle' VALUE='LVS_REPORT'>";
		strObject += "<PARAM NAME='VisibleListViewFrame' VALUE='TRUE'>";
		strObject += "<PARAM NAME='MaxCount' VALUE='20'>";
		strObject += "<PARAM NAME='MaxTotalSize' VALUE='900000000'>";
		strObject += "<PARAM NAME='MaxFileSize' VALUE='50000000'>";
		strObject += "</OBJECT>";
	}

	document.write(strObject);
}
function frameMusic(musicFunction, musicOrder){
	if(musicFunction=="play"){
		top.musicFrame.chooseSong(musicOrder);
	}else if(musicFunction=="stop"){
		top.musicFrame.stopTrack();
	}
}