// ÇÃ·¡½¬ ÆÄÀÏÀ» Ãâ·Â
function viewFlash(filename,width,height,query){
	flashStr = '<OBJECT classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0\" WIDTH=\"'+width+'\" HEIGHT=\"'+height+'\" id=\"'+filename+'\" ALIGN=\"\">';
	flashStr += '<PARAM NAME=movie VALUE=\"'+filename+'\">';
	flashStr += '<PARAM NAME=quality VALUE=high>';
	flashStr += '<PARAM NAME=wmode VALUE=transparent>';
	flashStr += '<PARAM NAME=menu VALUE=false>';
	flashStr += '<PARAM NAME=bgcolor VALUE=#FFFFFF>';
	flashStr += '<EMBED src=\"'+filename+'\" quality=high wmode=transparent menu=false bgcolor=#FFFFFF  WIDTH=\"'+width+'\" HEIGHT=\"'+height+'\" NAME=\"'+filename+'\" ALIGN=\"\" TYPE=\"application/x-shockwave-flash\" PLUGINSPAGE=\"http://www.macromedia.com/go/getflashplayer\">';
	flashStr += '</EMBED>';
	flashStr += '</OBJECT>';
	document.write(flashStr);
}

//Áö´ÉÇü°Ë»ö¿£Áø ½ºÅ©¸³Æ®(µµ¿ì¹Ì)
function openBuvi4(){
	new_window = open("http://210.103.81.20/buvi/small2_v1_2_2.html","small2_v1_2_2","width=417,height=597,left=0,top=0,scrollbars=no");
}

// Á¡ÇÁ¸Þ´º
function MM_jumpMenu(targ,selObj,restore){ //v3.0
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}

// ¸ÞÀÎ °ü·Ã»çÀÌÆ® Á¡ÇÁ¸Þ´º 
function change_main(str){ 
window.open(str.value);
document.pulldown.reset();
//document.location.href= document.pulldown.form.value;
}
  
// ÆË¾÷-»õÃ¢
function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}


// ¿Â¶óÀÎÆù 
function WinOpen(sName)
{
	var sURL, sOption;
	sURL = "http://210.103.81.128/page/WKP.asp?sName=" + sName;
	sOption ="width=263,height=185,toolbar=no,status=no,directories=no,";
	sOption += "scrollbars=no,location=no,resize=no,menubar=no";
	window.open(sURL,"popup",sOption)
}

function ClickPhone(number) {
	var popup; 
 if(popup != null)
 {
 	popup.close();
 }
popup=window.open("http://211.119.72.194/webcall/netiphone_autodialing.asp?number="+ number + "",'popup','scrollbars=0,width=169,height=310');
}


	//ÀüÃ¼ ÀÌ¹ÌÁö¸µÅ© Á¡¼± ¾ø¾Ö±â..
