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.01
  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 && d.getElementById) x=d.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 reset()
{
document.form_main.reset();
}


function public_state()
{
	j_url = '/doc/02/dPublicState.html'; 
	window.open(j_url,'DIGITAL2','resizable=1,width=645,height=480,scrollbars=no');
}

function public_result(jp_cgbn,jp_regseq,jp_regseq1,jp_fgbn,jp_tgbn1)
{
	j_url = '/doc/02/dPublicResult.html?cgbn='+jp_cgbn+'&regseq='+jp_regseq+'&regseq1='+jp_regseq1+'&fgbn='+jp_fgbn+'&tgbn1='+jp_tgbn1; 
	window.open(j_url,'DIGITAL2','resizable=1,width=370,height=250,scrollbars=no');
}

function open_guide()
{
	j_url = '/doc/03/pop_notice.html'; 
	window.open(j_url,'DIGITAL2','resizable=1,width=450,height=660,scrollbars=no');
}

function register_open()
{
	j_url = '/doc/S01/conferenceU_pop01.html'; 
	window.open(j_url,'DIGITAL2','resizable=1,width=468,height=440,scrollbars=no,left=10,top=10');
}

function register_openN()
{
	j_url = '/doc/S01/conferenceU_pop01N.html'; 
	window.open(j_url,'DIGITAL2','resizable=1,width=468,height=440,scrollbars=no,left=10,top=10');
}

function res_agree(jp_regseq,jp_seq)
{
	j_url = 'pop1.html?regseq='+jp_regseq+'&seq='+jp_seq; 
	window.open(j_url,'DIGITAL2','resizable=1,width=319,height=144,scrollbars=no');
}

function case_agree(jp_regseq,jp_seq)
{
	j_url = 'pop3.html?regseq='+jp_regseq+'&seq='+jp_seq; 
	window.open(j_url,'DIGITAL2','resizable=1,width=319,height=144,scrollbars=no');
}

function open_alert()
{
	alert("·Î±×ÀÎ ÈÄ »ç¿ëÇØ ÁÖ¼¼¿ä.");	
}

function jump_member()
{
	var j_url='';
	alert("µðÁöÅÐ2 »çÀÌÆ®¸¦ ¹æ¹®ÇØÁÖ¼Å¼­ °¨»çÇÕ´Ï´Ù!. \n\n SERI.org È¸¿øÀ¸·Î °¡ÀÔÇÏ½Ã¸é µðÁöÅÐ2 »çÀÌÆ®¸¦ ÀÌ¿ë ÇÒ ¼ö ÀÖ½À´Ï´Ù.");		
	j_url="http://www.seri.org/cc/ccRealName.html?s_menu=0603&sgubun=D";	
	top.document.location.href=j_url;
}


function end_public()
{
	alert("Digital2 ¿¬±¸°ø¸ð°¡ 1Â÷ ¸¶°¨µÇ¾ú½À´Ï´Ù.\n\n»õ·Î¿î ÁÖÁ¦·Î ¿¬±¸¸¦ °ø¸ðÇÏ´Â 2Â÷ ¿¬±¸°ø¸ð¿¡µµ ¸¹Àº Âü¿© ºÎÅ¹µå¸³´Ï´Ù.");	
}

function MM_jumpMenu(){
	var j_url;
	j_url ='dDigitalOld.html'
	document.form_jump.action=j_url;
	document.form_jump.submit();
}

function MM_jumpMenu1(){
	var j_url;
	j_url ='dDigitalSERI.html'
	document.form_jump.action=j_url;
	document.form_jump.submit();
}

function open_about(jp_seq)
{
	j_url = '/doc/about/sub_about0'+jp_seq+'_new.html'; 
	window.open(j_url,'DIGITAL2','resizable=1,width=790,height=700,scrollbars=no');
}

function open_research(jp_cgbn,jp_seq)
{
	j_url = '/doc/dDigitalProcPopup.html?regseq='+jp_seq+'&cgbn='+jp_cgbn; 
	window.open(j_url,'DIGITAL2','resizable=0,width=590,height=560,scrollbars=no');
}

