
	/************************************************************************************
	 * 1. ????? ?? ?? ????                                                 *
	 *                                                      							*
	 * @param   				document.form  name             					    *                          
	 * @return            		return boolean , message							    *
	 * @descripton																	    *
	 ************************************************************************************/   
	 
	 function checkForm(frm) {
	
		for(var i = 0; i < frm.elements.length; i++) {

			var elem = frm.elements[i];
			if(elem.getAttribute("required") != null && !elem.getAttribute("disabled")) {
				// text, password, textarea , select field
				
				if(elem.type == "text" || elem.type == "password" || elem.type == "textarea" || elem.type == "select-one") {
					if(elem.value.split("").join(" ") == "") {
						alert(elem.getAttribute("caption"));
						elem.focus();
						return false;
					}
					
				// radio field	
				} else if(elem.type == "radio") {
					var check = false;
					var eRadio = document.all[elem.name];
					for(var j = 0; j < eRadio.length; j++) {
						check = check || eRadio[j].checked;
					}
				
					if(!check) {
						alert(elem.getAttribute("caption"));
						eRadio[0].focus();
						return false;
					}
				}
			} // end of if
		} // end of for(i)

		return true;
	}
	


	// flashWrite(ÆÄÀÏ°æ·Î, °¡·Î, ¼¼·Î[, º¯¼ö][,¹è°æ»ö][,À©µµ¿ì¸ðµå])
