// ÀÌ¸ÞÀÏ Ã¼Å©
	function emailCheck(email)
	{
		 var fmt3 = /^[-!#$%&\'*+\\./0-9=?A-Z^_a-z{|}~]+@[-!#$%&\'*+\\/0-9=?A-Z^_a-z{|}~]+\.[-!#$%&\'*+\\./0-9=?A-Z^_a-z{|}~]+$/;
		 
		  if (!fmt3.test(email)) {
		    return false;
		  }
		  else
		  {
			  return true;
		  }
	}	
	
	// °ø¹éÃ¼Å©
	function Trim( text ) 
	{
		var text1 = text.replace( /^ +/, "" );
		var text2 = text1.replace( / +$/, "" );

		return text2;
	}
	
	// ÆäÀÌÂ¡ ¸µÅ©
	function pageList(page){
	    document.pageForm.currentPage.value=page;
	    document.pageForm.submit();
	}
	
	// ÀüÆäÀÌÁö ÀÌµ¿
	function goBack()
	{
		history.go(-1);	
	}	
	
	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.0
	  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 && document.getElementById) x=document.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 openWin(winURL, winName, winWidth, winHeight, winLeft, winTop) 
	{
	    window.open(winURL, winName, "fullscreen=no,titlebar=no,toolbar=no,directories=no,status=no,menubar=no, scrollbars=no,resizable=no,width="+winWidth+",height="+winHeight+",left="+winLeft+",top="+winTop);
	}

	// ¿ë¾î»çÀü ¶ç¿ì±â
	function openDic(winURL, winName, winWidth, winHeight, winLeft, winTop, word) 
	{
		//if (Trim(word) != "")
		    window.open(winURL+"?findstr="+word, winName, "fullscreen=no,titlebar=no,toolbar=no,directories=no,status=no,menubar=no, scrollbars=no,resizable=no,width="+winWidth+",height="+winHeight+",left="+winLeft+",top="+winTop);
	}
	
	// ¾àÇ°Á¤º¸
	function openDrug(winURL, winName, winWidth, winHeight, winLeft, winTop, word) 
	{
		//if (Trim(word) != "")
		    window.open(winURL+"?product="+word, winName, "fullscreen=no,titlebar=no,toolbar=no,directories=no,status=no,menubar=no, scrollbars=yes,resizable=no,width="+winWidth+",height="+winHeight+",left="+winLeft+",top="+winTop);
	}

	/*
	 * ¸ð´Þ ´ÙÀÌ¾ó·Î±× ¹Ú½º¸¦ ¶ç¿î´Ù.
	 * ´ÙÀÌ¾ó·Î±×¿¡¼­ ³Ñ°ÜÁØ °ªÀ» ¸®ÅÏ
	 */
	function cfShowModal( modalWindowName, arg, width, height, useQueryString){
	  var arr;
	  if ( !useQueryString )
	  {
	    arr = showModalDialog( modalWindowName,
	              arg,
	              "scroll:no; font-family:Verdana; font-size:12; status:no; dialogLeft:" + (screen.width/2 - width/2)  + "px; dialogTop:" + (screen.height/2 - height/2)
	              + "px; dialogWidth:" + width + "px; dialogHeight:" + height + "px;Help:No");
	  }
	  else
	  {
	    arr = showModalDialog( modalWindowName,
	              arg,
	              "scroll:no; font-family:Verdana; font-size:12; status:no; dialogLeft:" + (screen.width/2 - width/2)   + "px; dialogTop:" + (screen.height/2 - height/2)
	              + "px; dialogWidth:" + width + "px; dialogHeight:" + height + "px;Help:No");
	  }
	    return arr;
	}
	
	
	/*
	 * ´Þ·Â ÆË¾÷ À©µµ¿ì¸¦ ¿ÀÇÂÇÑ´Ù.
	 * ÆÄ¶ó¸ÞÅÍ : objTextBox => ´Þ·Â¿¡¼­ ³¯Â¥¸¦ ¼±ÅÃ½Ã ³¯Â¥¸¦ displayÇÒ Text Box
	 *            delemeter => ³â¿ùÀÏÀ» ±¸ºÐÇÒ ¹®ÀÚ ¿¹)'-', '.', '/'
	 */
	function cfCalendarPopup(objTextBox){
	
	  var day;
	  day = cfShowModal("/nciapps/admin/include/Calendar.jsp", null, 215, 265, false);
	
	  var day01;
	  if(typeof(day) != "undefined")
	  {
	    day01 = day.split("-");
	    if( day01[1].length == 1) day01[1] = "0" + day01[1] ;
	    if( day01[2].length == 1) day01[2] = "0" + day01[2] ;
	    var day02 = day01[0]+ "-" + day01[1] + "-" + day01[2];
	    objTextBox.value = day02;
	  }
	  else
	  {
	    return;
	  }
	}