function open_public(jp_cgbn,jp_seq)
{
	j_url = '/doc/dDigitalJoinPopup.html?regseq='+jp_seq+'&cgbn='+jp_cgbn; 
	window.open(j_url,'DIGITAL2','resizable=0,width=620,height=680,scrollbars=no,left=10,top=10');
}

function open_auth(jg_userid)
{
        var j_post;
        j_post = '/d2way/d2way_setup.html?l_userid='+jg_userid;
        window.open(j_post,'SERIWay','resizable=no,width=420,height=140,scrollbars=no,status=no,toolbar=no');
}

function open_popupd(jp_key,jp_menu,jp_path_cd,jp_pdf,jp_regseq)
{
	j_url = 'pdfpopupd.html?pub_key=' + jp_key + '&s_menu=' + jp_menu + '&path_cd='+jp_path_cd+'&pdf='+jp_pdf+'&regseq='+jp_regseq; 
	window.open(j_url,'pdf','resizable=1,width=800,height=700,scrollbars=yes');
}



function open_popup(jp_key,jp_menu,jp_path_cd,jp_pdf)
{
	j_url = 'pdfpopup.html?pub_key=' + jp_key + '&s_menu=' + jp_menu + '&path_cd='+jp_path_cd+'&pdf='+jp_pdf; 
	window.open(j_url,'pdf','resizable=1,width=800,height=700,scrollbars=yes');
}

function wbopen_popup(jp_key,jp_menu,jp_path_cd,jp_pdf)
{
        j_url = 'wbpdfpopup.html?pub_key=' + jp_key + '&s_menu=' + jp_menu + '&path_cd='+jp_path_cd+'&pdf='+jp_pdf;
        window.open(j_url,'pdf','resizable=1,width=800,height=700,scrollbars=yes');
}

function digitalabout(jp_gbn)
{	
	  var j_url;        
    j_url ='/doc/about/sub_about0'+jp_gbn+'.html';	      
    window.open(j_url,'Complexity','status=no,scrollbars=yes,resizable=no,width=850,height=750,left=10,top=10');     
	
}

function open_ViewV(jp_no,jp_menu,jp_p_seq)
{	
    var j_url;        
    j_url ='/viewer/default.htm?p_menu='+jp_menu+'&p_seq='+jp_p_seq+'&mediano='+jp_no;	      
    window.open(j_url,'Complexity','status=no,scrollbars=no,resizable=no,width=850,height=600,left=10,top=10');     
}

function open_SPViewV(jp_regseq,jp_broadt,jp_seq)
{	
    var j_url;        
    j_url ='/newviewer/default.html?regseq='+jp_regseq+'&broadt='+jp_broadt+'&mediano='+jp_seq;	      
    window.open(j_url,'Complexity','status=no,scrollbars=no,resizable=no,width=850,height=600,left=10,top=10');     
}

function open_CPWorkshop(jp_session,jp_seq,jp_index) {
    var j_url;        
    j_url ='mms://media.seri.org/SERIWMS/COMPLEX/complexcity-workshop-Session'+jp_session+'-'+jp_seq+'-'+jp_index+'.wmv';	      
	location.href = j_url; 
}

function open_CPWorkshop(jp_session,jp_seq) {
    var j_url;        
    j_url ='mms://media.seri.org/SERIWMS/COMPLEX/complexcity-workshop-Session'+jp_session+'-'+jp_seq+'.wmv';     
	location.href = j_url;
}


      function check_form(jp_form)
      {
        var j_custid = document.form1.duserid.value;
        var j_passwd = document.form2.dpasswd.value;

        document.form1.passwd.value = j_passwd;
        document.form2.duserid.value = j_custid;
        document.form3.duserid.value = j_custid;
        document.form3.passwd.value = j_passwd;

        if((j_custid == null) || (j_custid == ''))
        {
          alert('È¸¿øID¸¦ ÀÔ·ÂÇÏ½Ê½Ã¿À!');
          document.form1.duserid.focus();
          return false;
        }
        if((j_passwd == null) || (j_passwd == ''))
        {
           alert('ºñ¹Ð¹øÈ£¸¦ ÀÔ·ÂÇØ ÁÖ½Ê½Ã¿À!');
           document.form2.dpasswd.focus();
           return false;
        }
        return true;
      }

      function check_form1(jp_form)
      {
        var j_custid = document.form1.duserid.value;
        var j_passwd = document.form2.dpasswd.value;

        document.form1.dpasswd.value = j_passwd;
        document.form2.duserid.value = j_custid;
        document.form3.duserid.value = j_custid;
        document.form3.dpasswd.value = j_passwd;

        if((j_custid == null) || (j_custid == ''))
        {
          alert('È¸¿øID¸¦ ÀÔ·ÂÇÏ½Ê½Ã¿À!');
          document.form1.duserid.focus();
          return;
        }
        if((j_passwd == null) || (j_passwd == ''))
        {
           alert('ºñ¹Ð¹øÈ£¸¦ ÀÔ·ÂÇØ ÁÖ½Ê½Ã¿À!');
           document.form2.dpasswd.focus();
           return;
        }
        jp_form.submit();
      }
      
      function seriidcheck()
{
        var dest = 'http://www.seri.org/cc/ccIdCheck.html';
        var id_val = document.form2.custid.value;

        if (id_val != null && id_val != "")
                dest = dest + '?custid='+ id_val;
				newWin = window.open(dest, 'StartWindow', 'scrollbars=no,toolbar=no,location=no,directories=no,width=380,height=300,resizable=no,mebar=no,left=250,top=65');
}