function ObFlashW(url,w,h,vars,bg,win){
	
	var id=url.split("/")[url.split("/").length-1].split(".")[0]; //id´Â ÆÄÀÏ¸íÀ¸·Î ¼³Á¤
	if(vars==null) 	vars='';
	if(bg==null) 	bg='#FFFFFF';
	if(win==null) 	win='transparent';


	// ÇÃ·¡½Ã ÄÚµå Á¤ÀÇ
	var flashStr= "	<object classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000'";
		flashStr+="			codebase='http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0'";
		flashStr+="			width='"+w+"'";
		flashStr+="			height='"+h+"'";
		flashStr+="			id='"+id+"'";
		flashStr+="			align='middle'>";

		flashStr+="		<param name='allowScriptAccess' value='always' />";
		flashStr+="		<param name='movie' value='"+url+"' />";
		flashStr+="		<param name='FlashVars' value='"+vars+"' />";
		flashStr+="		<param name='wmode' value='"+win+"' />";
		flashStr+="		<param name='menu' value='false' />";
		flashStr+="		<param name='quality' value='high' />";
		flashStr+="		<param name='bgcolor' value='"+bg+"' />";
	
	
		flashStr+="		<embed src='"+url+"'";
		flashStr+="		       flashVars='"+vars+"'";
		flashStr+="		       wmode='"+win+"'";
		flashStr+="		       menu='false'";
		flashStr+="		       quality='high'";
		flashStr+="		       bgcolor='"+bg+"'";
		flashStr+="		       width='"+w+"'";
		flashStr+="		       height='"+h+"'";
		flashStr+="		       name='"+id+"'";
		flashStr+="		       align='middle'";
		flashStr+="		       allowScriptAccess='always'";
		flashStr+="		       type='application/x-shockwave-flash'";
		flashStr+="		       pluginspage='http://www.macromedia.com/go/getflashplayer' />";
		flashStr+=" </object>";

	// ÇÃ·¡½Ã ÄÚµå Ãâ·Â
	document.write(flashStr);
}
	
	
	
	
	
	/************************************************************************************
	 * 2. ? ??? ?? ???? ????                                              *
	 *                                                      							*
	 * @param   				????? ??? ???           					    *                          
	 * @return            		??? ???? ??? ?? 						    *
	 * @descripton																	    *
	 ************************************************************************************/   
	 
	//???
	function GetTextByte(text) {
	   str = new String(text);
	   var strLen = str.length;
	   var strByte = 0;
	   for (var i=0; i<strLen; i++) {
		   tmp = new String(str.charCodeAt(i));
		   strByte++;
		   if (tmp.length > 3) {
			   strByte++;
		   }
	   }
	   return strByte;
	}
	
	
	
	/************************************************************************************
	 * 3. ??? ????? ?? ???                                                 *
	 *                                                      							*
	 * @param   				                					                    *
	 * @return            		 						                                *
	 * @descripton																	    *
	 ************************************************************************************/   
	 
	 function imgSize(which , max ){
    	var width = eval("document.images."+which+".width");
	    var height = eval("document.images."+which+".height");
    	var temp = 0; 
	    var max_width= max;   // ???? ?? ??         
    	if ( width > max_width ) {  // ???? 600?? ??? ??? 600?? ??? ??? ?? ???? ????.      
	       height = height/(width / max_width);
    	   eval("document.images."+which+".width = max_width");     
	       eval("document.images."+which+".height = height");
    	}     
	}

	/////////////////////////////////////////////////////
	// onlyNumber(obj)	: ??? ????? ?.
	// ???			: <input ... onkeyDown = "onlyNumber(this)">
	// intFlag			: true ??? ?? ???
	// signFlag			: true?? ?????? ?? ???
	/////////////////////////////////////////////////////
	function onlyNumber(obj, intFlag, signFlag) {
		var v = obj.value;
		if(event.keyCode == 45 && v.length > 0) {
			event.returnValue = false;
			return false;
		}
		if(event.keyCode == 45 && v.indexOf("-") != -1) {
			event.returnValue = false;
			return false;
		} 
		if(event.keyCode == 46 && v.indexOf(".") != -1) {
			event.returnValue = false;
			return false;
		}
		sFilter = "[0-9";
		if(!intFlag) sFilter += ".";
		if(!signFlag)  sFilter += "-";
		sFilter += "]";
		
		if (sFilter) {
			var sKey = String.fromCharCode(event.keyCode);
			var re = new RegExp(sFilter);
	      
	      // backspace, delete, leftarrow, rightarrow, home, end ? ???? ???
	      if(event.keyCode == 8 || event.keyCode == 46 || event.keyCode == 37 
	      	|| event.keyCode == 39 || event.keyCode == 46 || event.keyCode == 36 || event.keyCode == 9
	      	|| event.keyCode == 35 || (event.keyCode >= 96 && event.keyCode <= 105) ) return;
	      	
	      if (sKey != "\r" && !re.test(sKey)) { event.returnValue = false; }
	
		  // Enter ?? ?? ?? ??.
		  if (event.keyCode == 13) { event.returnValue = false; }
		}
	} // end of onlyNumber()

	
	function popup_center(url,w, h, s, r , n) { //?? ??? ???
	
		width=screen.width;
		height=screen.height;
	
		x=(width/2)-(w/2);
		y=(height/2)-(h/2);
	
		opt = "left=" + x + ", top=" + y + ", width=" + w + ", height=" + h;
		opt = opt + ", toolbar=no,location=no,directories=no,status=no,menubar=no";
		opt = opt + ",scrollbars=" + s;
		opt = opt + ",resizable=" + r;
		window.open(url, n , opt);
	}

	function popup_center1(url,w, h, s, r , n , x , y) { //?? ??? ???
	
	//	width=screen.width;
	//	height=screen.height;
	
	//	x=(width/2)-(w/2);
	//	y=(height/2)-(h/2);
	
		opt = "left=" + x + ", top=" + y + ", width=" + w + ", height=" + h;
		opt = opt + ", toolbar=no,location=no,directories=no,status=no,menubar=no";
		opt = opt + ",scrollbars=" + s;
		opt = opt + ",resizable=" + r;
		window.open(url, n , opt);
	}
	
	
	/////////////////////////////////////////////////////
	//modal ???? ?? ?? ?? (YYYY/MM/DD ???? ??)
	//?? : objName ? ??? ??? ?? ??.
	/////////////////////////////////////////////////////
	function selectDate(objName, i){
		var dlgUrl   = "/inc/calendar.jsp";
		var dlgStyle = "dialogHeight=290px; dialogWidth=200px; status=no; help=no; scroll=no";
		var obj = document.getElementsByName(objName);
	
		var dObj = showModalDialog(dlgUrl, window, dlgStyle);

		if(dObj != null) {
			var tempMonth = (dObj.getMonth()*1 + 1) < 10 ? '0' + (dObj.getMonth()*1 + 1) : (dObj.getMonth()*1 + 1);
			var tempDay= dObj.getDate() < 10 ? '0' + dObj.getDate() : dObj.getDate();
		
			if(i != undefined) {
				obj[i].value = dObj.getYear() + tempMonth + tempDay;
//				formatYYYYMMDD(obj[i]);
			} else{
		    	obj[0].value = dObj.getYear() + tempMonth + tempDay;
//	    		formatYYYYMMDD(obj[0]);
	    	}
		}
	}