function reSize() { 
    try { 
        var objBody = auto_iframe.document.body; 
        var objFrame = document.all["auto_iframe"]; 
        ifrmHeight = objBody.scrollHeight + (objBody.offsetHeight - objBody.clientHeight); 
        objFrame.style.height = ifrmHeight; 
    } 
        catch(e) {} 
} 

function init_iframe() { 
    reSize(); 
    setTimeout('init_iframe()',1) 
} 

init_iframe(); 	


function printsub() {
	factory.printing.printer = "";  //´Þ¶óµµ»ó°ü¾ø½À´Ï´Ù.
  factory.printing.header       = "";   //¸Ó¸®±Û
  factory.printing.footer       = "" ;   //¹Ù´Ú±Û
  window.onbeforeprint = phide2;
  window.onafterprint = pshow2;
  factory.printing.portrait     = true; // true ¼¼·ÎÃâ·Â , false °¡·ÎÃâ·Â
  factory.printing.leftMargin   = 10;
  factory.printing.topMargin    = 10;
  factory.printing.rightMargin  = 10;
  factory.printing.bottomMargin = 10;

  factory.printing.Print( false, window ); // ´ëÈ­»óÀÚ Ç¥½Ã¿©ºÎ / Ãâ·ÂµÉ ÇÁ·¹ÀÓ¸í
}
	
function phide() {
  alldoc.style.display='none';
  parea.style.display = 'block';
}

function pshow() {
  alldoc.style.display='block';
  parea.style.display = "none";
}

function allprint() {
  factory.printing.printer = "";  //´Þ¶óµµ»ó°ü¾ø½À´Ï´Ù.
  factory.printing.header       = "";   //¸Ó¸®±Û
  factory.printing.footer       = "" ;   //¹Ù´Ú±Û
  window.onbeforeprint = phide2;
  window.onafterprint = pshow2;
  factory.printing.portrait     = false; // true ¼¼·ÎÃâ·Â , false °¡·ÎÃâ·Â
  factory.printing.leftMargin   = 10;
  factory.printing.topMargin    = 10;
  factory.printing.rightMargin  = 10;
  factory.printing.bottomMargin = 10;

  factory.printing.Print( false, window ); // ´ëÈ­»óÀÚ Ç¥½Ã¿©ºÎ / Ãâ·ÂµÉ ÇÁ·¹ÀÓ¸í
}

function phide2() {
  header  = factory.printing.header      ;
  footer  = factory.printing.footer      ;
  leftm   = factory.printing.leftMargin  ;
  topm    = factory.printing.topMargin   ;
  rightm  = factory.printing.rightMargin ;
  bottomm = factory.printing.bottomMargin;
  alldoc.style.display='block';
  parea.style.display = "none";
}
 
function pshow2(){
  factory.printing.header         = header ;
  factory.printing.footer         = footer ;
  factory.printing.leftMargin     = leftm  ;
  factory.printing.topMargin      = topm   ;
  factory.printing.rightMargin    = rightm ;
  factory.printing.bottomMargin   = bottomm;
  alldoc.style.display='block';
  parea.style.display = "none";
}