function open_postno()
{
        var j_post;
        j_post = 'http://www.seri.org/cc/ccPostCode.html';
        window.open(j_post,'postno_window','resizable=0,width=468,height=480,scrollbars=yes');
}
 
function GoSave(){ 

	f=document.form_main;
	
	if(check_null(f.title, 'Á¦¸ñ', '1' )==false ) return;	
	if(check_null(f.contents, '³»¿ë','1' )==false ) return;	

	    var j_loop;
	    for(j_loop = 1;j_loop < document.form_main.bsfile.length;j_loop++)
        {
          if(document.form_main.bsfile.options[j_loop].value == '')
            document.form_main.bsfile.options[j_loop] = null;
        }

        var j_p_upfile = '';
        for(j_loop = 1;j_loop < document.form_main.bsfile.length;j_loop++)
        {
            j_p_upfile = j_p_upfile + document.form_main.bsfile.options[j_loop].value + '*';
        }
        document.form_main.p_upfile.value = j_p_upfile;
		f.action='dPublicJoinS.html';
		f.submit(); 
}

function GoSave_conf(){ 

	f=document.form_main;
	
	if(check_null(f.title, 'Á¦¸ñ', '1' )==false ) return;	
	if(check_null(f.contents, '³»¿ë','1' )==false ) return;	

	    var j_loop;
	    for(j_loop = 1;j_loop < document.form_main.bsfile.length;j_loop++)
        {
          if(document.form_main.bsfile.options[j_loop].value == '')
            document.form_main.bsfile.options[j_loop] = null;
        }

        var j_p_upfile = '';
        for(j_loop = 1;j_loop < document.form_main.bsfile.length;j_loop++)
        {
            j_p_upfile = j_p_upfile + document.form_main.bsfile.options[j_loop].value + '*';
        }
        document.form_main.p_upfile.value = j_p_upfile;
		f.action='dPaperS.html';
		f.submit(); 
}

function GoSave_M(){ 

	f=document.form_main;
	
	if(check_null(f.title, 'Á¦¸ñ', '1' )==false ) return;	
	if(check_null(f.contents, '³»¿ë','1' )==false ) return;	

	    var j_loop;
	    for(j_loop = 1;j_loop < document.form_main.bsfile.length;j_loop++)
        {
          if(document.form_main.bsfile.options[j_loop].value == '')
            document.form_main.bsfile.options[j_loop] = null;
        }

        var j_p_upfile = '';
        for(j_loop = 1;j_loop < document.form_main.bsfile.length;j_loop++)
        {
            j_p_upfile = j_p_upfile + document.form_main.bsfile.options[j_loop].value + '*';
        }
        document.form_main.p_upfile.value = j_p_upfile;
		f.action='dPublicJoinMS.html';
		f.submit(); 
}

