<!--
	function getCookie( name ){
		var nameOfCookie = name + "=";
		var x = 0;
		while (x <= document.cookie.length)
		{
			var y = (x+nameOfCookie.length);
			if ( document.cookie.substring( x, y ) == nameOfCookie ) {
				if ((endOfCookie=document.cookie.indexOf( ";", y )) == -1 ) endOfCookie = document.cookie.length;
				return unescape(document.cookie.substring( y, endOfCookie));
			}
			x = document.cookie.indexOf(" ", x) + 1;
			if (x == 0) break;
		}
		return "";
	}

	function file_down(fileName, dis)
	{
		sf.location.replace('/common/fileDownload.jsp?fileName='+fileName+'&fileName_dis='+dis);
	}

	function scenePrint()
	{
		if (document.all && window.print) { 
			window.onbeforeprint = preShot ; 
			window.onafterprint = nxtShot ; 
			window.print(); 
		}
	}

	var dump_string = '' ; 

	function preShot()
	{
		var copyright = document.all.copy_area.innerHTML ; 
		dump_string = document.body.innerHTML ; 
		document.body.innerHTML = document.all.print_area.innerHTML+copyright ; 
	}

	function nxtShot()
	{
		document.body.innerHTML = dump_string ; 
	}

	function SetRst(e)
	{
		window.resizeTo(e+10, 380) ;
	}

	function SetPageBack()
	{
		history.back() ; 
	}

	function WinClose()
	{
		window.close() ; 
	}

	function ChkNull(aVal)
	{
		for (i=0; i<aVal.length ; i++)
		{
			tmp = aVal.substring(i, i+1) ; 
			if ((tmp != ' ')&&(tmp != '\r')&&(tmp != '\n')&&(tmp != '\t')&&(tmp != '\b')&&(tmp != '\v')&&(tmp != '\f')) {
			  return false;
		   }
		}
		return true ; 
	}

	function ChkNumber(aVal)
	{
		var tmp = "1234567890" ; 
		var strLength = aVal.length ; 
		for (i=0; i<strLength ; i++)
		{
			if (tmp.indexOf(aVal.substring(i, i+1)) < 0)
			{
				return false ; 
			}
		}
		if (aVal.length == 0)
			return false ; 
		else
			return true ; 
	}

	function ChkString(str,compstr)
	{
		var tmp = compstr ; 
		var tmpLength = tmp.length ; 

		for (i=0; i<tmpLength ; i++)
		{
			if (tmp.indexOf(str.substring(i,i+1)) < 0)
			{
				return false ; 
			}
		}
		return true ; 
	}

	function ChkEmail(eMailValue)
	{
		var cStr1 = "1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz@.-_" ; 
		if (ChkString(eMailValue,cStr1) == false)	
			return false ; 

		var StrLength = eMailValue.length ; 
		var AtLength = 0 ; 
		var DotLength = 0 ; 
		for (var i = 0 ; i < StrLength ; i++)
		{
			compStr = eMailValue.charAt(i)
			if (compStr == "@")
				AtLength ++ ; 

			if (compStr == ".")
				DotLength ++ ; 
		}

		if (AtLength != 1 || DotLength < 1)
			return false ; 

		var tmpLength = 0 ; 
		tmpLength = eMailValue.indexOf("@") ; 

		if (tmpLength < 1)
			return false ; 

		return true ; 
	}

	function LenthCheck(fmm, aVal)
	{
		var msg = new String(fmm.value);
		var stopPoint = 0 ; 
		var stopState = true ; 

		var strLength = 0;
		for (i = 0; i < msg.length; i ++) {
			if (msg.charCodeAt(i) > 255) strLength += 2 ;
			if (msg.charCodeAt(i) > 255) strLength ++ ;
			else strLength ++ ;

			if (stopState) {
				if (strLength > aVal) {
					stopPoint = i -- ; 
					stopState = false ; 
				}
			}
		}
		if (strLength > aVal) {
			alert(aVal+" Byte 까지만 입력 가능합니다.");
			var mmc = fmm.value ;  
			fmm.value = mmc.substr(0 , stopPoint) ; 
		}
	}

	function selDate(e) { window.open ("/common/hsm_calendar.asp?flag="+e, "cal", "width=200, height=170"); }

	function CheckboxChecked(ctl){
		var isChecked = false;
		if(ctl.length > 1){			
			for(var i = 0; i < ctl.length; i++){
				if(ctl[i].checked){
					isChecked = true;
					break;
				}
			}
		} else {
			isChecked = ctl.checked;
		}
		return isChecked;
	}

	function getXY(Obj) 
	{
		for (var sumTop=0, sumLeft=0; Obj!=document.body; sumTop+=Obj.offsetTop, sumLeft+=Obj.offsetLeft, Obj=Obj.offsetParent);
		return { left:sumLeft,top:sumTop }
	}

	var HEIGHT_LINE_MENU = 25;

	function SM_CLICK(oC, oSubDiv)
	{
		g_bShownTMenu = true;
		var RelObjCords = getXY(oC);
		oSubDiv.style.left = RelObjCords.left;
		oSubDiv.style.top = RelObjCords.top + HEIGHT_LINE_MENU;
		oSubDiv.style.display="";
	}

	function SM_BLUR(oC, oSubDiv) { g_bShownTMenu = false; oSubDiv.style.display="none"; }


	function select_pjt() {
		if (ChkNull(document.xmForm.pjt_id.value)) {
			alert("프로젝트를 선택해주세요!"); 
			return; 
		} else {
			parent.left.document.location.href = "frame_left.asp?pjt_id="+document.xmForm.pjt_id.value; 
			parent.right.document.location.href = "cmain.asp?pjt_id="+document.xmForm.pjt_id.value; 
			return; 
		}
	}

	function select_config() {
		parent.right.document.location.href = "/config/index.asp"; 
	}



	function filter_characterset(e)
	{
		if ((e > 32 && e < 48) || (e > 57 && e < 65) || (e > 90 && e < 97)) event.returnValue=false;
	}
	function filter_number(e)
	{
		if (e < 48 || 57 < e) event.returnValue=false;
	}
	function filter_email(e)
	{
		if ((e > 32 && e < 46) || (e == 47) || (e > 57 && e < 64) || (e > 90 && e < 97)) event.returnValue=false;
	}
	function filter_address(e)
	{
		// "-", "/" 를 허용함. (45, 47)
		if ((e > 32 && e < 45) || (e > 45 && e < 47) || (e > 57 && e < 65) || (e > 90 && e < 97)) event.returnValue=false;
	}

	function sch_zipcode()
	{
		window.open("/common/sch_zipcode.jsp", "sch_zipcode", "width=518, height=420, top=0, left=0, scrollbars=yes");
	}
	function getZipcode(zipcode, address)
	{
		document.sForm.zipcode.value = zipcode;
		document.sForm.address_1.value = address;
		document.sForm.address_2.focus();
	}
	
	// 특수문자 체크
	function checkAllSpecialChar(expression)
	{
	   var strSpecial = "`|\\\'\"";
	 
	   for(var i=0;i<expression.length;i++)
	   {
	    for(var j=0;j<strSpecial.length;j++)
	    {
	      if(expression.charAt(i) == strSpecial.charAt(j))
	      {
			return false;   // 특수문자가 있으면.. false값을 돌려보냅니다.
	      }
	    }
	   }
	
	   return true;
	}	
	
//-->