////////////////////////////////////////////////////////////////////Å°¸·±â
function norightclick(e)    // Others
{
   if (window.Event) {
      if (e.which == 2 || e.which == 3)
         return false;
   } else
      if (event.button == 2 || event.button == 3){
         event.cancelBubble = true
         event.returnValue = false;
         return false;
      } 
}

function processKey() 
{ 
        if( (event.ctrlKey == true && (event.keyCode == 78 || event.keyCode == 82)) || 
        (event.keyCode >= 112 && event.keyCode <= 123)) 
            { 
        event.keyCode = 0; 
        event.cancelBubble = true; 
        event.returnValue = false; 
            } 
} 

document.onkeydown = processKey;
document.oncontextmenu = nocontextmenu;
document.onmousedown = norightclick;
document.onselectstart=new Function("return false");
document.ondragstart=new Function("return false");

////////////////////////////////////////////////////////////////////////////////Å°¸·±â ³¡


	/////////////////////////////////////////////////////
	// ???(YYYYMMDD)? ???? ???? ?? ?? ?? (YYYY/MM/DD) ?? ???? ?? 
	// (?? : ? ??? ????? ??? (input object))
	/////////////////////////////////////////////////////
	function formatYYYYMMDD(object) {

		if(trim(object.value) == "") return;

		var num, year, month, day;
		num = object.value;
    
		while (num.search("/") != -1){	
			num = num.replace("/","");
		}		
		if (isNaN(num)) {        
			window.alert("???? ????? ???");
			object.select();
			return "";
		}	 
		if( num != 0 && (num.length >= 7 || num.length <= 8) ) {
			year = num.substring( 0, 4 );
			month = num.substring( 4, 6 );  
			day = num.substring(6);
			if(isValidDay(year,month,day)==false) {
				num = "";
				window.alert("???? ?? ?????.");
				object.select();
				return "";
			}        		

			if(num.length == 8) {
				num = year + "/" + month + "/" + day;
			} else if (num.length == 7) {	
				num = year + "/" + month + "/" + "0" + day;
			}	
		} else {
			num = "";
			window.alert("?? ???? ?????.");
			object.select();
			return "";
		}	
	 
		object.value = num;	
		return num;
	}

	//function GoUrl(arg){
	//	if( arg == "press" || arg == "diary"){	
	//		location.href="/webadmin/board/list.jsp?nm_BbsId="+ arg;
	//	}else if( arg == "logout"){
	//		parent.location.href="/webadmin/logout.jsp";
	//	} else {		
	//		location.href = eval(arg);		
	//	}
	//}	
	
// title
document.title = "::Çö´ëÇØ¿î::";

// ???????? 
//var pub = "/";	

//  ?????? xml????
//var XMLpath = "/img/flash/";





//Log-In-Out