function GoSave_confM(){ 

	f=document.form_main;
	
	if(check_null(f.title, 'Á¦¸ñ', '1' )==false ) return;	
	if(check_null(f.contents, '³»¿ë','1' )==false ) return;	

	    var j_loop;
	    for(j_loop = 1;j_loop < document.form_main.bsfile.length;j_loop++)
        {
          if(document.form_main.bsfile.options[j_loop].value == '')
            document.form_main.bsfile.options[j_loop] = null;
        }

        var j_p_upfile = '';
        for(j_loop = 1;j_loop < document.form_main.bsfile.length;j_loop++)
        {
            j_p_upfile = j_p_upfile + document.form_main.bsfile.options[j_loop].value + '*';
        }
        document.form_main.p_upfile.value = j_p_upfile;
		f.action='dPaperMS.html';
		f.submit(); 
}

function GoSaveReq(){ 

	f=document.form_main;
	
	if(check_null(f.res_title, '¿¬±¸¸í', '1' )==false ) return;	
	if(check_null(f.res_intro, '¿¬±¸ÀÚ¼Ò°³','1' )==false ) return
	if(check_null(f.res_desc, '¿¬±¸°³¿ä', '1' )==false ) return;		
	   
	f.action='dCaseGiveReS.html';
	f.submit(); 
}

function GoSaveGiv(){ 

	f=document.form_main;
	
	if(check_null(f.comp_nm, '±â¾÷¸í','1' )==false ) return
	if(check_null(f.title, '»ç·Ê¸í', '1' )==false ) return;	
	if(check_null(f.case_contents, '»ç·Ê³»¿ë', '1' )==false ) return;		
	   
	f.action='dCaseFindReS.html';
	f.submit(); 
}

function GoSave_p(){ 

	f=document.form_main;

	if(check_null(f.title, 'Á¦¸ñ', '1' )==false ) return;	
	if(check_null(f.contents, '³»¿ë','1' )==false ) return;

	    var j_loop;
	    for(j_loop = 1;j_loop < document.form_main.bsfile.length;j_loop++)
        {
          if(document.form_main.bsfile.options[j_loop].value == '')
            document.form_main.bsfile.options[j_loop] = null;
        }

        var j_p_upfile = '';
        for(j_loop = 1;j_loop < document.form_main.bsfile.length;j_loop++)
        {
            j_p_upfile = j_p_upfile + document.form_main.bsfile.options[j_loop].value + '*';
        }
        document.form_main.p_upfile.value = j_p_upfile;
		f.action='/doc/dDigitalJoinPopupS.html';
		f.submit(); 
}

function add_file(jp_cgbn)
{
	var j_cgi;
	var j_loop;
	for(j_loop = 1;j_loop < document.form_main.bsfile.length;j_loop++)
	{
  		if(document.form_main.bsfile.options[j_loop].value == '')
    		document.form_main.bsfile.options[j_loop] = null;
	}
	document.form_main.bsfile.options[document.form_main.bsfile.length] = new Option('','');
	j_cgi = "/doc/02/dJoinUpload.html?cgbn="+jp_cgbn+"&p_opendoc=opener.document.form_main.bsfile";

	window.open(j_cgi,'DIGITALUPLOAD','resizable=0,width=430,height=100,scrollbars=no');

}

function delete_file(jp_cgbn)
{
	var j_loop;
	for(j_loop = 1;j_loop < document.form_main.bsfile.length;j_loop++)
	{
		if(document.form_main.bsfile.options[j_loop].selected == true)
		{
			document.form_main.bsfile.options[j_loop] = null;
			var j_cnt = parseInt(document.form_main.bsfile.options[0].value,10) - 1;
			document.form_main.bsfile.options[0].text = '------------------------ Ã·ºÎÆÄÀÏ '+j_cnt+'°³ ------------------------';
			document.form_main.bsfile.options[0].value = j_cnt;
		}
	}
}

function GoSave1(){ 

	f=document.form_main;

	if(check_null(f.title, '¿¬±¸Á¦¸ñ', '1' )==false ) return;	
	if(check_null(f.res_intro, '¿¬±¸ÀÚ¼Ò°³','1' )==false ) return;
	if(check_null(f.res_intro, '¿¬±¸°³¿ä','1' )==false ) return;

	    var j_loop;
	    for(j_loop = 1;j_loop < document.form_main.bsfile.length;j_loop++)
        {
          if(document.form_main.bsfile.options[j_loop].value == '')
            document.form_main.bsfile.options[j_loop] = null;
        }

        var j_p_upfile = '';
        for(j_loop = 1;j_loop < document.form_main.bsfile.length;j_loop++)
        {
            j_p_upfile = j_p_upfile + document.form_main.bsfile.options[j_loop].value + '*';
        }
        document.form_main.p_upfile.value = j_p_upfile;
		f.action='dCaseS.html';
		f.submit(); 
}