// function autoblur() {
//	if(event.srcElement!=null)
//	{
//		if(event.srcElement.tagName == "A") document.body.focus();
//	}
// }
// document.onfocusin = autoblur; 



	//ÀüÃ¼ °Ë»ö½Ã »ç¿ë
	function checkSearchForm(form) {
		if( !checkBlank(form.s_str1.value) ) {
			alert("°Ë»ö¾î¸¦ ÀÔ·ÂÇÏ½Ê½Ã¿ä.");
			form.s_str1.value = "";
			form.s_str1.focus();
			return false;
		}
	}	



	//°ü¸®ÀÚ - ´äº¯ ³»¿ë 200ÀÚ ÀÌ»ó
	function checkAnswerLength(eObj) {
		if(eObj.value.length < 200) {
			alert("200ÀÚ ÀÌ»ó ³»¿ëÀ» ÀÔ·ÂÇÏ¼Å¾ß ÇÕ´Ï´Ù.\n\n(ÇöÀç "+ eObj.value.length +"ÀÚ ÀÔ´Ï´Ù.)");
			eObj.focus();
			return false;		
		} else {
			return true;
		}
	}



	//¼±ÅÃ ÆÄÀÏ º¸±â
	function preView(p) {
		var temp = document.all(p).value;

		if( temp == "" ){
			alert("ÆÄÀÏÀ» ¸ÕÀú ¼±ÅÃÇÏ¼¼¿ä.");
			return;
		}
		window.open(temp,'preview','resizable=yes,scrollbars=yes,top=200,left=200,width=640,height=480,menubars=no');
	}
	

	
	//Ã·ºÎ ÆÄÀÏ ÀÔ·Â Ä­ Ãß°¡
	function changeFileCnt(tableID, modeStr) {
		if( modeStr == "add" ) {
			var addRow = tableID.insertRow();
			var addCell = addRow.insertCell();
			addCell.innerHTML = tableID.rows(0).cells(0).innerHTML;
		} else if( modeStr == "del" ) {
			var rowIdx = tableID.rows.length - 1;
			if( rowIdx > 0 ) {
				tableID.deleteRow();
			}
		} else {}
	}	



	//fontsize º¯°æ
	var nowFontSize = 9;
	var nowLineHeight = 150;

	function changeFontSize(mode, objID) {
		switch(mode) {
			case "plus" :
				if(nowFontSize <= 17) {
					nowFontSize += 2;
					nowLineHeight += 5;
				}
				break;

			case "minus" :
				if(nowFontSize >= 11) {
					nowFontSize -= 2;
					nowLineHeight -= 5;
				}
				break;
		}

		obj =  document.getElementById(objID);

		obj.style.fontSize = nowFontSize + "pt";
		obj.style.lineHeight = nowLineHeight + "%";		
	}
	


	//³»¿ë ÇÁ¸°Æ®
	function contentPrint() {
		var windowLeft = (screen.width-680)/2;
        var windowTop = (screen.height-480)/2;

		var printURL = "/common/forPrint.html";
				
        window.open(printURL,"content",'width=662, height=400, menubar=yes, scrollbars=yes,status=no,resizable=yes,top=' + windowTop + ',left=' + windowLeft + '');
	}



	//·Î±×ÀÎ Ã¢ ¶Ù¿ì±â
	function auth_Login(){

		window.open('/auth/auth_Login.html?next_url='+location.href.replace('&','|'),'login','width=337 height=210');

	}


	//±ÛÀÚ¼ö °Ë»ç
	function checkValLength(eObj, id) {
		id.innerText =	eObj.value.length;		
	}



	//[¹Ù·Î °¡±â]
	function jumpPage(Target, Obj, Restore) {
		if( Obj.options[Obj.selectedIndex].value != "" ) {
			eval(Target + ".location='" + Obj.options[Obj.selectedIndex].value + "'");
			if(Restore) {
				Obj.selectedIndex = 0;
			}
		}
	}


	//ÀÚµ¿ Ä¿¼­ ÀÌµ¿
	function moveNext(obj, next){
		if( obj.value.length == obj.maxLength ){
			next.focus();	
			return false;
		}
	}
	


	//°ø¹é °Ë»ç
	function checkBlank(val) {
		var Space = " ";
		var SpaceNum = 0;

		for(L = 0; L < val.length; L++) {
			if( Space.indexOf(val.charAt(L)) == 0 ) {
					SpaceNum += 1;
			}
		}
		if( val.length == SpaceNum )	{
			return false;
		} else {
			return true;
		}
	}



	//¼ýÀÚ °Ë»ç
	function checkNumeral(val, msg) {
		var regExpNumeral = /[^0-9]/gi;
		if( val.match(regExpNumeral) != null ) {
			alert(msg + " ¼ýÀÚ¸¸ ÀÔ·Â °¡´ÉÇÕ´Ï´Ù.");
			return false;
		} else {
			return true;								
		}
	}
	
	//ÀÌ¸ÞÀÏ ÁÖ¼Ò °Ë»ç
	function checkEmail(val) {			  	
		var re = new 
		RegExp("(^[_0-9a-zA-Z-]+(\.[_0-9a-zA-Z-]+)*@[0-9a-zA-Z-]+(\.[0-9a-zA-Z-]+)*)$", "g");
		var r = val.match(re);
		if(r != null) { 
			return true;	//À¯È¿ÇÑ ÀÌ¸ÞÀÏ ÁÖ¼ÒÀÎ °æ¿ì	
		} else { 
			return false; 
		}
	}
	

	//ºñ¹Ð¹øÈ£ À¯È¿¼º °Ë»ç
	function checkPassword(val) {			  	
		var re = new RegExp("[^_0-9a-zA-Z-]", "g");
		var r = val.match(re);
		if(r != null) { 
			return false;	 //À¯È¿ÇÏÁö ¾ÊÀº ºñ¹Ð¹øÈ£
		} else { 
			return true;			
		}
	}
	
	//ID À¯È¿¼º °Ë»ç
	function checkID(val) {			  	
		var re = new RegExp("[^_0-9a-zA-Z-]", "g");
		var r = val.match(re);
		if(r != null) { 
			return false;	 //À¯È¿ÇÏÁö ¾ÊÀº ID
		} else { 
			return true;			
		}
	}


	

	//ÇÑ±Û À¯È¿¼º °Ë»ç
	function checkHangul(val) {
		var re = new RegExp("[\u3130-\u318F\u1100-\u11FF]", "g");
		var r = val.match(re);
		if(r != null) { // ÇÑ±ÛÀÚ¸ð°¡ Á¸ÀçÇÏ´Â °æ¿ì
			return true;
		} else {
			return false;
		}
	}



	//¿ìÆí¹øÈ£ Ã£±â
	function searchZip(parentForm, zipEle1, zipEle2, addrEle, focosEle) {
		var url = "/common/searchZip.asp?parentForm=" + parentForm + "&zipEle1=" + zipEle1 + "&zipEle2=" + zipEle2 + "&addrEle=" + addrEle + "&focosEle=" + focosEle;
		var windowLeft = (screen.width-640)/2;
        var windowTop = (screen.height-480)/2;
        window.open(url,"zipsearchwin",'width=450, height=340,scrollbars=yes,status=no,top=' + windowTop + ',left=' + windowLeft + '');
	}


	
	//¿øÇÏ´Â ÆäÀÌÁö·Î ÀÌµ¿
	function goWantPage(strURL) {
		form = document.sForm;

		form.action = strURL;
		form.submit();
	}



	//¿øÇÏ´Â ÆäÀÌÁö·Î ÀÌµ¿
	function goWantPage2(strURL) {
		form = document.sForm;

		form.target = "_self";
		form.action = strURL;
		form.submit();
	}



	//¿øÇÏ´Â ÆäÀÌÁö·Î ÀÌµ¿3
	function goWantPage3(form, strURL) {
		form.target = "_self";
		form.action = strURL;
		form.submit();
	}



	//¼±ÅÃÇÑ ºÐ·ù·Î ÆäÀÌÁö ÀÌµ¿
	function goKindPage(val) {
		if(val != "") {
			document.sForm.currPage.value = 1;	
			document.sForm.searchFlag.value = "N";

			document.sForm.sItem.value = "";
			document.sForm.sStr.value = "";

			document.sForm.sortWhat.value = "";
			document.sForm.sortHow.value = "";
			
			document.sForm.submit();	
		}
	}



	function goKindPage2(val) {
			document.sForm.currPage.value = 1;	
			document.sForm.searchFlag.value = "N";

			document.sForm.sItem.value = "";
			document.sForm.sStr.value = "";

			document.sForm.sortWhat.value = "";
			document.sForm.sortHow.value = "";
			
			document.sForm.submit();	
	}



	//¿øÇÏ´Â Á¤·Ä ±âÁØÀ¸·Î ÆäÀÌÁö Á¤·Ä
	function goSortPage(sortWhat, sortHow) {
		form = document.sForm;		

		form.currPage.value = "1";
		form.sortWhat.value = sortWhat;
		form.sortHow.value = sortHow;
		form.submit();
	}



	//°Ë»ö ÈÄ ÆäÀÌÁö ÀÌµ¿
	function goSearchPage() {
		form = document.sForm;
		if(!document.sForm.sItem.value){
			alert("ºÐ·ù¸¦ ¼±ÅÃÇÏ¼¼¿ä.");
			return false;
		}

		if( !checkBlank(form.sStr.value) ){
			alert("°Ë»ö¾î¸¦ ÀÔ·ÂÇÏ½Ê½Ã¿ä.");
			form.sStr.value = "";
			form.sStr.focus();
			return false;
		}

		form.searchFlag.value = "Y";
		form.currPage.value = "1";
	}

