function setSwf(arg1, arg2, arg3, arg4, id){
	if(id){
	document.write("<object id='"+id+"' classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000'");
	} else {
	document.write("<object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000'");
	}
	document.write("        codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0' width='"+arg2+"' height='"+arg3+"'>");
	document.write("<param name='movie' value='"+arg1+"'>");
	document.write("<param name='quality' value='high'>");
	if(arg4) document.write("<param name='wmode' value='transparent'>");
	document.write("<embed src='"+arg1+"' quality='high' pluginspage='http://www.macromedia.com/go/getflashplayer' type='application/x-shockwave-flash' width='"+arg2+"' height='"+arg3+"'></embed>");
	document.write("</object>");
}

function openPopup(url,name,w,h,scroll) {
 var Top  = (screen.height-h)/2;
 var Left = (screen.width-w)/2;
 if(!scroll) scroll="no";
 var pop = "width="+w+",height="+h+",top="+Top+",left="+Left+", scrollbars="+scroll;
 window.open(url,name,pop) ;
}

//한글체크 rForm
function checkKoreanName(formname,obj) {
	var strVal = eval("document."+formname+"."+obj+".value");
	
	
		/*
	if (strVal == ""){
	 alert("성명을 정확하게 입력해주세요");
	 return;
	}
	*/

	if(obj=="name_kr"){
		for (var i=0;i<strVal.length;i++){

			if(!((strVal.charCodeAt(i) > 0x3130 && strVal.charCodeAt(i) < 0x318F) || (strVal.charCodeAt(i) >= 0xAC00 && strVal.charCodeAt(i) <= 0xD7A3))){
				alert("한글만 입력가능합니다.");
				eval("document."+formname+"."+obj+".value=''");
				eval("document."+formname+"."+obj+".focus()"); 
				return false;
			}
		}
	}
	if(obj=="user_id"){
		for (var i=0;i<strVal.length;i++){

			if(((strVal.charCodeAt(i) > 0x3130 && strVal.charCodeAt(i) < 0x318F) || (strVal.charCodeAt(i) >= 0xAC00 && strVal.charCodeAt(i) <= 0xD7A3))){
				alert("영문만 입력가능합니다.");
				eval("document."+formname+"."+obj+".value=''");
				eval("document."+formname+"."+obj+".focus()"); 
				return false;
			}
		}
	}
return true;
}

//숫자체크
function onlyNumber(){
  if ((event.keyCode < 48) || (event.keyCode > 57))
    if (event.keyCode != 46 )     {
      event.returnValue = false;
    }    
}

//주민체크
function SSNoCheck(code1,code2){
 var ssno=code1+ "-" + code2;
 if (isNaN(parseInt(code1))) return false;
 if (isNaN(parseInt(code2))) return false;
 tval=ssno.charAt(0)*2 + ssno.charAt(1)*3 + ssno.charAt(2)*4
  + ssno.charAt(3)*5 + ssno.charAt(4)*6 + ssno.charAt(5)*7
  + ssno.charAt(7)*8+ ssno.charAt(8)*9 + ssno.charAt(9)*2
  + ssno.charAt(10)*3 + ssno.charAt(11)*4 + ssno.charAt(12)*5;
 tval2 = 11- (tval % 11);
 if (tval2 == 10) tval2 = 0;
 if (tval2 == 11) tval2 = 1;

 if (ssno.charAt(13)==tval2 &&  (ssno.charAt(7)=="1" ||ssno.charAt(7)=="2")){
	return true;
 }else{
	return false;
 }
}