function GoSave2(){ 

	f=document.form_main;

	if(check_null(f.comp_nm, '±â¾÷/±â°ü¸í','1' )==false ) return;
	if(check_null(f.dept_nm, 'ºÎ¼­', '1' )==false ) return;		
	if(check_null(f.jikwi_nm, 'Á÷À§', '1' )==false ) return;		
	if(check_null(f.address, 'ÁÖ¼Ò', '1' )==false ) return;		
	if(check_null(f.title, '»ç·Ê¸í', '1' )==false ) return;			
	if(check_null(f.casereason, '»ç·Ê°³¹ßµ¿±â','1' )==false ) return;
	if(check_null(f.contents, '³»¿ë¿ä¾à','1' )==false ) return;	   
	f.action='dCaseNewS.html';
	f.submit(); 
}

function GoSave6(){ 

	f=document.form_main;

	if(check_null(f.comp_nm, '¼Ò¼Ó','1' )==false ) return;
	if(check_null(f.dept_nm, '¼Ò¼ÓºÎ¼­', '1' )==false ) return;		
	if(check_null(f.jikwi_nm, 'Á÷À§', '1' )==false ) return;		
	if(check_null(f.address, 'ÁÖ¼Ò', '1' )==false ) return;			
	if(check_null(f.contactpoint, '¿¬¶ôÃ³','1' )==false ) return;
	if(check_null(f.casereason, '»ç·ÊÁýÇÊÀÌ·Â','1' )==false ) return;
	if(check_null(f.contents, '³»¿ë°³¹ßµ¿±â','1' )==false ) return;	   
	f.action='dCaseNewS.html';
	f.submit(); 
}


function add_file1(jp_path)
{
	var j_cgi;
	var j_loop;
	for(j_loop = 1;j_loop < document.form_main.bsfile.length;j_loop++)
	{
  		if(document.form_main.bsfile.options[j_loop].value == '')
    		document.form_main.bsfile.options[j_loop] = null;
	}
	document.form_main.bsfile.options[document.form_main.bsfile.length] = new Option('','');
	j_cgi = "dCaseUpload.html?cgbn="+jp_path+"&p_opendoc=opener.document.form_main.bsfile";

	window.open(j_cgi,'DIGITALUPLOAD','resizable=0,width=430,height=100,scrollbars=no');

}
function delete_file1(jp_path)
{
	var j_loop;
	for(j_loop = 1;j_loop < document.form_main.bsfile.length;j_loop++)
	{
		if(document.form_main.bsfile.options[j_loop].selected == true)
		{
			document.form_main.bsfile.options[j_loop] = null;
			var j_cnt = parseInt(document.form_main.bsfile.options[0].value,10) - 1;
			document.form_main.bsfile.options[0].text = '------------------------ Ã·ºÎÆÄÀÏ '+j_cnt+'°³ ------------------------';
			document.form_main.bsfile.options[0].value = j_cnt;
		}
	}
}

function GoSave3(){ 

	f=document.form_main;

	if(check_null(f.title, 'Á¦¸ñ', '1' )==false ) return;	
	if(check_null(f.contents, '³»¿ë','1' )==false ) return;

	    var j_loop;
	    for(j_loop = 1;j_loop < document.form_main.bsfile.length;j_loop++)
        {
          if(document.form_main.bsfile.options[j_loop].value == '')
            document.form_main.bsfile.options[j_loop] = null;
        }

        var j_p_upfile = '';
        for(j_loop = 1;j_loop < document.form_main.bsfile.length;j_loop++)
        {
            j_p_upfile = j_p_upfile + document.form_main.bsfile.options[j_loop].value + '*';
        }
        document.form_main.p_upfile.value = j_p_upfile;
		f.action='/doc/dDigitalDirPopupS.html';
		f.submit(); 
}
function GoSave4(){ 

	f=document.form_main;

	if(check_null(f.title, 'Á¦¸ñ', '1' )==false ) return;	
	if(check_null(f.contents, '³»¿ë','1' )==false ) return;
 	f.action='/d2way/d2Bridge3_sub3NS.html';
	f.submit(); 
}
function GoSave5(){ 

	f=document.form_main;

	if(check_null(f.title, 'Á¦¸ñ', '1' )==false ) return;	
	if(check_null(f.contents, '³»¿ë','1' )==false ) return;
 	f.action='/d2way/d2Bridge3_sub3RS.html';
	f.submit(); 
}