function goSearchPage_min() {
		form = document.sForm;
		if(!form.sItem.value){
			alert("ºÐ·ù¸¦ ¼±ÅÃÇÏ¼¼¿ä.");
			return false;
		}

		form.searchFlag.value = "Y";
		form.currPage.value = "1";
	}


	//°Ë»ö ÈÄ ÆäÀÌÁö ÀÌµ¿2
	function goSearchPage2(strURL) {
		form = document.sForm;
		if(!document.sForm.sItem.value){
			alert("ºÐ·ù¸¦ ¼±ÅÃÇÏ¼¼¿ä.");
			return false;
		}

		form.searchFlag.value = "Y";
		form.currPage.value = "1";

		form.target = "_self";
		form.action = strURL;
		form.submit();
	}



	//°Ë»ö ÈÄ ÆäÀÌÁö ÀÌµ¿
	function goSearchPage3() {
		form = document.sForm;
		
		form.searchFlag.value = "Y";
		form.currPage.value = "1";
	}



	//¸®½ºÆ®¿¡¼­ ÆäÀÌÁö ÀÌµ¿
	function goPage(goPage) {
		form = document.sForm;

		form.currPage.value = goPage;
		
		form.target = "_self";
		form.action = document.location;
		form.submit();
	}


		
	//»èÁ¦ È®ÀÎ
	function confirmDel(strMsg, strURL) {
		if( confirm(strMsg) ) {
			location.href = strURL;
		} else {
			return;
		}
	}



	//[post¹æ½Ä Àü¼Û]»èÁ¦
	function actionDel(strURL) {
		if( confirm("Á¤¸»·Î »èÁ¦ÇÏ½Ã°Ú½À´Ï±î?") ) {
			sForm.dbSort.value = "delete"
			goWantPage(strURL);		
		} else {
			return false;
		}
	}



	//[get¹æ½Ä Àü¼Û]»èÁ¦
	function actionDel2(strURL) {
		if( confirm("Á¤¸»·Î »èÁ¦ÇÏ½Ã°Ú½À´Ï±î?") ) {
			location.href = strURL; 
		} else {
			return;
		}
	}



	//»õÃ¢
	function newWindow(urlVal, wid, hei) {		
		var windowLeft = (screen.width-wid)/2;
    var windowTop = (screen.height-hei-60)/2;
				
        window.open(urlVal, "",'location=no,scrollbars=yes,status=no,titlebar=no,toolbar=no,menubar=no,resizable=yes,top=' + windowTop + ',left=' + windowLeft + ",width="+ wid +",height=" + hei);
	}
	
	function newWindow1(urlVal, wid, hei) {		
		var windowLeft = (screen.width-wid)/2;
    var windowTop = (screen.height-hei-60)/2;
				
        window.open(urlVal, "",'location=no,scrollbars=yes,status=no,titlebar=no,toolbar=yes,menubar=no,resizable=yes,top=' + windowTop + ',left=' + windowLeft + ",width="+ wid +",height=" + hei);
	}


	//»õÃ¢2
	function newWindow2(urlVal, wid, hei) {		
		//var windowLeft = (screen.width-640)/2;
        //var windowTop = (screen.height-480)/2;

		var windowLeft = 0;
    var windowTop = 0;
				
        window.open(urlVal, "",'location=no,scrollbars=yes,status=no,titlebar=no,toolbar=no,menubar=yes,resizable=yes,top=' + windowTop + ',left=' + windowLeft + ",width="+ wid +",height=" + hei);
	}

	
	//»õÃ¢3
	function newWindow3(urlVal, wid, hei) {		
		var windowLeft = (screen.width-wid)/2;
        var windowTop = (screen.height-hei)/2;
				
        window.open(urlVal, "",'location=no,scrollbars=yes,status=no,titlebar=no,toolbar=no,menubar=no,resizable=no,top=' + windowTop + ',left=' + windowLeft + ",width="+ wid +",height=" + hei);
	}
	
	//»õÃ¢3
	function newWindow5(urlVal, wid, hei) {		
		var windowLeft = (screen.width-wid)/2;
        var windowTop = (screen.height-hei)/2;
				
        window.open(urlVal, "",'location=no,scrollbars=yes,status=no,titlebar=no,toolbar=no,menubar=no,resizable=no,top=' + windowTop + ',left=' + windowLeft + ",width="+ wid +",height=" + hei);
	}
	
	//»õÃ¢
	function newWindow4(urlVal, wid, hei) {		
		wid = 800;
		hei = 600;
		var windowLeft = (screen.width-wid)/2;
    var windowTop = (screen.height-hei)/2;
				
    window.open(urlVal, "",'location=yes,scrollbars=yes,status=yes,titlebar=yes,toolbar=yes,menubar=yes,resizable=yes,top=' + windowTop + ',left=' + windowLeft + ",width="+ wid +",height=" + hei);
	}
	//»õÃ¢ ¿µ¹®Áöµµ
	function newWindow3(urlVal, wid, hei) {		
		var windowLeft = (screen.width-wid)/2;
        var windowTop = (screen.height-hei)/2;
				
        window.open(urlVal, "",'location=no,scrollbars=yes,status=no,titlebar=no,toolbar=no,menubar=no,resizable=no,top=' + windowTop + ',left=' + windowLeft + ",width="+ wid +",height=" + hei);
	}