function GoSave4M(){ 

	f=document.form_main;

	if(check_null(f.title, 'Á¦¸ñ', '1' )==false ) return;	
	if(check_null(f.contents, '³»¿ë','1' )==false ) return;
 	f.action='/d2way/d2Bridge3_sub3MS.html';
	f.submit(); 
}

function send_mail(){  

	f=document.form_main;

	if(check_null(f.title, 'Á¦¸ñ', '1' )==false ) return;	
	if(check_null(f.contents, '³»¿ë','1' )==false ) return;   
	   
	f.action='d2BridgeSend.html';
	f.submit(); 
}




function add_file2(jp_cgbn)
{
	var j_cgi;
	var j_loop;
	for(j_loop = 1;j_loop < document.form_main.bsfile.length;j_loop++)
	{
  		if(document.form_main.bsfile.options[j_loop].value == '')
    		document.form_main.bsfile.options[j_loop] = null;
	}
	document.form_main.bsfile.options[document.form_main.bsfile.length] = new Option('','');
	j_cgi = "/doc/dDirUpload.html?cgbn="+jp_cgbn+"&p_opendoc=opener.document.form_main.bsfile";

	window.open(j_cgi,'DIGITALUPLOAD','resizable=0,width=430,height=100,scrollbars=no');

}

 function fnTrim(chStr) { // trim
     var nStrCheck; 
     nStrCheck = chStr.indexOf(" ");     
     while (nStrCheck != -1) 
     { 
         chStr = chStr.replace(" ", ""); 
         nStrCheck  = chStr.indexOf(" "); 
     } 
     return chStr;               
 }


// ÇÊ¼ö Ç×¸ñ Ã½Å© 
     function check_null(g_obj,g_msg,g_focus)
    {

		//	if(!rf.toemail.value) {



        if(!fnTrim(g_obj.value))
        {
	          alert(g_msg + 'Àº(´Â) ÀÔ·ÂÇÊ¼öÀÔ´Ï´Ù!');
	          if(g_focus)
		        g_obj.focus();
			  return false;
        }
        else
          return true;
      }


	//ÃÖ´ë ±ÛÀÚ¼ö 
      function check_length(jg_obj,jg_len,jg_msg,jg_focus)
      {
        var j_loop,j_len;

        if(jg_obj.value.length <= 0)
          return true;

        j_len = 0;
        for(j_loop = 0;j_loop < jg_obj.value.length;j_loop++)
        {
          if(jg_obj.value.charCodeAt(j_loop) > 255)
            j_len += 2;
          else
            j_len += 1;
        }

        if(j_len <= jg_len)
          return true;
        else
        {
          alert(jg_msg + ' ÇÑ±Û ' + jg_len/2 + 'ÀÚ ±îÁö¸¸ ÀÔ·ÂÀ» Çã¿ëÇÕ´Ï´Ù!');
          if(jg_focus)
            jg_obj.focus();
          return false;
        }
      }

//******************* È­¸é ¿ìÃø ·¹ÀÌ¾î ¼Ò½º ½ÃÀÛ **************************//
var stmnLEFT = 712;		// Layer ÁÂÃø À§Ä¡
var stmnGAP1 = 80;	   // ½ÃÀÛ »ó´ÜÀ§Ä¡(½ºÅ©·Ñ±â´É ²°À»°æ¿ì À§Ä¡¹Ý¿µ)
var stmnGAP2 = 60;		// ½ºÅ©·Ñ½Ã ºê¶ó¿ìÀú »ó´Ü°ú ¾à°£ ¶ç¿ò. ÇÊ¿ä¾øÀ¸¸é 0À¸·Î ¼¼ÆÃ
var stmnBASE = 500;		// È­¸é ·Îµå½Ã ·¹ÀÌ¾î ½ÃÀÛÀ§Ä¡
var stmnActivateSpeed = 220; // ¿òÁ÷ÀÓÀ» °¨ÁöÇÏ´Â ¼Óµµ (¼ýÀÚ°¡ Å¬¼ö·Ï ´Ê°Ô ¾Ë¾ÆÂ÷¸²)
var stmnScrollSpeed = 10; // ½ºÅ©·ÑµÇ´Â ¼Óµµ (Å¬¼ö·Ï ´Ê°Ô ¿òÁ÷ÀÓ)
var stmnTimer;