//»õÃ¢
	function newWindow6(urlVal, wid, hei) {		
		wid = 410;
		hei = 680;
		//var windowLeft = (screen.width-wid)/2;
    //var windowTop = (screen.height-hei)/2;
	var windowLeft = 330
    var windowTop = 0
				
    window.open(urlVal, "",'location=yes,scrollbars=yes,status=yes,titlebar=yes,toolbar=no,menubar=no,resizable=yes,top=0' + windowTop + ',left=' + windowLeft + ",width="+ wid +",height=" + hei);
	}


	//ÁÖ¹Îµî·Ï¹øÈ£ °Ë»ç
	function checkJuminNum(valMN1, valMN2) {
		if( !checkBlank(valMN1) || valMN1.length != 6 ) {
			alert("ÁÖ¹Îµî·Ï¹øÈ£¸¦ Á¤È®È÷ ÀÔ·ÂÇÏ¼¼¿ä!");			
			return false;					   
		} else if( !checkBlank(valMN2) || valMN2.length != 7 ) {
			alert("ÁÖ¹Îµî·Ï¹øÈ£¸¦ Á¤È®È÷ ÀÔ·ÂÇÏ¼¼¿ä!");				
			return false;					   
		} else if( !checkNumeral(valMN1 + valMN2, "ÁÖ¹Îµî·Ï¹øÈ£´Â")) {	
			return false;
		} else {
			//¿ùÃ¼Å©
			valMonth1 = valMN1.substr(2, 1);			
			if( !(valMonth1 == 0 || valMonth1 == 1) ) {
				alert("Á¤»óÀûÀÎ ÁÖ¹Îµî·Ï¹øÈ£°¡ ¾Æ´Õ´Ï´Ù. \n\n´Ù½Ã ÀÔ·ÂÇØ ÁÖ½Ê½Ã¿ä.");
				return false;
			}

			//ÀÏÃ¼Å©
			valDate1 = valMN1.substr(4, 1);			
			if( !(valDate1 >= 0 || valDate1 <= 3) ) {
				alert("Á¤»óÀûÀÎ ÁÖ¹Îµî·Ï¹øÈ£°¡ ¾Æ´Õ´Ï´Ù. \n\n´Ù½Ã ÀÔ·ÂÇØ ÁÖ½Ê½Ã¿ä.");
				return false;	
			}

			//µÞÀÚ¸® Ã¹¹øÂ° ¹øÈ£ Ã¼Å©
			valYear = valMN1.substr(0, 2);
			valSex = valMN2.substr(0, 1);
			 if( !(valSex == 1) && !(valSex == 2) ) {
				 if( valYear == "00" ) {	  
					if( (valSex == 3) || (valSex == 4) ) {					 
						alert("º»ÀÎÀÇ ÁÖ¹Îµî·Ï¹øÈ£¸¦ ÀÔ·ÂÇÏ¼¼¿ä.");	//3»ìÀÌ¹Ç·Î ÀÀ¸ð ºÒ°¡
						return false;
					} else {
						alert("Á¤»óÀûÀÎ ÁÖ¹Îµî·Ï¹øÈ£°¡ ¾Æ´Õ´Ï´Ù. \n\n´Ù½Ã ÀÔ·ÂÇØ ÁÖ½Ê½Ã¿ä.");
						return false;
					}
				} else {
					alert("Á¤»óÀûÀÎ ÁÖ¹Îµî·Ï¹øÈ£°¡ ¾Æ´Õ´Ï´Ù. \n\n´Ù½Ã ÀÔ·ÂÇØ ÁÖ½Ê½Ã¿ä.");
					return false;		
				}
			 }		

			var mnCal  = ( valMN1.charAt(0)*2 ) + ( valMN1.charAt(1)*3 ) + ( valMN1.charAt(2)*4 ) + 
			                   ( valMN1.charAt(3)*5 ) + ( valMN1.charAt(4)*6 ) + ( valMN1.charAt(5)*7 ) +
							   ( valMN2.charAt(0)*8 ) + ( valMN2.charAt(1)*9 ) + ( valMN2.charAt(2)*2 ) + 
							   ( valMN2.charAt(3)*3 ) + ( valMN2.charAt(4)*4 ) + ( valMN2.charAt(5)*5 );
			var mnCalResult =  ( 11 - ( mnCal % 11 ) ) % 10 ;		
			if ( mnCalResult !=  valMN2.charAt(6) ) {
				alert("Á¤»óÀûÀÎ ÁÖ¹Îµî·Ï¹øÈ£°¡ ¾Æ´Õ´Ï´Ù. \n\n´Ù½Ã ÀÔ·ÂÇØ ÁÖ½Ê½Ã¿ä.");
				return false;
			}	
		}
		return true;
	}



	//[ÇÊ¼ö, ¼ýÀÚ] ¿¬¶ôÃ³
	function checkConnNum(tel1, tel2, tel3, msg, msg2) {
		tel = tel1 + tel2 + tel3;
		if( !checkBlank(tel1) || tel1.length < 2) {
			alert(msg + " Á¤È®È÷ ÀÔ·ÂÇÏ¼¼¿ä!");
			return false;
		} else if(!checkBlank(tel2) || tel2.length < 3) {
			alert(msg + " Á¤È®È÷ ÀÔ·ÂÇÏ¼¼¿ä!");
			return false;
		} else if(!checkBlank(tel3) || tel3.length < 4) {
			alert(msg + " Á¤È®È÷ ÀÔ·ÂÇÏ¼¼¿ä!");
			return false;
		} else if(!checkNumeral(tel, msg2)) {
			return false;
		} else {
			return true;
		}
	}

	
	
	//[ÇÊ¼ö, ¼ýÀÚ] ÀüÈ­¹øÈ£
	function checkTelNum(tel1, tel2, tel3) {
		tel = tel1 + tel2 + tel3;
		if( !checkBlank(tel1) || tel1.length < 2) {
			alert("¹øÈ£¸¦ Á¤È®È÷ ÀÔ·ÂÇÏ¼¼¿ä!");
			return false;
		} else if(!checkBlank(tel2) || tel2.length < 3) {
			alert("¹øÈ£¸¦ Á¤È®È÷ ÀÔ·ÂÇÏ¼¼¿ä!");
			return false;
		} else if(!checkBlank(tel3) || tel3.length < 4) {
			alert("¹øÈ£¸¦ Á¤È®È÷ ÀÔ·ÂÇÏ¼¼¿ä!");
			return false;
		} else if(!checkNumeral(tel, "¹øÈ£´Â")) {
			return false;
		} else {
			return true;
		}
	}



	//[ÇÊ¼ö, ¼ýÀÚ] ÀÌµ¿ ÀüÈ­¹øÈ£
	function checkPhoneNum(phone1, phone2, phone3) {
		phone = phone1 + phone2 + phone3;
		if( !checkBlank(phone1) || phone1.length < 3) {
			alert("ÀÌµ¿ ÀüÈ­¹øÈ£¸¦ Á¤È®È÷ ÀÔ·ÂÇÏ¼¼¿ä!");
			return false;
		} else if(!checkBlank(phone2) || phone2.length < 3) {
			alert("ÀÌµ¿ ÀüÈ­¹øÈ£¸¦ Á¤È®È÷ ÀÔ·ÂÇÏ¼¼¿ä!");
			return false;
		} else if(!checkBlank(phone3) || phone3.length < 4) {
			alert("ÀÌµ¿ ÀüÈ­¹øÈ£¸¦ Á¤È®È÷ ÀÔ·ÂÇÏ¼¼¿ä!");
			return false;
		} else if(!checkNumeral(phone, "ÀÌµ¿ ÀüÈ­¹øÈ£´Â")) {
			return false;
		} else {
			return true;
		}
	}

/***********************************************************************************
   ³â, ¿ù, ÀÏ À¯È¿¼º Ã¼Å© (À±³â Ã¼Å© Æ÷ÇÔ)
   ÀÔ·ÂÇ×¸ñ :
           - optionFlg : YMD°¡ ÇÊ¼ö Ç×¸ñÀÌ¸é 1 ,
                                   ¼±ÅÃÇ×¸ñ: 0 ÀÌ¸ç, ¸ðµÎ ÀÔ·Â ¶Ç´Â ¸ðµÎ °ø¹é
            -  year :  ³âÀ» Ç¥½ÃÇÏ´Â input °´Ã¼  (ex. formname.year)
            -  month: ¿ùÀ» Ç¥½ÃÇÏ´Â input °´Ã¼
            -  day :    ÀÏÀ» Ç¥½ÃÇÏ´Â input °´Ã¼ 
    °ü·Ã ÇÔ¼ö 
            - isNumber () :  ¼ýÀÚ¸¸ ÀÔ·Â ¹Þµµ·ÏÇÏ´Â ÇÔ¼ö
            - tabOrder()  :    Á¤ÇØÁø ¼ýÀÚ¸¸Å­ ÀÔ·ÂÇÏ¸é ÀÚµ¿À¸·Î Æ÷Ä¿½º ÀÌµ¿   
***********************************************************************************/
function checkYMD(optionFlg, year, month, day) {
  //----------------------------------------------------------
  // year, month, day ¸¦ ¸ðµÎ ÀÔ·ÂÇß´ÂÁö Á¶»ç
  // ³â¿ùÀÏ ÀÌ ÇÊ¼ö ÀÔ·ÂÀÌ ¾Æ´Ï¸é Ã¼Å© ºÒÇÊ¿ä
  //----------------------------------------------------------
  if(optionFlg) {
    if(!year.value|| !month.value || !day.value) {
      alert("³â¿ùÀÏÀº ÇÊ¼ö ÀÔ·ÂÇ×¸ñÀÔ´Ï´Ù");
      year.focus();
      return false;   
    }
  }
  else {
    //¿É¼Ç»çÇ×ÀÎµ¥ YMD°¡ ÇÏ³ªµµ ÀÔ·ÂµÇÁö ¾ÊÀ¸¸é Ã¼Å© ÇÏÁö¾ÊÀ½
    if(!year.value && !month.value && !day.value) {
      return true;
    }
    else {
      if(!year.value|| !month.value || !day.value) {
        alert("³â¿ùÀÏÀÌ ¸ðµÎ ÀÔ·ÂµÇ°Å³ª ¸ðµÎ »ý·«µÇ¾î¾ß  ÇÕ´Ï´Ù.");
        year.focus();
        return false;   
      }  
    }
  }
  
  //-----------------------------------------------------------------
  // ¿ù, ÀÏÀÌ ÇÑÀÚ¸®¸é ¾Õ¿¡ 0À» Ãß°¡ÇÑ´Ù.
  //
  // ¿ù, ÀÏ : 1 - 9 = 01 - 09·Î º¯È¯
  //-----------------------------------------------------------------
  if(year.value.length != 4) {
    alert("Àß¸øµÈ ³âµµÀÔ´Ï´Ù.");
    year.focus();
    return false; 
  }
  
  if(month.value.length == 1) {
    month.value = "0" + month.value;
  }
  
  if(day.value.length == 1) {
    day.value = "0" + day.value;
  }
  
  //---------------------------------------------------------
  // year, month, day´Â input °´Ã¼ÀÌ´Ù.
  //--------------------------------------------------------
  var total_days;            // °¢ ¿ùº° ÃÑ ÀÏ¼ö  (30 | 31| 28| 29)
  var ckFlg=0;  	
  //--------------------------------------------------------------------
  // ¼ýÀÚ¸¸ ÀÔ·Â¹Þµµ·Ï ÇÑ´Ù.  isNumber()¸¦ »ç¿ëÇÏ¸é
  //  »ý·«ÇØµµ µÈ´Ù. 
  //-------------------------------------------------------------------			
  var data1 = year.value;
  var data2 = month.value;
  var data3 = day.value;
  for ( var j=1; j< 4; j++ ) {
    var data = eval( "data"+j );
    for ( var i=0; i < data.length; i++)  {
      var ch = data.substring(i,i+1);
      if (ch<"0" | ch>"9") {
    	  alert ( "\nÀÏÀÚ¸¦ ¹Ù¸£°Ô ÀÔ·ÂÇÏ¼¼¿ä." ); 
    	  year.focus();
    	  year.select();
    	  return false;
	    }
    }// end inner for
  } //end outter for
    
   
  //------------------------------------------------------------
  // ¿ù Ã¼Å© ( 1 ~ 12)
  //-----------------------------------------------------------	   
  if( (1 > month.value) ||  (12 < month.value) ) {
	  ckFlg=1;
  }
  if(ckFlg) {
    alert ( "\n¿ùÀ» ¹Ù¸£°Ô ÀÔ·ÂÇÏ¼¼¿ä."  );
    month.focus(); 
    month.select();
    return false;
  }
    	        
  //------------------------------------------------------------
  // 1. °¢ ´ÞÀÇ ÃÑ ³¯¼ö¸¦ ±¸ÇÑ´Ù.
  //----------------------------------------------------------
  if(month.value == 4||month.value == 6||month.value == 9||month.value == 11)  {
      total_days = 30;
  } 
  else {
       total_days=31;
  }
  //--------------------------------------------------------
  // 1-1.À±³â¿¡ µû¸¥ 2¿ù ÃÑ ³¯¼ö ±¸ÇÑ´Ù.
  //--------------------------------------------------------   
  if(month.value ==2) {
    // À±³âÁ¶»ç
    if((year.value % 4 == 0) && (year.value % 100 != 0) || (year.value % 400 == 0)) {
      total_days = 29;
    } 
    else{
      total_days = 28; 
    }
  }
          
  //-------------------------------------------------------------------
  // ÀÏÀÚ Ã¼Å© : °¢³â¿ùº°·Î ÃÑ ³¯¼ö°¡ ¸Â´ÂÁö Á¶»ç
  //-------------------------------------------------------------------
  if( ( 1 > day.value ) || ( day.value > total_days ) ) {
    ckFlg=1;
  }
  if(ckFlg) {
    alert ( "\nÀÏÀÚ¸¦ ¹Ù¸£°Ô ÀÔ·ÂÇÏ¼¼¿ä."  );
    day.focus();
    day.select();
    return false;
  }
       
  //-----------------------------------------------------------
  // MM/DD Çü½ÄÀ¸·Î ÀÔ·ÂÇØ¾ß ÇÏÁö¸¸, 
  //  M ¶Ç´Â D Çü½ÄÀ¸·Î ÀÔ·ÂÇÑ °æ¿ì ¾Õ¿¡ 0 Ãß°¡
  //-------------------------------------------------------------        
  if ( data2.length < 2 ) {
       data2 = "0"+data2 ;
  }
  if ( data3.length < 2 ) {
      data3 = "0"+data3 ;
  }
  return true;
}