function ReadCookie(name) {
	var label = name + "=";
	var labelLen = label.length;
	var cLen = document.cookie.length;
	var i = 0;
	while (i < cLen) {
		var j = i + labelLen;
		if (document.cookie.substring(i, j) == label) {
			var cEnd = document.cookie.indexOf(";", j);
		if (cEnd == -1) cEnd = document.cookie.length;
			return unescape(document.cookie.substring(j, cEnd));
		}
	i++;
	}
	return "";
}

function SaveCookie(name, value, expire) {
	var eDate = new Date();
	eDate.setDate(eDate.getDate() + expire);
	document.cookie = name + "=" + value + "; expires=" + eDate.toGMTString()+ "; path=/";
}


function RefreshStaticMenu() {
		var stmnStartPoint, stmnEndPoint, stmnRefreshTimer;
		stmnStartPoint = parseInt(STATICMENU.style.top, 10);
		stmnEndPoint = document.body.scrollTop + stmnGAP2;
		if (stmnEndPoint < stmnGAP1) stmnEndPoint = stmnGAP1;
			stmnRefreshTimer = stmnActivateSpeed;
		if ( stmnStartPoint != stmnEndPoint ) {
			stmnScrollAmount = Math.ceil( Math.abs( stmnEndPoint - stmnStartPoint ) / 15 );
			STATICMENU.style.top = parseInt(STATICMENU.style.top, 10) + ( ( stmnEndPoint<stmnStartPoint ) ? -stmnScrollAmount : stmnScrollAmount );
			stmnRefreshTimer = stmnScrollSpeed;
		}
		stmnTimer = setTimeout ("RefreshStaticMenu();", stmnRefreshTimer);
}

function ToggleAnimate() {
	if (!ANIMATE.checked) {
		RefreshStaticMenu();
		SaveCookie("ANIMATE", "true", 300);
	} else {
		clearTimeout(stmnTimer);
		STATICMENU.style.top = stmnGAP1;
		SaveCookie("ANIMATE", "false", 300);
	}
}

function InitializeStaticMenu() {
	STATICMENU.style.left = stmnLEFT;
	if (ReadCookie("ANIMATE") == "false") {
		ANIMATE.checked = true;
		STATICMENU.style.top = document.body.scrollTop + stmnGAP1;
	} else {
		ANIMATE.checked = false;
		STATICMENU.style.top = document.body.scrollTop + stmnBASE;
		RefreshStaticMenu();
	}
}

//******************* È­¸é ¿ìÃø ·¹ÀÌ¾î ¼Ò½º ³¡ **************************//


function mini_open(cgbn,treg)
{
        var j_post;
        j_post = '/doc/07/labpi.html?cgbn='+cgbn+'&treg='+treg;
        window.open(j_post,'DIGITAL2LABPI','resizable=0,width=933,height=538,scrollbars=no');
}

function mini_openN(cgbn,treg)
{
        var j_post;
        j_post = '/doc/07/labpiN.html?cgbn='+cgbn+'&treg='+treg;
        window.open(j_post,'NEWLABPI','resizable=0,width=933,height=538,scrollbars=no,left=10,top=10');
}

function mini_openLabpi(pId)
{
        var j_post;
        j_post = '/doc/kz/labpi/cy_labpimain.html?pSite=02&pId='+pId;
        window.open(j_post,'NEWLABPI','resizable=0,width=950,height=678,scrollbars=yes,left=10,top=10');
}

function add_project(cgbn,treg)
{	
	      var j_post;
        j_post = '/doc/labpi/dProjectA.html?cgbn='+cgbn+'&treg='+treg;
        window.open(j_post,'ADDPROJECT','resizable=0,width=320,height=200,scrollbars=no,left=100,top=80');	
}