/////////////////////////////////////////////////// ½Å¿ìÃ¶ ///////////////////////////////////////////////////////////
/**************************************************************************************
	³»    ¿ë : ÀÏÁ¤±¸°£ÀÇ HTML Element¸¦ Clear
	ÆÄ¶ó¹ÌÅÍ : pStartObject - ½ÃÀÛ °´Ã¼
	           pEndObject   - Á¾·á °´Ã¼
**************************************************************************************/
	function cfClearInputValues(pStartObject, pEndObject)
	{ 
		var bCheck = false;
    
		for( var i=0 ; i<form.elements.length ; i++ )
		{
			if (bCheck == false)
			{
				if( form.elements[i] == pStartObject )
				{
					cfClearInputValue(form.elements[i]);
					bCheck = true;
				}
			}
			else
			{
            cfClearInputValue(form.elements[i]);
				if ( form.elements[i] == pEndObject )
					return;
		  	}
		}
	}
    
/**************************************************************************************
	³»    ¿ë : Æ¯Á¤ HTML Element¸¦ Clear
	ÆÄ¶ó¹ÌÅÍ : HTML Element °´Ã¼
**************************************************************************************/
	function cfClearInputValue(pObject)
	{
		if( pObject.type == "text" || pObject.tagName.toUpperCase() == "TEXTAREA")
  			pObject.value = "";
  		else if( ( pObject.type == "radio" ) || ( pObject.type == "checkbox" ) )
  		   pObject.checked = false;
  		else if( pObject.tagName.toUpperCase() == "SELECT" )
  		   pObject.selectedIndex = 0;
   }