function add_user(j_no,cgbn,treg)
{	
	      var j_post;
        j_post = '/doc/labpi/dProjectUserA.html?no='+j_no+'&cgbn='+cgbn+'&treg='+treg;
        window.open(j_post,'ADDUSER','resizable=0,width=500,height=200,scrollbars=no,left=100,top=80');	
}



function initSERIEditor(){
	SeriEditor1 = document.getElementById('SeriEditor1');
	htmlobj = document.getElementById('SeriEditor_P1');
	if (SeriEditor1 && htmlobj && htmlobj.value){
		htmltext = unhtmlspecialchars(htmlobj.value);
		SeriEditor1.setBody(htmltext);
	}
}
			 
function displaySERIEditor()
{
	 
	var SeriEditor_P1 = document.getElementById('SeriEditor_P1').value;
	var SeriEditor_P2 = document.getElementById('SeriEditor_P2').value;
	var SeriEditor_P3 = document.getElementById('SeriEditor_P3').value;
	var SeriEditor_P4 = document.getElementById('SeriEditor_P4').value;
	var SeriEditor_P5 = document.getElementById('SeriEditor_P5').value;
	var SeriEditor_P6 = document.getElementById('SeriEditor_P6').value;
	var SeriEditor_P7 = document.getElementById('SeriEditor_P7').value;

	document.write("<OBJECT id='SeriEditor1' CLASSID='CLSID:620A764A-B7C4-43FC-9592-71E575DAF614' codebase='/common/SeriEditor.cab#version=1,0,1,45' width='540' height='350'> \n");
	document.write("	<param name='P1' value=''></param>\n");
	document.write("	<param name='P2' value='"+SeriEditor_P2+"'></param>\n");
	document.write("	<param name='P3' value='"+SeriEditor_P3+"'></param>\n");
	document.write("	<param name='P4' value='"+SeriEditor_P4+"'></param>\n");
	document.write("	<param name='P5' value='"+SeriEditor_P5+"'></param>\n");
	document.write("	<param name='P6' value='"+SeriEditor_P6+"'></param>\n");
	document.write("	<param name='P7' value='"+SeriEditor_P7+"'></param>\n");
	document.write("</OBJECT>\n");
}

function displaySERIUploader()
{
	//var filelist = document.frm.mfileup.value;
	var SeriUploader_P1 = document.getElementById('SeriUploader_P1').value;
	var SeriUploader_P2 = document.getElementById('SeriUploader_P2').value;
	var SeriUploader_P3 = document.getElementById('SeriUploader_P3').value;
	var SeriUploader_P4 = document.getElementById('SeriUploader_P4').value;
	var SeriUploader_P5 = document.getElementById('SeriUploader_P5').value;
	var SeriUploader_P6 = document.getElementById('SeriUploader_P6').value;
	var SeriUploader_P7 = document.getElementById('SeriUploader_P7').value;
  
	document.write("<OBJECT id='MultiSUC' CLASSID='CLSID:03263861-661B-4717-AF6E-16EC3968E544' codebase='/common/MultiSUC.cab#version=1,0,0,36'  WIDTH='540' height='155'> ");
	document.write("	<param name='P1' value='"+SeriUploader_P1+"'></param> "); 
	document.write("	<param name='P2' value='"+SeriUploader_P2+"'></param> "); 
	document.write("	<param name='P3' value='"+SeriUploader_P3+"'></param> ");  
	document.write("	<param name='P4' value='"+SeriUploader_P4+"'></param> ");  
	document.write("	<param name='P5' value='"+SeriUploader_P5+"'></param> ");  
	document.write("	<param name='P6' value='"+SeriUploader_P6+"'></param> ");  
	document.write("	<param name='P7' value='"+SeriUploader_P7+"'></param> ");  
	document.write("</OBJECT> ");


}


function unhtmlspecialchars(str){
	str = str.replace(/&amp;/g,'&');
	str = str.replace(/&quot;/g,'"');
	str = str.replace(/&#039;/g,"'");
	str = str.replace(/&lt;/g,'<');
	str = str.replace(/&gt;/g,'>');
	return str;
}