/**************************************************************************************
	³»    ¿ë : È­¸é¿¡¼­ Enter Key ÀÔ·Â½Ã Æ÷Ä¿½º¸¦ ´ÙÀ½ Element·Î ÀÌµ¿
	ÆÄ¶ó¹ÌÅÍ : ¾øÀ½
**************************************************************************************/
   function cfMoveTabIndex(e)
   {
      // Enter Key°¡ ´­¸° °æ¿ì (ºê¶ó¿ìÁ® 5.5 ÀÌ»ó¿¡¼­¸¸ Áö¿ø°¡´É)
      if(cfGetIEVersion() >= 5
        && event.keyCode == 13
        && event.srcElement.tagName.toUpperCase() != 'TEXTAREA')
      {
         event.cancelBubble = true;
         
         event.keyCode = 9;
         
         event.srcElement.fireEvent('onkeydown');
         
         return;
      }
   }

/**************************************************************************************
	³»    ¿ë : È­¸é¿¡¼­ Enter Key ÀÔ·Â½Ã Æ÷Ä¿½º¸¦ ´ÙÀ½ Element·Î ÀÌµ¿
	ÆÄ¶ó¹ÌÅÍ : ¾øÀ½
**************************************************************************************/
   function cfMoveFocus(vElement)
   {
      // Enter Key°¡ ´­¸° °æ¿ì (ºê¶ó¿ìÁ® 5.5 ÀÌ»ó¿¡¼­¸¸ Áö¿ø°¡´É)
      if(cfGetIEVersion() >= 5
        && event.keyCode == 13
        && event.srcElement.tagName.toUpperCase() != 'TEXTAREA')
      {
		 vElement.focus();         
         return;
      }
   }
    

/**************************************************************************************
 *	³»    ¿ë :  Å°ÇÊµåÀÇ textBox¸¦ edit ¼Ó¼º¹× styleÀ» ¹Ù²Û´Ù.
 *	ÆÄ¶ó¹ÌÅÍ :  bParam  =>  "0" - editable
 								 "1" - non editable
 * 				oElement => textBox
 **************************************************************************************/
function cfTextBoxChangeEdit(oElement , bParam)
{   
	if( bParam == "1")
	{
		oElement.style.borderStyle = "none" ;
		oElement.style.fontSize = "9pt" ;
		oElement.style.backgroundColor = "transparent";
		oElement.readOnly = true ;
	//oElement.style.fontFamily = "";
	}
	else  if( bParam == "0")
	{
		oElement.style.borderStyle = "" ;
		oElement.style.fontSize = "" ;
		oElement.style.backgroundColor = "";
		oElement.readOnly = false ;
	}
}   

/*  
   ³»    ¿ë : ÆÄ¶ó¹ÌÅÍ·Î ¹ÞÀº DIV ¿µ¿ª¿¡ »õ·Î¿î HTML Code ¸¦ »ðÀÔ
   ÆÄ¶ó¹ÌÅÍ : pDivName - Target DIV °´Ã¼¸í
              [pHtml]  - DisplayÇÒ HTML Code : »ý·«ÇÏ¸é vHtml ÀÇ ¼Ò½º°¡ »Ñ·ÁÁü
   Return°ª : ¾ø½¿
*/  
function cfDisplayDiv(pDivName, pHtml)
{   
   // ÆÄ¶ó¹ÌÅÍ·Î ¹ÞÀº DIV ¿µ¿ª¿¡ »õ·Î¿î HTML Code ¸¦ »ðÀÔ
   if(arguments.length == 2)
   {
      document.getElementById(pDivName).innerHTML = pHtml;
   }
   else
   {
      document.getElementById(pDivName).innerHTML = vHtml;
   }
   // vHtml Clear
   vHtml = "";
} 

//ÆÄÀÏ ¾÷·Îµå½Ã ±ÝÁöÆÄÀÏÀÎÁö ¾Æ´ÑÁö Á¶»ç
function CheckNoExtension(f)
{
	var path = f.value;
	var tmp = path.split(".");
	var extension = tmp[tmp.length - 1];

	if(extension=='php'||extension=='php3'||extension=='asp'||extension=='jsp'||extension=='cgi'||extension=='inc'||extension=='pl'||extension=='PHP'||extension=='PHP3'||extension=='ASP'||extension=='JSP'||extension=='CGI'||extension=='INC'||extension=='PL'||extension=='jsv'||extension=='jsw'||extension=='JSV'||extension=='JSW')
	{
		alert(extension + ' ÆÄÀÏÀº ¾÷·Îµå°¡ ±ÝÁöµÇ¾î ÀÖ½À´Ï´Ù.');
		return false;
	}else{
		return true;
	}
}

/******************************************************************************
	³»    ¿ë : ÇöÀç ½ÇÇàÁßÀÎ ºê¶ó¿ìÁ®ÀÇ ¹öÁ¯À» ¸®ÅÏ
	ÆÄ¶ó¹ÌÅÍ : ¾øÀ½
******************************************************************************/
   function cfGetIEVersion()
   {
      if(vIEVersion == "")
      {
         iidx = navigator.appVersion.indexOf('MSIE ');
         if(iidx > 0)
         {
            vIEVersion = parseInt(navigator.appVersion.substring(iidx+5, iidx+8));
         }
         else vIEVersion = 0;
      }
    
      return vIEVersion;
   }

	var vIEVersion = "";                      // ÇöÀç ½ÇÇàÁßÀÎ ºê¶ó¿ìÁ®ÀÇ ¹öÁ¯

	// ºÏ¸¶Å© È£Ãâ
	function callbookmark(urip,uriparamp) {	
		var urlstr = "/open_content/bookmark/BookmarkFrame.jsp?urip="+urip+"&uriparamp="+uriparamp;
		var winOpt = "width=404,height=320,top=100,left=100";
		//document.form.curButton.value = "write"; 
		window.open(urlstr, "bookmark", winOpt);  
	}
/////////////////////////////////////////////////// ½Å¿ìÃ¶ ///////////////////////////////////////////////////////////