function GPIN(){
	    wWidth = 360;
	    wHight = 120;
	    
	    wX = (window.screen.width - wWidth) / 2;
	    wY = (window.screen.height - wHight) / 2;
	    
	    // Request Page Call
		var w = window.open("https://www.bipf.or.kr/G-PIN/Sample-AuthRequest.asp", "gPinLoginWin", "directories=no,toolbar=no,left="+wX+",top="+wY+",width="+wWidth+",height="+wHight);
		w.opener = opener;
}

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 MM_showHideLayers() { //v6.0
  var i,p,v,obj,args=MM_showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v=='hide')?'hidden':v; }
    obj.visibility=v; }
}
	
function getFlash(szPath, nWidth, nHeight)
{
	document.write("<OBJECT classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' codebase='https://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0' width='" + nWidth + "' height='" + nHeight + "' ");
	document.write(">");
	document.write("<param name='movie' value='" + szPath + "'>");
	document.write("<param name='quality' value='high'>");
	document.write("<param name='wmode' value='transparent'>");
	document.write("<EMBED src='" + szPath + "' quality='high' pluginspage='https://www.macromedia.com/go/getflashplayer' type='application/x-shockwave-flash' width='" + nWidth + "' height='" + nHeight + "'></EMBED></OBJECT>");
}	

function getFlashMenu(szPath, nWidth, nHeight, nPage, nSub)
{
	document.write("<OBJECT classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' codebase='https://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0' width='" + nWidth + "' height='" + nHeight + "' ");
	document.write(">");
	document.write("<param name='movie' value='" + szPath + "?pageNum=" + nPage + "&subNum=" + nSub + "'>");
	document.write("<param name='quality' value='high'>");
	document.write("<EMBED src='" + szPath + "?pageNum=" + nPage + "&subNum=" + nSub + "' quality='high' pluginspage='https://www.macromedia.com/go/getflashplayer' type='application/x-shockwave-flash' width='" + nWidth + "' height='" + nHeight + "'></EMBED></OBJECT>");
}


function bookMark()
{
    bookmarkurl="http://www.bipf.or.kr/"
    bookmarktitle="(Àç)ºÎÃµ»ê¾÷ÁøÈïÀç´Ü"
    if (document.all) window.external.AddFavorite(bookmarkurl,bookmarktitle)
}

function getCookie(key)
{
    var cook = document.cookie + ";";
    var idx =  cook.indexOf(key, 0);
    var val = "";
 
    if(idx != -1)
    {
        cook = cook.substring(idx, cook.length);
        begin = cook.indexOf("=", 0) + 1;
        end = cook.indexOf(";", begin);
        val = unescape( cook.substring(begin, end) );
    }
 
    return val;
}
 
function setCookie(name, value, expiredays)
{
    var today = new Date();
    today.setDate( today.getDate() + expiredays );
    document.cookie = name + "=" + escape( value ) + "; domain=www.bipf.or.kr; path=/; expires=" + today.toGMTString() + ";"
}




//--------------------------------------------------------------------------------------------------------------
// Print
function printDiv () {
  if (document.all && window.print) {
    window.onbeforeprint = beforeDivs;
    window.onafterprint = afterDivs;
    window.print();
  }
}
function beforeDivs () {
  if (document.all) {
    objContents.style.display = 'none';
    objSelection.innerHTML = document.all['print'].innerHTML;
  }
}
function afterDivs () {
  if (document.all) {
    objContents.style.display = 'block';
    objSelection.innerHTML = "";
  }
}
//--------------------------------------------------------------------------------------------------------------





//--------------------------------------------------------------------------------------------------------------
//AJAX °³Ã¼ »ý¼º
function createXMLHttpRequest()
{
    if (window.ActiveXObject)
    {
        xmlHttp = new ActiveXObject("Microsoft.XMLHTTP"); //ÀÎÅÍ³Ý ÀÍ½ºÇÃ·Î·¯¿¡¼­ AJAX °´Ã¼ »ý¼º
    }
    else if (window.XMLHttpRequest)
    {
        xmlHttp = new XMLHttpRequest(); //¸ðÁú¶ó À¥ºê¶ó¿ìÀú¿¡¼­ AJAX °´Ã¼ »ý¼º
    }
}


function onLoadBoard()
{
    var url = "/NetBoard/NoticeList.asp?bbsId=20080527213616840";
    createXMLHttpRequest();        
    xmlHttp.open("POST", url, false);        
    xmlHttp.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
    xmlHttp.send(null);   
    
    var boardskin = document.getElementById("boardskin");
    boardskin.innerText = xmlHttp.ResponseText;
}
//--------------------------------------------------------------------------------------------------------------



function Resize() {
   boardskin.height = boardframe.document.body.scrollHeight; 
   boardskin.width = boardframe.document.body.scrollWidth; 
} 


function getBoardSkin(s,a)
{
    document.write("<table cellspacing=0 cellpadding=0 width='100%' border=0>");
    document.write("<tr>");
    document.write("<td id='boardskin'>");
    document.write("<iframe name='boardframe' src='NetBoard/" + s + ".asp?bbsId=" + a + "' frameborder='0' width='100%' height='100%' onload='Resize()'></iframe>");
    document.write("</td>");
    document.write("</tr>");
    document.write("</table>");
}

function getSubSkin(s,a)
{
    document.write("<table cellspacing=0 cellpadding=0 width='100%' border=0>");
    document.write("<tr>");
    document.write("<td id='boardskin'>");
    document.write("<iframe name='boardframe' src='NetBoard/" + s + ".bipf?" + a + "' frameborder='0' width='100%' height='100%' onload='Resize()'></iframe>");
    document.write("</td>");
    document.write("</tr>");
    document.write("</table>");
}

function getContentSkin(s,a)
{
    document.write("<table cellspacing=0 cellpadding=0 width='100%' border=0>");
    document.write("<tr>");
    document.write("<td id='boardskin'>");
    document.write("<iframe name='boardframe' src='NetBoard/" + s + "?" + a + "' frameborder='0' width='100%' height='100%' onload='Resize()'></iframe>");
    document.write("</td>");
    document.write("</tr>");
    document.write("</table>");
}


var msie = (navigator.userAgent.indexOf('MSIE') > -1 && navigator.userAgent.indexOf('Opera') == -1)? true:false;

function getImgView(file, w, h, e)
{
	if ( document.getElementById("wn_img").style.display == "none" )
	{
		if ( msie ) {
			document.getElementById("wn_img").style.pixelWidth = w;
			document.getElementById("wn_img").style.pixelHeight = h;
			document.getElementById("i_img").style.pixelWidth = w-10;
			document.getElementById("i_img").style.pixelHeight = h-10;
			document.getElementById("wn_img").style.pixelTop = document.body.scrollTop + event.clientY;
			document.getElementById("wn_img").style.pixelLeft = document.body.scrollLeft + event.clientX;			
		} else {
			document.getElementById("wn_img").style.width = w;
			document.getElementById("wn_img").style.height = h;
			document.getElementById("i_img").style.width = w-10;
			document.getElementById("i_img").style.height = h-10;
			document.getElementById("wn_img").style.top = document.body.scrollTop + e.clientY - 150;			
			document.getElementById("wn_img").style.left = document.body.scrollLeft + e.clientX + 20;
		}
		document.getElementById("wn_img").style.display = "inline";
		document.getElementById("i_img").src = "/NetBoard/ComImgView.asp?file=" + file;
	}
	else
	{
		document.getElementById("wn_img").style.display = "none";
	}
}

function getImgClose()
{
	document.getElementById("wn_img").style.display = "none";
}

function setImgResize(w)
{
	var ime = new Image();
	var img = document.getElementsByName("img_reload");

	for (var i=1; i<img.length; i++ )
	{
		ime = new Image();
		ime.src = img[i].src;
		if ( ime.width>w ) {
			img[i].width=w;
			img[i].height=(w/ime.width)*ime.height;
		}
	}
}







function goSchList(link)
{
	var bbs = document.getElementById("bbsid").value;	
	var word  = document.getElementById("word").value;
	
	if ( bbs == "20080611180217080" )
	{
	    var field = "SC";
	}
	else
	{
	    var field = "";
	}
	
	if ( word.replace(/\ /g,"").length > 0 && bbs.replace(/\ /g,"").length > 0 )
	{
		location.href = link + "?bbsId=" + bbs + "&field=" + field + "&word=" + word;
	}
	else
	{
	    if ( bbs == "20080613172117203" )
	    {
	        if ( field.replace(/\ /g,"").length == 0 )
	        {
	            alert("°Ë»ö ±¸ºÐÀ» ¼±ÅÃÇÏ¼¼¿ä!!");	    
	            document.getElementById("field").focus();
	            return false;        
	        }
	        
	        if (word.replace(/\ /g,"").length == 0 )
	        {
	            alert("°Ë»ö¾î¸¦ ÀÔ·ÂÇÏ¼¼¿ä!! ");
	            document.getElementById("word").focus();
	            return false;
	        }
	    }
	    else
	    {
		    alert("°Ë»ö¾î¸¦ ÀÔ·ÂÇÏ¼¼¿ä!!");		
		    document.getElementById("word").focus();
	        return false;
		}    
	}
}


function goPSchList(link)
{
	var bbs = document.getElementById("bbsid").value;
	var field  = document.getElementById("field").value;
	var word  = document.getElementById("word").value;
	
	if ( word.replace(/\ /g,"").length > 0 && bbs.replace(/\ /g,"").length > 0 )
	{
		location.href = link + "?bbsId=" + bbs + "&field=" + field + "&word=" + word;
	}
	else
	{   
	    alert("°Ë»ö¾î¸¦ ÀÔ·ÂÇÏ¼¼¿ä!!");		
	    document.getElementById("word").focus();
        return false;
	}
}



function setXmenu(e,o)
{
	var x = (e.pageX) ? e.pageX : document.body.scrollLeft+event.clientX;
	var x = x - 50;
	var y = (e.pageY) ? e.pageY : document.body.scrollTop+event.clientY;
	var xly = document.getElementById(o);
	xly.style.position = 'absolute';
	xly.style.left = x;
	xly.style.top = y;

	document.getElementById(o).style.display = "inline";		
}

function setXmenuHiden(o)
{
	document.getElementById(o).style.display = "none";
}

function setXmenuView(o)
{
	document.getElementById(o).style.display = "inline";
}


function getAbsTop(obj) 
{
	return (obj.offsetParent==null)? 0 : obj.offsetTop+getAbsTop(obj.offsetParent);
}

function getAbsLeft(obj) 
{
	return (obj.offsetParent==null)? 0 : obj.offsetLeft+getAbsLeft(obj.offsetParent);
} 


function showCalendar(objName) 
{	
    if (objName == document.frm.startdate)
    {
        var objName2 = "frm.startdate";
    }
    else
    {
        var objName2 = "frm.enddate";
    }
    
    
    var win = document.getElementsByName("wWidget")[0]; 
    var objID = document.getElementById(objName.name);
    objCal = objName;
    
    with(document.getElementById("lWidget"))
    {
        if(style.visibility == "visible")
        {
            style.visibility = "hidden";
        }
        else
        {
            style.left = getAbsLeft(objID);
            style.top = getAbsTop(objID) + 24;
            win.width = 1;
            win.height = 1;
            
            self.wWidget.location.replace("/NetBoard/ComCalendar.asp?txt_id=" + objName2);
            win.width = 165;
            win.height = 210;
            
            style.visibility = "visible";
        }
    }
}



function changeFilenum()
{
    var selNum = document.frm.filecnt.value;
    var fileObj = document.all["fileID"];    
    
    for(var i=(fileObj.length-1); i>-1; i--)
    {
        if (i>=selNum)
        {
            fileObj[i].style.display = "none";
        }
        else
        {
            fileObj[i].style.display = "block";
        }
    }
}


function getFileSize(szFile)
{
   	var nFileLen = 0;
   	
   	if ( navigator.appName.indexOf("Netscape") != -1)
	{
		try	{
			netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect');
		} catch(e) {
			alert("signed.applets.codebase_principal_support ¸¦ ¼³Á¤ÇØÁÖ¼¼¿ä!\n" + e);
			return -1;
		}
		try	{
			var file = Components.classes["@mozilla.org/file/local;1"].createInstance(Components.interfaces.nsILocalFile);
			nFileLen.initWithPath( szFile );
			nFileLen = file.fileSize;
		} catch(e) {
			alert(e);
		}
	}
	else if (navigator.appName.indexOf('Microsoft') != -1)
	{
	    // Explorer7 ¿¡¼­ Á¦´ë·Î µ¿ÀÛ¾ÈÇÔ...´ëÃ¼ÇÊ¿ä
	  	var img = new Image();	  	
	  	img.dynsrc = szFile;		
		nFileLen = img.fileSize;
	}
	
	return nFileLen;
}


function getReplace(n)
{
	var dim = n.split(",");
	var ret = "";
	for (var i=0; i<dim.length; i++ )
	{
		ret += dim[i];
	}
	return ret;
}



function chkNoticeWrite(f,fn,cn)
{
    var check = false;
    
    if ( f.subject.value.replace(/\ /g,"").length == 0 )
	{
		alert("Á¦¸ñÀ» ÀÔ·ÂÇÏ¼¼¿ä!!");
		f.subject.focus();
		return false;
	}	
	
	for( var i=0 ; i<cn; i++)
	{
        if (f.category[i].checked == true) check=true;
	}
	
	if (check == false)
	{
	    alert("°øÁöºÐ¾ß¸¦ ¼±ÅÃÇØ ÁÖ¼¼¿ä!!");
	    return false;
	}
	
	if (f.options[2].checked)
	{
	    if ( f.startdate.value.replace(/\ /g,"").length == 0 )
	    {
	        alert("°øÁö±â°£ ½ÃÀÛÀÏÀ» ÀÔ·ÂÇÏ¼¼¿ä!!");
	        f.startdate.focus();
	        return false;
	    }
	    
	    if ( f.enddate.value.replace(/\ /g,"").length == 0 )
	    {
	        alert("°øÁö±â°£ Á¾·áÀÏÀ» ÀÔ·ÂÇÏ¼¼¿ä!!");
	        f.enddate.focus();
	        return false;
	    }
	}
	
	
	
	if ( FCKeditorAPI.GetInstance('content').GetXHTML().length == 0 ||  FCKeditorAPI.GetInstance('content').GetXHTML() == "<p></p>" )
	{
		alert("±Û³»¿ëÀ» ÀÔ·ÂÇÏ¼¼¿ä!!");
		return false;
	}
    
    if ( fn>0 )
    {
	    var nMax = getReplace(document.getElementById("max").value);
    	
	    for ( var i=1 ; i<fn+1 ; i++ )
	    {
		    if ( document.getElementById("xfile" + i).value.length >  0)
		    {
		        if ( getFileSize(document.getElementById("xfile" + i).value) > nMax * 1024 )
			    {
				    alert(document.getElementById("xfile" + i).value + " °¡ ¾÷·Îµå ÃÖ´ëÅ©±â¸¦ ÃÊ°úÇÕ´Ï´Ù!!");
				    return false;
				    break;
			    }
		    }
	    }		
	}    

	return true;
}

// ÀÌ³ëÆ¼´õ Àû¿ë¶§¹®¿¡ 
function chkNoticeWrite2(f,fn,cn)
{
    var check = false;
    
    if ( f.subject.value.replace(/\ /g,"").length == 0 )
	{
		alert("Á¦¸ñÀ» ÀÔ·ÂÇÏ¼¼¿ä!!");
		f.subject.focus();
		return false;
	}	
	
	for( var i=0 ; i<cn; i++)
	{
        if (f.category[i].checked == true) check=true;
	}
	
	if (check == false)
	{
	    alert("°øÁöºÐ¾ß¸¦ ¼±ÅÃÇØ ÁÖ¼¼¿ä!!");
	    return false;
	}
	
	if (f.options[2].checked)
	{
	    if ( f.startdate.value.replace(/\ /g,"").length == 0 )
	    {
	        alert("°øÁö±â°£ ½ÃÀÛÀÏÀ» ÀÔ·ÂÇÏ¼¼¿ä!!");
	        f.startdate.focus();
	        return false;
	    }
	    
	    if ( f.enddate.value.replace(/\ /g,"").length == 0 )
	    {
	        alert("°øÁö±â°£ Á¾·áÀÏÀ» ÀÔ·ÂÇÏ¼¼¿ä!!");
	        f.enddate.focus();
	        return false;
	    }
	}
	
	
	
	// Ã¹¹øÂ° ¸Å°³º¯¼ö => true : < & Æ¯¼ö¹®ÀÚ Ã³¸®,  false : Ã³¸®¾ÈÇÔ
	// µÎ¹øÂ° ¸Å°³º¯¼ö => ÀÌ³ëµðÅÍ ¹øÈ£
	var strHTMLCode = fnGetEditorHTMLCode(false, 0); 
	if("" == strHTMLCode)
	{
		alert("³»¿ëÀ» ÀÔ·ÂÇÏ¼¼¿ä");
		return false;
	}


	document.frm["content"].value = strHTMLCode;
	
    
    if ( fn>0 )
    {
	    var nMax = getReplace(document.getElementById("max").value);
    	
	    for ( var i=1 ; i<fn+1 ; i++ )
	    {
		    if ( document.getElementById("xfile" + i).value.length >  0)
		    {
		        if ( getFileSize(document.getElementById("xfile" + i).value) > nMax * 1024 )
			    {
				    alert(document.getElementById("xfile" + i).value + " °¡ ¾÷·Îµå ÃÖ´ëÅ©±â¸¦ ÃÊ°úÇÕ´Ï´Ù!!");
				    return false;
				    break;
			    }
		    }
	    }		
	}    

	return true;
}

// ÀÔÂûÃ¤¿ë°Ô½ÃÆÇ
function chkNoticeCareer(f,fn)
{
    
    if ( f.subject.value.replace(/\ /g,"").length == 0 )
	{
		alert("Á¦¸ñÀ» ÀÔ·ÂÇÏ¼¼¿ä!!");
		f.subject.focus();
		return false;
	}	
	
	
	if (f.options[2].checked)
	{
	    if ( f.startdate.value.replace(/\ /g,"").length == 0 )
	    {
	        alert("°øÁö±â°£ ½ÃÀÛÀÏÀ» ÀÔ·ÂÇÏ¼¼¿ä!!");
	        f.startdate.focus();
	        return false;
	    }
	    
	    if ( f.enddate.value.replace(/\ /g,"").length == 0 )
	    {
	        alert("°øÁö±â°£ Á¾·áÀÏÀ» ÀÔ·ÂÇÏ¼¼¿ä!!");
	        f.enddate.focus();
	        return false;
	    }
	}
	
	
	
	// Ã¹¹øÂ° ¸Å°³º¯¼ö => true : < & Æ¯¼ö¹®ÀÚ Ã³¸®,  false : Ã³¸®¾ÈÇÔ
	// µÎ¹øÂ° ¸Å°³º¯¼ö => ÀÌ³ëµðÅÍ ¹øÈ£
	var strHTMLCode = fnGetEditorHTMLCode(false, 0); 
	if("" == strHTMLCode)
	{
		alert("³»¿ëÀ» ÀÔ·ÂÇÏ¼¼¿ä");
		return false;
	}


	document.frm["content"].value = strHTMLCode;
	
    
    if ( fn>0 )
    {
	    var nMax = getReplace(document.getElementById("max").value);
    	
	    for ( var i=1 ; i<fn+1 ; i++ )
	    {
		    if ( document.getElementById("xfile" + i).value.length >  0)
		    {
		        if ( getFileSize(document.getElementById("xfile" + i).value) > nMax * 1024 )
			    {
				    alert(document.getElementById("xfile" + i).value + " °¡ ¾÷·Îµå ÃÖ´ëÅ©±â¸¦ ÃÊ°úÇÕ´Ï´Ù!!");
				    return false;
				    break;
			    }
		    }
	    }		
	}    

	return true;
}


function chkBNoticeWrite_bak(f,fn)
{
    if ( f.subject.value.replace(/\ /g,"").length == 0 )
	{
		alert("Á¦¸ñÀ» ÀÔ·ÂÇÏ¼¼¿ä!!");
		f.subject.focus();
		return false;
	}	
	
	if ( f.supporta.value.replace(/\ /g,"").length == 0 )
	{
	    alert("Áö¿øºÐ¾ß ´ëºÐ·ù¸¦ ¼±ÅÃÇØ ÁÖ¼¼¿ä!!");
	    f.supporta.focus();
	    return false;
	}
	
	//if ( f.supportb.value.replace(/\ /g,"").length == 0 )
	//{
	//    alert("Áö¿øºÐ¾ß ¼ÒºÐ·ù¸¦ ¼±ÅÃÇØ ÁÖ¼¼¿ä!!");
	//    f.supportb.focus();
	//    return false;
	//}
	
	if ( f.orgclass.value.replace(/\ /g,"").length == 0 )
	{
	    alert("µî·Ï±â°üÀ» ¼±ÅÃÇØ ÁÖ¼¼¿ä!!");
	    f.orgclass.focus();
	    return false;
	}
	
	if ( f.orgname.value.replace(/\ /g,"").length == 0 )
	{
	    alert("µî·Ï±â°ü¸íÀ» ÀÔ·ÂÇØ ÁÖ¼¼¿ä!!");
	    f.orgname.focus();
	    return false;
	}
	
	if ( f.startdate.value.replace(/\ /g,"").length == 0 )
	{
	    alert("Á¢¼ö±â°£ ½ÃÀÛÀÏÀ» ÀÔ·ÂÇØ ÁÖ¼¼¿ä!!");
	    f.startdate.focus();
	    return false;
	}
	
	if ( f.enddate.value.replace(/\ /g,"").length == 0 )
	{
	    alert("Á¢¼ö±â°£ Á¾·áÀ» ÀÔ·ÂÇØ ÁÖ¼¼¿ä!!");
	    f.enddate.focus();
	    return false;
	}
	
	if ( f.businessa.value.replace(/\ /g,"").length == 0 )
	{
	    alert("Àç´Ü»ç¾÷ ´ëºÐ·ù¸¦ ¼±ÅÃÇØ ÁÖ¼¼¿ä!!");
	    f.businessa.focus();
	    return false;
	}
	
	if ( f.businessb.value.replace(/\ /g,"").length == 0 )
	{
	    alert("Àç´Ü»ç¾÷ ¼ÒºÐ·ù¸¦ ¼±ÅÃÇØ ÁÖ¼¼¿ä!!");
	    f.businessb.focus();
	    return false;
	}
	
	if ( f.outline.value.replace(/\ /g,"").length == 0 )
	{
	    alert("»ç¾÷°³¿ä¸¦ ÀÔ·ÂÇØ ÁÖ¼¼¿ä!!");
	    f.outline.focus();
	    return false;
	}
		
//	if ( FCKeditorAPI.GetInstance('content').GetXHTML().length == 0 ||  FCKeditorAPI.GetInstance('content').GetXHTML() == "<p></p>" )
//	{
//		alert("Áö¿øÁ¶°Ç ¹× ³»¿ëÀ» ÀÔ·ÂÇÏ¼¼¿ä!!");
//		return false;
//	}

	// Ã¹¹øÂ° ¸Å°³º¯¼ö => true : < & Æ¯¼ö¹®ÀÚ Ã³¸®,  false : Ã³¸®¾ÈÇÔ
	// µÎ¹øÂ° ¸Å°³º¯¼ö => ÀÌ³ëµðÅÍ ¹øÈ£
	var strHTMLCode = fnGetEditorHTMLCode(false, 0); 
	if("" == strHTMLCode)
	{
		alert("³»¿ëÀ» ÀÔ·ÂÇÏ¼¼¿ä");
		return false;
	}


	document.frm["content"].value = strHTMLCode;
	
	if ( f.helpdesk.value.replace(/\ /g,"").length == 0 )
	{
	    alert("»ó´ã¹×¹®ÀÇÃ³¸¦ ÀÔ·ÂÇØ ÁÖ¼¼¿ä!!");
	    f.helpdesk.focus();
	    return false;
	}
	
    
    if ( fn>0 )
    {
	    var nMax = getReplace(document.getElementById("max").value);
    	
	    for ( var i=1 ; i<fn+1 ; i++ )
	    {
		    if ( document.getElementById("xfile" + i).value.length >  0)
		    {
		        if ( getFileSize(document.getElementById("xfile" + i).value) > nMax * 1024 )
			    {
				    alert(document.getElementById("xfile" + i).value + " °¡ ¾÷·Îµå ÃÖ´ëÅ©±â¸¦ ÃÊ°úÇÕ´Ï´Ù!!");
				    return false;
				    break;
			    }
		    }
	    }		
	}    

	return true;
}


function chkBNoticeWrite2(f,fn)
{
    if ( f.subject.value.replace(/\ /g,"").length == 0 )
	{
		alert("Á¦¸ñÀ» ÀÔ·ÂÇÏ¼¼¿ä!!");
		f.subject.focus();
		return false;
	}	
	
	if ( f.supporta.value.replace(/\ /g,"").length == 0 )
	{
	    alert("Áö¿øºÐ¾ß ´ëºÐ·ù¸¦ ¼±ÅÃÇØ ÁÖ¼¼¿ä!!");
	    f.supporta.focus();
	    return false;
	}
	
	//if ( f.supportb.value.replace(/\ /g,"").length == 0 )
	//{
	//    alert("Áö¿øºÐ¾ß ¼ÒºÐ·ù¸¦ ¼±ÅÃÇØ ÁÖ¼¼¿ä!!");
	//    f.supportb.focus();
	//    return false;
	//}
	
	if ( f.orgclass.value.replace(/\ /g,"").length == 0 )
	{
	    alert("µî·Ï±â°üÀ» ¼±ÅÃÇØ ÁÖ¼¼¿ä!!");
	    f.orgclass.focus();
	    return false;
	}
	
	if ( f.orgname.value.replace(/\ /g,"").length == 0 )
	{
	    alert("µî·Ï±â°ü¸íÀ» ÀÔ·ÂÇØ ÁÖ¼¼¿ä!!");
	    f.orgname.focus();
	    return false;
	}
	
	if ( f.startdate.value.replace(/\ /g,"").length == 0 )
	{
	    alert("Á¢¼ö±â°£ ½ÃÀÛÀÏÀ» ÀÔ·ÂÇØ ÁÖ¼¼¿ä!!");
	    f.startdate.focus();
	    return false;
	}
	
	if ( f.enddate.value.replace(/\ /g,"").length == 0 )
	{
	    alert("Á¢¼ö±â°£ Á¾·áÀ» ÀÔ·ÂÇØ ÁÖ¼¼¿ä!!");
	    f.enddate.focus();
	    return false;
	}
	
	if ( f.businessa.value.replace(/\ /g,"").length == 0 )
	{
	    alert("Àç´Ü»ç¾÷ ´ëºÐ·ù¸¦ ¼±ÅÃÇØ ÁÖ¼¼¿ä!!");
	    f.businessa.focus();
	    return false;
	}
	
	if ( f.businessb.value.replace(/\ /g,"").length == 0 )
	{
	    alert("Àç´Ü»ç¾÷ ¼ÒºÐ·ù¸¦ ¼±ÅÃÇØ ÁÖ¼¼¿ä!!");
	    f.businessb.focus();
	    return false;
	}
	
	if ( f.outline.value.replace(/\ /g,"").length == 0 )
	{
	    alert("»ç¾÷°³¿ä¸¦ ÀÔ·ÂÇØ ÁÖ¼¼¿ä!!");
	    f.outline.focus();
	    return false;
	}
		
	// Ã¹¹øÂ° ¸Å°³º¯¼ö => true : < & Æ¯¼ö¹®ÀÚ Ã³¸®,  false : Ã³¸®¾ÈÇÔ
	// µÎ¹øÂ° ¸Å°³º¯¼ö => ÀÌ³ëµðÅÍ ¹øÈ£
	var strHTMLCode = fnGetEditorHTMLCode(false, 0); 
	if("" == strHTMLCode)
	{
		alert("³»¿ëÀ» ÀÔ·ÂÇÏ¼¼¿ä");
		return false;
	}


	document.frm["content"].value = strHTMLCode;	
	
	if ( f.helpdesk.value.replace(/\ /g,"").length == 0 )
	{
	    alert("»ó´ã¹×¹®ÀÇÃ³¸¦ ÀÔ·ÂÇØ ÁÖ¼¼¿ä!!");
	    f.helpdesk.focus();
	    return false;
	}
	
    
    if ( fn>0 )
    {
	    var nMax = getReplace(document.getElementById("max").value);
    	
	    for ( var i=1 ; i<fn+1 ; i++ )
	    {
		    if ( document.getElementById("xfile" + i).value.length >  0)
		    {
		        if ( getFileSize(document.getElementById("xfile" + i).value) > nMax * 1024 )
			    {
				    alert(document.getElementById("xfile" + i).value + " °¡ ¾÷·Îµå ÃÖ´ëÅ©±â¸¦ ÃÊ°úÇÕ´Ï´Ù!!");
				    return false;
				    break;
			    }
		    }
	    }		
	}    

	return true;
}


function chkBNoticeWrite(f)
{



    if ( f.subject.value.replace(/\ /g,"").length == 0 )
	{
		alert("Á¦¸ñÀ» ÀÔ·ÂÇÏ¼¼¿ä!1");
		f.subject.focus();
		return false;
	}	
	
	if ( f.supporta.value.replace(/\ /g,"").length == 0 )
	{
	    alert("Áö¿øºÐ¾ß ´ëºÐ·ù¸¦ ¼±ÅÃÇØ ÁÖ¼¼¿ä!!");
	    f.supporta.focus();
	    return false;
	}
	
	//if ( f.supportb.value.replace(/\ /g,"").length == 0 )
	//{
	//    alert("Áö¿øºÐ¾ß ¼ÒºÐ·ù¸¦ ¼±ÅÃÇØ ÁÖ¼¼¿ä!!");
	//    f.supportb.focus();
	//    return false;
	//}
	
	if ( f.orgclass.value.replace(/\ /g,"").length == 0 )
	{
	    alert("µî·Ï±â°üÀ» ¼±ÅÃÇØ ÁÖ¼¼¿ä!!");
	    f.orgclass.focus();
	    return false;
	}
	
	if ( f.orgname.value.replace(/\ /g,"").length == 0 )
	{
	    alert("µî·Ï±â°ü¸íÀ» ÀÔ·ÂÇØ ÁÖ¼¼¿ä!!");
	    f.orgname.focus();
	    return false;
	}
	
	if ( f.startdate.value.replace(/\ /g,"").length == 0 )
	{
	    alert("Á¢¼ö±â°£ ½ÃÀÛÀÏÀ» ÀÔ·ÂÇØ ÁÖ¼¼¿ä!!");
	    f.startdate.focus();
	    return false;
	}
	
	if ( f.enddate.value.replace(/\ /g,"").length == 0 )
	{
	    alert("Á¢¼ö±â°£ Á¾·áÀ» ÀÔ·ÂÇØ ÁÖ¼¼¿ä!!");
	    f.enddate.focus();
	    return false;
	}
	
	if ( f.outline.value.replace(/\ /g,"").length == 0 )
	{
	    alert("»ç¾÷°³¿ä¸¦ ÀÔ·ÂÇØ ÁÖ¼¼¿ä!!");
	    f.outline.focus();
	    return false;
	}
		
	
	if ( f.helpdesk.value.replace(/\ /g,"").length == 0 )
	{
	    alert("»ó´ã¹×¹®ÀÇÃ³¸¦ ÀÔ·ÂÇØ ÁÖ¼¼¿ä!!");
	    f.helpdesk.focus();
	    return false;
	}   
   
	// Ã¹¹øÂ° ¸Å°³º¯¼ö => true : < & Æ¯¼ö¹®ÀÚ Ã³¸®,  false : Ã³¸®¾ÈÇÔ
	// µÎ¹øÂ° ¸Å°³º¯¼ö => ÀÌ³ëµðÅÍ ¹øÈ£
	var strHTMLCode = fnGetEditorHTMLCode(false, 0); 
	if("" == strHTMLCode)
	{
		alert("³»¿ëÀ» ÀÔ·ÂÇÏ¼¼¿ä!!!");
	return false;
	}

	document.getElementById("content").value = strHTMLCode;	

//	if ( f.content.value.replace(/\ /g,"").length == 0 )
//	{
//	    alert("³»¿ëÀ» ÀÔ·ÂÇØ ÁÖ¼¼¿ä!!");
//	    f.content.focus();
//	    return false;
//	}   

	return true;
}




function chkBusiNoticeWrite(f)
{
    if ( f.subject.value.replace(/\ /g,"").length == 0 )
	{
		alert("Á¦¸ñÀ» ÀÔ·ÂÇÏ¼¼¿ä!!");
		f.subject.focus();
		return false;
	}	
	
	if ( f.startdate.value.replace(/\ /g,"").length == 0 )
	{
	    alert("Á¢¼ö±â°£ ½ÃÀÛÀÏÀ» ÀÔ·ÂÇØ ÁÖ¼¼¿ä!!");
	    f.startdate.focus();
	    return false;
	}
	
	if ( f.enddate.value.replace(/\ /g,"").length == 0 )
	{
	    alert("Á¢¼ö±â°£ Á¾·áÀ» ÀÔ·ÂÇØ ÁÖ¼¼¿ä!!");
	    f.enddate.focus();
	    return false;
	}
	
	if ( f.outline.value.replace(/\ /g,"").length == 0 )
	{
	    alert("»ç¾÷°³¿ä¸¦ ÀÔ·ÂÇØ ÁÖ¼¼¿ä!!");
	    f.outline.focus();
	    return false;
	}
		
	return true;
}



function chkLoanWrite(f)
{
    if ( f.Dong.value.replace(/\ /g,"").length == 0 )
	{
		alert("µ¿À» ÀÔ·ÂÇÏ¼¼¿ä!!");
		f.Dong.focus();
		return false;
	}	
	
	if ( f.Hosil.value.replace(/\ /g,"").length == 0 )
	{
	    alert("È£½ÇÀ» ÀÔ·ÂÇØ ÁÖ¼¼¿ä!!");
	    f.Hosil.focus();
	    return false;
	}
	
	if ( f.Name.value.replace(/\ /g,"").length == 0 )
	{
	    alert("¾÷Ã¼¸íÀ» ÀÔ·ÂÇØ ÁÖ¼¼¿ä!!");
	    f.Name.focus();
	    return false;
	}
	
	if ( f.Owner.value.replace(/\ /g,"").length == 0 )
	{
	    alert("´ëÇ¥ÀÚ¸¦ ÀÔ·ÂÇØ ÁÖ¼¼¿ä!!");
	    f.Owner.focus();
	    return false;
	}
		
	return true;
}

function chkPlanWrite(f)
{
    if ( f.gubun.value.length == 0 )
	{
		alert("±¸ºÐÀ» ¼±ÅÃÇÏ¼¼¿ä!!");
		return false;
	}	
	
	if ( f.Subject.value.replace(/\ /g,"").length == 0 )
	{
	    alert("Á¦¸ñÀ» ÀÔ·ÂÇØ ÁÖ¼¼¿ä!!");
	    f.Subject.focus();
	    return false;
	}
	
	if ( f.Content.value.replace(/\ /g,"").length == 0 )
	{
	    alert("³»¿ëÀ» ÀÔ·ÂÇØ ÁÖ¼¼¿ä!!");
	    f.Content.focus();
	    return false;
	}

	return true;
}



function setXfileHiden()
{
	document.getElementById('xfile_layer').style.display = "none";
}

function setXfileShow(e)
{
	var x = (e.pageX) ? e.pageX : document.body.scrollLeft+event.clientX;
	var x = x - 50;
	var y = (e.pageY) ? e.pageY : document.body.scrollTop+event.clientY;
	var xly = document.getElementById('xfile_layer');
	xly.style.position = 'absolute';
	xly.style.left = x;
	xly.style.top = y;

	document.getElementById('xfile_layer').style.display = "inline";	
}

function getAttach(file)
{
  	if ( document.xattach )
	{
		document.xattach.file.value = file;
		document.xattach.submit();
	}
}


function getSubCode(g,m,o)
{  
    if (o == "support")
    {
        var pcode = document.all.supporta.options[document.all.supporta.selectedIndex].value; 
        callsubcode.location.href = "ComSubCode.asp?gubun=" + g + "&mcode=" + m + "&pcode=" + pcode + "&subobj=supportb";
    }
    else if (o == "business")
    {
        var pcode = document.all.businessa.options[document.all.businessa.selectedIndex].value;       
        callbusicode.location.href = "ComSubCode.asp?gubun=" + g + "&mcode=" + m + "&pcode=" + pcode + "&subobj=businessb";
    } 
}


function autoTab(cur,next,len)
{
    var str = cur.value.length;    
    if(str == len) next.focus();
}


function chkCityNo(n)
{      
    len = n.length;      
    temp = "";      
    no_ck = 0;      
      
    no_1 = parseInt( n.substring(0,1) );      
    no_2 = parseInt( n.substring(1,2) );      
    no_3 = parseInt( n.substring(2,3) );      
    no_4 = parseInt( n.substring(3,4) );      
    no_5 = parseInt( n.substring(4,5) );      
    no_6 = parseInt( n.substring(5,6) );      
    no_7 = parseInt( n.substring(6,7) );      
    no_8 = parseInt( n.substring(7,8) );      
    no_9 = parseInt( n.substring(8,9) );      
    no_10 = parseInt( n.substring(9,10) );      
      
    if(len == 13){ // ÁÖ¹Îµî·Ï¹øÈ£      
        no_11 = parseInt( n.substring(10,11) );      
        no_12 = parseInt( n.substring(11,12) );      
        no_13 = parseInt( n.substring(12,13) );      
      
        if((no_7 > 0) && (no_7 < 5)){ //ÁÖ¹Îµî·Ï¹øÈ£(2000³â ÀÌÈÄ Ãâ»ýÀÚ´Â      
            no_ck += no_1 * 2; //µÞÀÚ¸® Ã¹¹øÂ° ¼ýÀÚÀÚ ³²¼ºÀÇ °æ¿ì 3,      
            no_ck += no_2 * 3; // ¿©¼ºÀÇ °æ¿ì 4·Î ºÎ¿©µÈ´Ù.)      
            no_ck += no_3 * 4;      
            no_ck += no_4 * 5;      
            no_ck += no_5 * 6;      
            no_ck += no_6 * 7;      
            no_ck += no_7 * 8;      
            no_ck += no_8 * 9;      
            no_ck += no_9 * 2;      
            no_ck += no_10 * 3;      
            no_ck += no_11 * 4;      
            no_ck += no_12 * 5;      
            no_ck = no_ck % 11;      
            no_ck = 11 - no_ck;      
            no_ck = no_ck % 10;      
      
            if(no_ck == no_13){ return true; }      
            else { return false; }      
        }      
        else { return false; }      
    }      
      
    if(len == 10){ // »ç¾÷ÀÚµî·Ï¹øÈ£      
      
        no_ck += no_1 * 1;      
        no_ck += no_2 * 3;      
        no_ck += no_3 * 7;      
        no_ck += no_4 * 1;      
        no_ck += no_5 * 3;      
        no_ck += no_6 * 7;      
        no_ck += no_7 * 1;      
        no_ck += no_8 * 3;      
        no_ck += Math.floor(no_9 * 5 / 10);       
        no_ck += no_9 * 5 % 10;       
        no_ck += no_10;       
               
        if( no_ck % 10 == 0) { return true; }       
        else { return false; }      
    }      
      
}     



function chkRealName(mode)
{
    var f = document.frmjoin;
    
    if ( f.name.value.replace(/\ /g,"").length == 0 )
	{
	    alert("ÀÌ¸§À» ÀÔ·ÂÇÏ¼¼¿ä!!");
	    f.name.focus();
	    return false;
	}
	
	if ( f.jumin1.value.replace(/\ /g,"").length != 6 )
	{
	    alert("ÁÖ¹Î¹øÈ£ ¾ÕÀÚ¸® 6ÀÚ¸®¸¦ Á¤È®È÷ ÀÔ·ÂÇÏ¼¼¿ä!!");
	    f.jumin1.focus();
	    return false;
	}
	
	if ( f.jumin2.value.replace(/\ /g,"").length != 7 )
	{
	    alert("ÁÖ¹Î¹øÈ£ µÞÀÚ¸® 7ÀÚ¸®¸¦ Á¤È®È÷ ÀÔ·ÂÇÏ¼¼¿ä!!");
	    f.jumin2.focus();
	    return false;
	}
	
	if ( chkCityNo(f.jumin1.value + "" + f.jumin2.value) == false )
	{
	    alert("ÀÔ·ÂÇÑ ÁÖ¹Î¹øÈ£°¡ Àß¸øµÇ¾ú½À´Ï´Ù. ´Ù½Ã ÀÔ·ÂÇÏ¼¼¿ä!!");
	    f.jumin1.focus();
	    return false;
	}
	
	var name = f.name.value;
	var jumin1 = f.jumin1.value;
	var jumin2 = f.jumin2.value;
	
	var url = "https://www.bipf.or.kr/NetBoard/ComRealName.asp?name=" + name + "&jumin1=" + jumin1 + "&jumin2=" + jumin2;
	
    createXMLHttpRequest();        
    xmlHttp.open("POST", url, false);        
    xmlHttp.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
    xmlHttp.send(null);   
    
    switch(xmlHttp.ResponseText) 
    {
        case "R001":        
            alert("½Ç¸íÀÎÁõÀÌ ¼º°ø ÇÏ¿´½À´Ï´Ù.");  
            if ( mode == "join" )
            {
                f.name.value = name;
                f.jumin1.value = jumin1;
                f.jumin2.value = jumin2;
                f.doChk.value = "Y";
				f.gubun.value = "NC";
            }    
            else if ( mode == "write" )
            {
                if ( f.bbsid.value == "20080620170930023" )
                {
                    window.open(f.gopage.value + "&writer=" + f.name.value,'private','resizable=no width=635 height=500');
                }
                else if ( f.bbsid.value == "Product" )
                {
                    window.open(f.gopage.value + "&writer=" + f.name.value,'private','resizable=no scrollbars=yes width=635 height=770');
                }
                else if ( f.bbsid.value == "Qna" )
                {
                     window.open(f.gopage.value + "&writer=" + f.name.value,'qnawrite','resizable=no scrollbars=yes width=620 height=520');
                }
                else
                {
                    opener.location.href = f.gopage.value + "&writer=" + f.name.value;

                }                
                self.close();
            }   
            return true;    
            break;    
        case "R002":
            alert("½Ç¸íÀÎÁõÀÌ ½ÇÆÐ ÇÏ¿´½À´Ï´Ù. ´Ù½Ã ÀÔ·ÂÇØ ÁÖ¼¼¿ä!!(ºÒÀÏÄ¡)");    
            f.name.focus();
            return false;
            break;
        case "R003":
            alert("½Ç¸íÀÎÁõÀÌ ½ÇÆÐ ÇÏ¿´½À´Ï´Ù. ´Ù½Ã ÀÔ·ÂÇØ ÁÖ¼¼¿ä!!(ÀÚ·á¾øÀ½)");  
            f.name.focus();  
            return false;
            break;
        case "R004":
            alert("½Ç¸íÀÎÁõÀÌ ½ÇÆÐ ÇÏ¿´½À´Ï´Ù. ´Ù½Ã ÀÔ·ÂÇØ ÁÖ¼¼¿ä!!(Àü¼Û¿À·ù)");   
            f.name.focus(); 
            return false;
            break;
        case "R005":
            alert("½Ç¸íÀÎÁõÀÌ ½ÇÆÐ ÇÏ¿´½À´Ï´Ù. ´Ù½Ã ÀÔ·ÂÇØ ÁÖ¼¼¿ä!!(Á¢±Ù¿À·ù)");    
            f.name.focus();
            return false;
            break;
        default:
            alert("½Ç¸íÀÎÁõÀÌ ½ÇÆÐ ÇÏ¿´½À´Ï´Ù. ´Ù½Ã ÀÔ·ÂÇØ ÁÖ¼¼¿ä!!");    
            f.name.focus();
            return false;
            break;    
    } 
}


function chkJoinAgree(f)
{
    if ( f.doChk.value != "Y" )
    {
        alert("»ó´ÜÀÇ ½Ç¸íÀÎÁõ È®ÀÎÀ» ÇØÁÖ¼¼¿ä!!");
        f.name.focus();
        return false;
    }
    
    if ( f.doChk.value !="Y" )
	{
        alert("ÀÌ¿ë¾à°ü¿¡ µ¿ÀÇÇØ ÁÖ¼¼¿ä!!");
        return false;
    }
    
    return true;
}


function chkJoinReg(f)
{
   	if ( f.u_id.value.replace(/\ /g,"").length == 0 )
	{
	    alert("¾ÆÀÌµð¸¦ ÀÔ·ÂÇÏ¼¼¿ä!!");
	    f.u_id.focus();
	    return false;
	} 
}


///// ÀÌ¸ÞÀÏ È£½ºÆ® ¼±ÅÃ
function makeEmailHost(name) 
{
	var option = new Array();
	option[0]= ["     Á÷Á¢ÀÔ·Â     ",""];
	option[1]= ["chollian.net", "chollian.net"];
	option[2]= ["dreamwiz.com", "dreamwiz.com"];
	option[3]= ["empal.com", "empal.com"];
	option[4]= ["freechal.com", "freechal.com"];
	option[5]= ["hanafos.com", "hanafos.com"];
	option[6]= ["hanmail.net", "hanmail.net"];
	option[7]= ["hanmir.com", "hanmir.com"];
	option[8]= ["hitel.net", "hitel.net"];
	option[9]= ["hotmail.com", "hotmail.com"];
	option[10]= ["korea.com", "korea.com"];
	option[11]= ["kornet.net", "kornet.net"];
	option[12]= ["lycos.co.kr", "lycos.co.kr"];
	option[13]= ["nate.com", "nate.com"];
	option[14]= ["naver.com", "naver.com"];
	option[15]= ["netian.com", "netian.com"];
	option[16]= ["orgio.net", "orgio.net"];
	option[17]= ["sayclub.com", "sayclub.com"];
	option[18]= ["unitel.co.kr", "unitel.co.kr"];
	option[19]= ["yahoo.co.kr", "yahoo.co.kr"];
	option[20]= ["yahoo.com", "yahoo.com"];

	for (var i=0; i < option.length; i++) 
	{
	    name.options[i]=new Option(option[i][0],option[i][1]);
		if (i==0) { name.options[i].selected=true; }
	}
}


function selEmail(f)
{	
    if ( f.u_email3.value != "" ) 
    {
	    if ( f.u_email3.value == "") 
	    {
		    f.u_email2.value="";
			f.u_email2.readOnly=false;
			f.u_email2.style.background = "white";
			return;
		}
		else 
		{
			f.u_email2.value = f.u_email3.value;
			f.u_email2.style.background = "#DDDDDD";
			f.u_email2.readOnly=true;
		}
	} 
	else 
	{
		if ( f.u_email2.value != "" )
		{
			f.u_email2.value="";
			f.u_email2.style.background = "white";
			f.u_email2.readOnly=false;
		}
	}
}


function selAddress(z,a,g)
{
    var f = opener.frm;
    
    if ( g == "user" ) 
    {
        f.u_zipcode1.value = z.substr(0,3);
        f.u_zipcode2.value = z.substr(4,3);
        f.u_address1.value = a;
        f.u_address2.focus();
    }
    else if ( g == "company" )
    {
        f.c_zipcode1.value = z.substr(0,3);
        f.c_zipcode2.value = z.substr(4,3);
        f.c_address1.value = a;
        f.c_address2.focus();
    }    
    self.close();
}

function selCom(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o)
{
    var frm = opener.frm;
    
//1.c_name, 2.c_no1, 3.c_no2, 4.c_no3, 5.c_zipcode1, 6.c_zipcode2, 7.c_address1, 8.c_address2, 9.c_ceo, 10.c_tel1, 11.c_tel2, 12.c_tel3, 13.c_fax1, 14.c_fax2, 15.c_fax3  
    if ( a.length != 0 ) frm.c_name.value = a;
    if ( b.length != 0 ) frm.c_no1.value = b;
    if ( c.length != 0 ) frm.c_no2.value = c;
    if ( d.length != 0 ) frm.c_no3.value = d;
    if ( e.length != 0 ) frm.c_zipcode1.value = e;
    if ( f.length != 0 ) frm.c_zipcode2.value = f;
    if ( g.length != 0 ) frm.c_address1.value = g;
    frm.c_address2.value = "";
    if ( h.length != 0 ) frm.c_address2.value = h;
    if ( i.length != 0 ) frm.c_ceo.value = i;
    if ( j.length != 0 ) frm.c_tel1.value = j;
    if ( k.length != 0 ) frm.c_tel2.value = k;
    if ( l.length != 0 ) frm.c_tel3.value = l;
    if ( m.length != 0 ) frm.c_fax1.value = m;
    if ( n.length != 0 ) frm.c_fax2.value = n;
    if ( o.length != 0 ) frm.c_fax3.value = o;
    self.close();    
}

function selCom2(a,b,c)
{
    var frm = opener.frm;
    
//1.c_no1, 2.c_no2, 3.c_no3
    if ( a.length != 0 ) frm.c_no1.value = a;
    if ( b.length != 0 ) frm.c_no2.value = b;
    if ( c.length != 0 ) frm.c_no3.value = c;
    self.close();    
}


///// ¾ÆÀÌµð À¯È¿¼º Ã¼Å©
function isValidID(ch) 
{ 
    for(var i=0 ; i< ch.length ; i++) 
    { 
        if( i != 0)
        {
            if ( isEngChr(ch.charAt(i)) == false && isNumChr(ch.charAt(i)) == false ) return false;                 
        } 
        else
        {
	        if( isEngChr(ch.charAt(0)) == false) return false;
        }
    } 
    return true 
} 


function isNumChr(ch) 
{ 
    if ( ch >= '0' && ch <= '9' ) 
    { 
        return true; 
    } 
    else 
    { 
        return false; 
    } 
} 

function isEngChr(ch) 
{ 
    if ( ch >= 'a' && ch <= 'z' ) 
    { 
        return true; 
    } 
    else 
    { 
        return false; 
    } 
} 



///// ÀÌ¸ÞÀÏ À¯È¿¼º Ã¼Å©
function chkEmail(ch)
{
    /** Ã¼Å©»çÇ× 
     - @°¡ 2°³ÀÌ»óÀÏ °æ¿ì 
     - .ÀÌ ºÙ¾î¼­ ³ª¿À´Â °æ¿ì 
     -  @.³ª  .@ÀÌ Á¸ÀçÇÏ´Â °æ¿ì 
     - ¸ÇÃ³À½ÀÌ.ÀÎ °æ¿ì 
     - @ÀÌÀü¿¡ ÇÏ³ªÀÌ»óÀÇ ¹®ÀÚ°¡ ÀÖ¾î¾ß ÇÔ 
     - @°¡ ÇÏ³ªÀÖ¾î¾ß ÇÔ 
     - Domain¸í¿¡ .ÀÌ ÇÏ³ª ÀÌ»ó ÀÖ¾î¾ß ÇÔ 
     - Domain¸íÀÇ ¸¶Áö¸· ¹®ÀÚ´Â ¿µ¹®ÀÚ 2~4°³ÀÌ¾î¾ß ÇÔ **/ 

    var check1 = /(@.*@)|(\.\.)|(@\.)|(\.@)|(^\.)/;  

    var check2 = /^[a-zA-Z0-9\-\.\_]+\@[a-zA-Z0-9\-\.]+\.([a-zA-Z]{2,4})$/; 
     
    if ( !check1.test(ch) && check2.test(ch) ) 
    { 
        return true; 
    } 
    else 
    { 
        return false; 
    } 
} 






///// ¾ÆÀÌµð Áßº¹ Ã¼Å©
function chkID()
{
    var f = document.frm;
    
    if ( f.u_id.value.replace(/\ /g,"").length == 0 )
	{
	    alert("¾ÆÀÌµð¸¦ ÀÔ·ÂÇÏ¼¼¿ä!!");
	    f.u_id.focus();
	    return false;
	}
	
	if ( f.u_id.value.length < 4 )
	{
	    alert("¾ÆÀÌµð´Â 4ÀÚ ÀÌ»óÀÌ¿©¾ß ÇÕ´Ï´Ù.");
	    f.u_id.focus();
	    return false;
	}
	
	if ( f.u_id.value.length > 16 )
	{
	    alert("¾ÆÀÌµð´Â 16ÀÚ ÀÌÇÏ¿©¾ß ÇÕ´Ï´Ù.");
	    f.u_id.focus();
	    return false;
	}
	
	if ( isValidID(f.u_id.value) == false )
	{
	    alert("À¯È¿ÇÏÁö ¾Ê´Â ¾ÆÀÌµð ÀÔ´Ï´Ù.\n\n¾ÆÀÌµð´Â ¿µ¹®ÀÚ¿Í ¼ýÀÚÀÇ Á¶ÇÕÀ¸·Î¸¸ °¡´ÉÇÕ´Ï´Ù.\n(Ã¹ ±ÛÀÚ´Â ¹Ýµå½Ã ¿µ¹®ÀÚ¿©¾ß ÇÕ´Ï´Ù.)");
	    f.u_id.focus();
	    return false;
	}
	
    
    var url = "ComIDCheck.asp?uid=" + f.u_id.value;
	
    createXMLHttpRequest();        
    xmlHttp.open("POST", url, false);        
    xmlHttp.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
    xmlHttp.send(null);   
    
    if ( xmlHttp.ResponseText == "false" )
    {
        alert("Áßº¹µÈ ¾ÆÀÌµð ÀÔ´Ï´Ù. ´Ù¸¥ ¾ÆÀÌµð¸¦ ÀÔ·ÂÇØ ÁÖ¼¼¿ä!!");
        f.idchk.value = "N";
        f.u_id.focus();
        return false;
    }
    else if ( xmlHttp.ResponseText == "true" )
    {
        alert("»ç¿ëÇÏ½Ç ¼ö ÀÖ´Â ¾ÆÀÌµð ÀÔ´Ï´Ù.");
        f.idchk.value = "Y";
        return true;
    }
}




function chkJoinReg(f)
{   
    if ( f.u_id.value.replace(/\ /g,"").length == 0 )
	{
	    alert("¾ÆÀÌµð¸¦ ÀÔ·ÂÇÏ¼¼¿ä!!");
	    f.u_id.focus();
	    return false;
	}
	
	if ( f.u_id.value.length < 4 )
	{
	    alert("¾ÆÀÌµð´Â 4ÀÚ ÀÌ»óÀÌ¿©¾ß ÇÕ´Ï´Ù!!");
	    f.u_id.focus();
	    return false;
	}
	
	if ( f.u_id.value.length > 16 )
	{
	    alert("¾ÆÀÌµð´Â 16ÀÚ ÀÌÇÏ¿©¾ß ÇÕ´Ï´Ù!!");
	    f.u_id.focus();
	    return false;
	}
	
	if ( isValidID(f.u_id.value) == false )
	{
	    alert("À¯È¿ÇÏÁö ¾Ê´Â ¾ÆÀÌµð ÀÔ´Ï´Ù.\n\n¾ÆÀÌµð´Â ¿µ¹®ÀÚ¿Í ¼ýÀÚÀÇ Á¶ÇÕÀ¸·Î¸¸ °¡´ÉÇÕ´Ï´Ù.\n(Ã¹ ±ÛÀÚ´Â ¹Ýµå½Ã ¿µ¹®ÀÚ¿©¾ß ÇÕ´Ï´Ù!!)");
	    f.u_id.focus();
	    return false;
	}
	
	if ( f.idchk.value != "Y" )
    {
        alert("¾ÆÀÌµð Áßº¹È®ÀÎÀ» ÇØÁÖ¼¼¿ä!!");
        f.u_id.focus();
        return false;
    }
    
    if ( f.u_pwd.value.replace(/\ /g,"").length == 0 )
    {
        alert("ºñ¹Ð¹øÈ£¸¦ ÀÔ·ÂÇØ ÁÖ¼¼¿ä!!");
        f.u_pwd.focus();
        return false;
    }
    
    if ( f.u_pwd.value.length < 6 )
    {
        alert("ºñ¹Ð¹øÈ£´Â 6ÀÚ ÀÌ»óÀÌ¿©¾ß ÇÕ´Ï´Ù!!");
        f.u_pwd.focus();
        return false;
    }
    
    if ( f.u_pwd.value.length > 16 )
    {
        alert("ºñ¹Ð¹øÈ£´Â 16ÀÚ ÀÌÇÏ¿©¾ß ÇÕ´Ï´Ù!!");
        f.u_pwd.focus();
        return false;
    }
    
    
    if ( f.u_pwdr.value.replace(/\ /g,"").length == 0 )
    {
        alert("ºñ¹Ð¹øÈ£È®ÀÎÀ» ÀÔ·ÂÇØ ÁÖ¼¼¿ä!!");
        f.u_pwdr.focus();
        return false;
    }
    
    if ( f.u_pwd.value != f.u_pwdr.value )
    {
        alert("ÀÔ·ÂÇÑ ºñ¹Ð¹øÈ£°¡ Æ²¸³´Ï´Ù. ´Ù½Ã ÀÔ·ÂÇØ ÁÖ¼¼¿ä!!");
        f.u_pwdr.focus();
        return false;
    }
    
    if ( f.u_zipcode1.value.replace(/\ /g,"").length == 0 || f.u_zipcode2.value.replace(/\ /g,"").length == 0 || f.u_address1.value.replace(/\ /g,"").length == 0)
    {
        alert("¿ìÆí¹øÈ£Ã£±â ¹öÆ°À» Å¬¸¯ÇÏ¿© ÁÖ¼Ò¸¦ ÀÔ·ÂÇØ ÁÖ¼¼¿ä!!");
        f.u_address1.focus();
        return false;
    }
    
    if ( f.u_address2.value.replace(/\ /g,"").length == 0 || f.u_address2.value == "³ª¸ÓÁö ÁÖ¼Ò¸¦ Àû¾îÁÖ¼¼¿ä" )
    {
        alert("»ó¼¼ÁÖ¼Ò¸¦ ÀÔ·ÂÇØ ÁÖ¼¼¿ä!!");
        f.u_address2.focus();
        return false;
    }
    
    if ( f.u_tel1.value.replace(/\ /g,"").length == 0 || f.u_tel2.value.replace(/\ /g,"").length == 0 || f.u_tel3.value.replace(/\ /g,"").length == 0 )
    {
        alert(" ¿¬¶ôÃ³¸¦ ÀÔ·ÂÇØ ÁÖ¼¼¿ä!!");
        f.u_tel1.focus();
        return false;
    }

	if ( f.u_phone1.value.replace(/\ /g,"").length == 0 || f.u_phone2.value.replace(/\ /g,"").length == 0 || f.u_phone3.value.replace(/\ /g,"").length == 0 )
    {
        alert(" ÇÚµåÆùÀ» ÀÔ·ÂÇØ ÁÖ¼¼¿ä!!");
        f.u_phone1.focus();
        return false;
    }
    
    if ( f.u_email1.value.replace(/\ /g,"").length == 0 || f.u_email2.value.replace(/\ /g,"").length == 0 )
    {
        alert("ÀÌ¸ÞÀÏÀ» ÀÔ·ÂÇØ ÁÖ¼¼¿ä!!");
        f.u_email1.focus();
        return false;
    }
    
    if ( chkEmail(f.u_email1.value + "@" + f.u_email2.value) == false )
    {
        alert("ÀÌ¸ÞÀÏÀÌ À¯È¿ÇÏÁö ¾Ê½À´Ï´Ù. ´Ù½Ã ÀÔ·ÂÇØ ÁÖ¼¼¿ä!!");
        f.u_email1.focus();
        return false;
    }
    
    
    if ( f.c_name.value.replace(/\ /g,"").length == 0 )
    {
        alert("¾÷Ã¼¸íÀ» ÀÔ·ÂÇØ ÁÖ¼¼¿ä!!");
        f.c_name.focus();
        return false;
    }
    
    if ( f.c_no1.value.replace(/\ /g,"").length == 0 || f.c_no2.value.replace(/\ /g,"").length == 0 || f.c_no3.value.replace(/\ /g,"").length == 0 )
    {
        alert("»ç¾÷ÀÚ¹øÈ£¸¦ ÀÔ·ÂÇØ ÁÖ¼¼¿ä!!");
        f.c_no1.focus();
        return false;
    }
    
    if ( chkCityNo(f.c_no1.value + f.c_no2.value + f.c_no3.value) == false )
    {
        alert("»ç¾÷ÀÚ¹øÈ£°¡ À¯È¿ÇÏÁö ¾Ê½À´Ï´Ù. ´Ù½Ã ÀÔ·ÂÇØ ÁÖ¼¼¿ä!!");
        f.c_no1.focus();
        return false;
    }
    
    if ( f.c_zipcode1.value.replace(/\ /g,"").length == 0 || f.c_zipcode2.value.replace(/\ /g,"").length == 0 || f.c_address1.value.replace(/\ /g,"").length == 0)
    {
        alert("¿ìÆí¹øÈ£Ã£±â ¹öÆ°À» Å¬¸¯ÇÏ¿© »ç¾÷ÀåÁÖ¼Ò¸¦ ÀÔ·ÂÇØ ÁÖ¼¼¿ä!!");
        f.c_address1.focus();
        return false;
    }
    
    if ( f.c_address2.value.replace(/\ /g,"").length == 0 || f.c_address2.value == "³ª¸ÓÁö ÁÖ¼Ò¸¦ Àû¾îÁÖ¼¼¿ä" )
    {
        alert("»ç¾÷Àå »ó¼¼ÁÖ¼Ò¸¦ ÀÔ·ÂÇØ ÁÖ¼¼¿ä!!");
        f.c_address2.focus();
        return false;
    }
    
    if ( f.c_ceo.value.replace(/\ /g,"").length == 0 )
    {
        alert("´ëÇ¥ÀÚ¸íÀ» ÀÔ·ÂÇØ ÁÖ¼¼¿ä!!");
        f.c_ceo.focus();
        return false;
    }
    
    if ( f.c_tel1.value.replace(/\ /g,"").length == 0 || f.c_tel2.value.replace(/\ /g,"").length == 0 || f.c_tel3.value.replace(/\ /g,"").length == 0 )
    {
        alert(" »ç¾÷Àå ÀüÈ­¹øÈ£¸¦ ÀÔ·ÂÇØ ÁÖ¼¼¿ä!!");
        f.c_tel1.focus();
        return false;
    }
    
    if ( f.c_fax1.value.replace(/\ /g,"").length == 0 || f.c_fax2.value.replace(/\ /g,"").length == 0 || f.c_fax3.value.replace(/\ /g,"").length == 0 )
    {
        alert(" »ç¾÷Àå ÆÑ½º¹øÈ£¸¦ ÀÔ·ÂÇØ ÁÖ¼¼¿ä!!");
        f.c_fax1.focus();
        return false;
    }
    
    return true;    
}




function chkMemberModify(f)
{   
    if ( f.u_pwd.value.replace(/\ /g,"").length == 0 )
    {
        alert("ºñ¹Ð¹øÈ£¸¦ ÀÔ·ÂÇØ ÁÖ¼¼¿ä!!");
        f.u_pwd.focus();
        return false;
    }
    
    if ( f.u_pwd.value.length < 6 )
    {
        alert("ºñ¹Ð¹øÈ£´Â 6ÀÚ ÀÌ»óÀÌ¿©¾ß ÇÕ´Ï´Ù!!");
        f.u_pwd.focus();
        return false;
    }
    
    if ( f.u_pwd.value.length > 16 )
    {
        alert("ºñ¹Ð¹øÈ£´Â 16ÀÚ ÀÌÇÏ¿©¾ß ÇÕ´Ï´Ù!!");
        f.u_pwd.focus();
        return false;
    }
    
    
    if ( f.u_pwdr.value.replace(/\ /g,"").length == 0 )
    {
        alert("ºñ¹Ð¹øÈ£È®ÀÎÀ» ÀÔ·ÂÇØ ÁÖ¼¼¿ä!!");
        f.u_pwdr.focus();
        return false;
    }
    
    if ( f.u_pwd.value != f.u_pwdr.value )
    {
        alert("ÀÔ·ÂÇÑ ºñ¹Ð¹øÈ£°¡ Æ²¸³´Ï´Ù. ´Ù½Ã ÀÔ·ÂÇØ ÁÖ¼¼¿ä!!");
        f.u_pwdr.focus();
        return false;
    }
    
    if ( f.u_zipcode1.value.replace(/\ /g,"").length == 0 || f.u_zipcode2.value.replace(/\ /g,"").length == 0 || f.u_address1.value.replace(/\ /g,"").length == 0)
    {
        alert("¿ìÆí¹øÈ£Ã£±â ¹öÆ°À» Å¬¸¯ÇÏ¿© ÁÖ¼Ò¸¦ ÀÔ·ÂÇØ ÁÖ¼¼¿ä!!");
        f.u_address1.focus();
        return false;
    }
    
    if ( f.u_address2.value.replace(/\ /g,"").length == 0 || f.u_address2.value == "³ª¸ÓÁö ÁÖ¼Ò¸¦ Àû¾îÁÖ¼¼¿ä" )
    {
        alert("»ó¼¼ÁÖ¼Ò¸¦ ÀÔ·ÂÇØ ÁÖ¼¼¿ä!!");
        f.u_address2.focus();
        return false;
    }
    
    if ( f.u_tel1.value.replace(/\ /g,"").length == 0 || f.u_tel2.value.replace(/\ /g,"").length == 0 || f.u_tel3.value.replace(/\ /g,"").length == 0 )
    {
        alert(" ¿¬¶ôÃ³¸¦ ÀÔ·ÂÇØ ÁÖ¼¼¿ä!!");
        f.u_tel1.focus();
        return false;
    }
    
    if ( f.u_email1.value.replace(/\ /g,"").length == 0 || f.u_email2.value.replace(/\ /g,"").length == 0 )
    {
        alert("ÀÌ¸ÞÀÏÀ» ÀÔ·ÂÇØ ÁÖ¼¼¿ä!!");
        f.u_email1.focus();
        return false;
    }
    
    if ( chkEmail(f.u_email1.value + "@" + f.u_email2.value) == false )
    {
        alert("ÀÌ¸ÞÀÏÀÌ À¯È¿ÇÏÁö ¾Ê½À´Ï´Ù. ´Ù½Ã ÀÔ·ÂÇØ ÁÖ¼¼¿ä!!");
        f.u_email1.focus();
        return false;
    }
    
    
    if ( f.c_name.value.replace(/\ /g,"").length == 0 )
    {
        alert("¾÷Ã¼¸íÀ» ÀÔ·ÂÇØ ÁÖ¼¼¿ä!!");
        f.c_name.focus();
        return false;
    }
    
    if ( f.c_no1.value.replace(/\ /g,"").length == 0 || f.c_no2.value.replace(/\ /g,"").length == 0 || f.c_no3.value.replace(/\ /g,"").length == 0 )
    {
        alert("»ç¾÷ÀÚ¹øÈ£¸¦ ÀÔ·ÂÇØ ÁÖ¼¼¿ä!!");
        f.c_no1.focus();
        return false;
    }
    
    if ( chkCityNo(f.c_no1.value + f.c_no2.value + f.c_no3.value) == false )
    {
        alert("»ç¾÷ÀÚ¹øÈ£°¡ À¯È¿ÇÏÁö ¾Ê½À´Ï´Ù. ´Ù½Ã ÀÔ·ÂÇØ ÁÖ¼¼¿ä!!");
        f.c_no1.focus();
        return false;
    }
    
    if ( f.c_zipcode1.value.replace(/\ /g,"").length == 0 || f.c_zipcode2.value.replace(/\ /g,"").length == 0 || f.c_address1.value.replace(/\ /g,"").length == 0)
    {
        alert("¿ìÆí¹øÈ£Ã£±â ¹öÆ°À» Å¬¸¯ÇÏ¿© »ç¾÷ÀåÁÖ¼Ò¸¦ ÀÔ·ÂÇØ ÁÖ¼¼¿ä!!");
        f.c_address1.focus();
        return false;
    }
    
    if ( f.c_address2.value.replace(/\ /g,"").length == 0 || f.c_address2.value == "³ª¸ÓÁö ÁÖ¼Ò¸¦ Àû¾îÁÖ¼¼¿ä" )
    {
        alert("»ç¾÷Àå »ó¼¼ÁÖ¼Ò¸¦ ÀÔ·ÂÇØ ÁÖ¼¼¿ä!!");
        f.c_address2.focus();
        return false;
    }
    
    if ( f.c_ceo.value.replace(/\ /g,"").length == 0 )
    {
        alert("´ëÇ¥ÀÚ¸íÀ» ÀÔ·ÂÇØ ÁÖ¼¼¿ä!!");
        f.c_ceo.focus();
        return false;
    }
    
    if ( f.c_tel1.value.replace(/\ /g,"").length == 0 || f.c_tel2.value.replace(/\ /g,"").length == 0 || f.c_tel3.value.replace(/\ /g,"").length == 0 )
    {
        alert(" »ç¾÷Àå ÀüÈ­¹øÈ£¸¦ ÀÔ·ÂÇØ ÁÖ¼¼¿ä!!");
        f.c_tel1.focus();
        return false;
    }
    
    if ( f.c_fax1.value.replace(/\ /g,"").length == 0 || f.c_fax2.value.replace(/\ /g,"").length == 0 || f.c_fax3.value.replace(/\ /g,"").length == 0 )
    {
        alert(" »ç¾÷Àå ÆÑ½º¹øÈ£¸¦ ÀÔ·ÂÇØ ÁÖ¼¼¿ä!!");
        f.c_fax1.focus();
        return false;
    }
    
    return true;    
}


function chkLoginForm(f)
{
	if ( f.id.value.replace(/\ /g,"").length == 0 )
	{
		alert("¾ÆÀÌµð¸¦ ÀÔ·ÂÇÏ¼¼¿ä!!");
		f.id.focus();
		return false;
	}

	if ( f.pass.value.replace(/\ /g,"").length == 0 )
	{
		alert("ºñ¹Ð¹øÈ£¸¦ ÀÔ·ÂÇÏ¼¼¿ä!!");
		f.pass.focus();
		return false;
	}
	
	if ( f.idsave.checked )
	{
	    // ÄíÅ°°ª 7ÀÏ°£ ÀúÀå
	    setCookie("bipfid", f.id.value, 7);
	}
	else
	{
	    setCookie("bipfid", f.id.value, -1);
	}

	return true;
}


function chkIDSave()
{
    var bipfid = getCookie("bipfid");
    
    if ( bipfid != "" )
    {
        document.frm.id.value = bipfid;
        document.frm.idsave.checked = true;
        document.frm.pass.focus();
    }
    else
    {
        document.frm.id.value = "";
        document.frm.id.focus();
    }
}



function chkCounselWrite(f)
{
    if ( f.bbsid.value == "20080613172117203" )
    {
        if ( f.category.value.replace(/\ /g,"").length == 0 )
        {
            alert("»ó´ãºÐ¾ß¸¦ ¼±ÅÃÇÏ¼¼¿ä!!");
            f.category.focus();
            return false;    
        }
    }
    
    if ( f.subject.value.replace(/\ /g,"").length == 0 )
    {
        alert("Á¦¸ñÀ» ÀÔ·ÂÇÏ¼¼¿ä!!");
        f.subject.focus();
        return false;    
    }
    
    if ( f.tel1.value.replace(/\ /g,"").length == 0 || f.tel2.value.replace(/\ /g,"").length == 0 || f.tel3.value.replace(/\ /g,"").length == 0 )
    {
        alert("¿¬¶ôÃ³¸¦ ÀÔ·ÂÇÏ¼¼¿ä!!");
        f.tel1.focus();
        return false;
    }
    
    if ( f.u_email1.value.replace(/\ /g,"").length == 0 || f.u_email2.value.replace(/\ /g,"").length == 0 )
    {
        alert("ÀÌ¸ÞÀÏÀ» ÀÔ·ÂÇÏ¼¼¿ä!!");
        f.u_email1.focus();
        return false;
    }
    
    if ( chkEmail(f.u_email1.value + "@" + f.u_email2.value) == false )
    {
        alert("ÀÌ¸ÞÀÏÀÌ À¯È¿ÇÏÁö ¾Ê½À´Ï´Ù. ´Ù½Ã ÀÔ·ÂÇØ ÁÖ¼¼¿ä!!");
        f.u_email1.focus();
        return false;
    }
    
    
    if ( f.content.value.replace(/\ /g,"").length == 0 )
	{
		alert("³»¿ëÀ» ÀÔ·ÂÇÏ¼¼¿ä!!");
		f.content.focus();
		return false;
	}
	
    if ( f.pwd.value.replace(/\ /g,"").length == 0 )
    {
        alert("ºñ¹Ð¹øÈ£¸¦ ÀÔ·ÂÇÏ¼¼¿ä!!");
        f.pwd.focus();
        return false;
    }
    
    return true;
}


function chkCounselAdmin(f)
{
    if ( f.content.value.replace(/\ /g,"").length == 0 )
    {
        alert("´äº¯ ³»¿ëÀ» ÀÔ·ÂÇÏ¼¼¿ä!!");
        f.content.focus();
        return false;
    }
    
    return true;
}



function chkPassLogin(f)
{
    var bbsid = f.bbsid.value;
    var page = f.page.value;
    var field = f.field.value;
    var word = f.word.value;
    var idx = f.idx.value;
    var rpage = f.rpage.value;
    var pwd = f.pwd.value;
    
    if ( f.pwd.value.replace(/\ /g,"").length == 0 )
    {
        alert("ºñ¹Ð¹øÈ£¸¦ ÀÔ·ÂÇÏ¼¼¿ä!!");
        f.pwd.focus();
        return false;
    }
        
    var url = "ComPassCheck.asp?bbsId=" + bbsid + "&idx=" + idx + "&pwd=" + f.pwd.value;
	
    createXMLHttpRequest();        
    xmlHttp.open("POST", url, false);        
    xmlHttp.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
    xmlHttp.send(null);   
    
    if ( xmlHttp.ResponseText == "false" )
    {
        alert("ºñ¹Ð¹øÈ£°¡ Æ²¸³´Ï´Ù. ´Ù½Ã ÀÔ·ÂÇØ ÁÖ¼¼¿ä!!");
        f.pwd.focus();
        return false;
    }
    else if ( xmlHttp.ResponseText == "Err.004" )
    {
        alert("Error.004\nº¸¾È¹®Á¦°¡ ¹ß»ýÇÏ¿© Ã³¸®°¡ ÁßÁöµÇ¾ú½À´Ï´Ù. °ü¸®ÀÚ¿¡°Ô ¹®ÀÇÇÏ¼¼¿ä.");
        f.pwd.focus();
        return false;
    }
    else if ( xmlHttp.ResponseText == "true" )
    {
        if ( rpage == "BusiView_Qna" )
        {
            window.open(rpage + '.bipf?bbsId=' + bbsid + '&idx=' + idx,'qnaview','resizable=no  width=632 height=700');
        }
        else if ( rpage == "BusiModify_Qna" )
        {
            opener.location.href = rpage + ".bipf?bbsId=" + bbsid + "&page=" + page + "&field=" + field + "&word=" + word + "&idx=" + idx + "&pwd=" + pwd;
        }
        else if ( rpage == "BusiDelete_Qna" )
        {
            opener.location.href = rpage + ".bipf?bbsId=" + bbsid + "&page=" + page + "&field=" + field + "&word=" + word + "&idx=" + idx + "&pwd=" + pwd;
        }
         else if ( rpage == "ReserWrite" )
        {
            opener.location.href = rpage + ".bipf?bbsId=" + bbsid + "&page=" + page + "&field=" + field + "&word=" + word + "&idx=" + idx + "&pwd=" + pwd;
        }
        else
        {
            opener.location.href = rpage + ".asp?bbsId=" + bbsid + "&page=" + page + "&field=" + field + "&word=" + word + "&idx=" + idx + "&pwd=" + pwd;
        }    
        self.close();
        return true;
    }
}




function chkReportWrite(f)
{
    if ( f.subject.value.replace(/\ /g,"").length == 0 )
    {
        alert("Á¦¸ñÀ» ÀÔ·ÂÇÏ¼¼¿ä!!");
        f.subject.focus();
        return false;
    }
    
    //if ( f.ocover.value.replace(/\ /g,"").length == 0 )
    //{
    //    if ( f.cover.value.replace(/\ /g,"").length == 0 )
    //    {
    //        alert("´ëÇ¥ÀÌ¹ÌÁö¸¦ ÀÔ·ÂÇÏ¼¼¿ä!!");
    //        f.cover.focus();
    //        return false;
    //    }    
    //}    

    //if ( FCKeditorAPI.GetInstance('content').GetXHTML().length == 0 ||  FCKeditorAPI.GetInstance('content').GetXHTML() == "<p></p>" )
    //{
	//    alert("³»¿ëÀ» ÀÔ·ÂÇÏ¼¼¿ä!!");
	  //  return false;
    //}	

	// Ã¹¹øÂ° ¸Å°³º¯¼ö => true : < & Æ¯¼ö¹®ÀÚ Ã³¸®,  false : Ã³¸®¾ÈÇÔ
	// µÎ¹øÂ° ¸Å°³º¯¼ö => ÀÌ³ëµðÅÍ ¹øÈ£
	var strHTMLCode = fnGetEditorHTMLCode(false, 0); 
	if("" == strHTMLCode)
	{
		alert("³»¿ëÀ» ÀÔ·ÂÇÏ¼¼¿ä");
		return false;
	}


	document.frm["content"].value = strHTMLCode;

    return true;
}






function chkRndQnaWrite(f)
{
    if ( f.writer.value.replace(/\ /g).length == 0 )
    {
        alert("ÀÛ¼ºÀÚ¸¦ ÀÔ·ÂÇÏ¼¼¿ä!!");
        f.writer.focus();
        return false;
    }
    
    if ( f.company.value.replace(/\ /g).length == 0 )
    {
        alert("¾÷Ã¼¸íÀ» ÀÔ·ÂÇÏ¼¼¿ä!!");
        f.company.focus();
        return false;
    }
    
    if ( f.tel1.value.replace(/\ /g).length == 0 || f.tel2.value.replace(/\ /g).length == 0 || f.tel3.value.replace(/\ /g).length == 0 )
    {
        alert("¿¬¶ôÃ³¸¦ ÀÔ·ÂÇÏ¼¼¿ä!!");
        f.tel1.focus();
        return false;
    }
    
    if ( f.u_email1.value.replace(/\ /g).length == 0 || f.u_email2.value.replace(/\ /g).length == 0 )
    {
        alert("ÀÌ¸ÞÀÏÀ» ÀÔ·ÂÇÏ¼¼¿ä!!");
        f.u_email1.focus();
        return false;
    }
    
    if ( f.content.value.replace(/\ /g).length == 0 )
    {
        alert("¹®ÀÇ³»¿ëÀ» ÀÔ·ÂÇÏ¼¼¿ä!!");
        f.content.focus();
        return false;
    }
    
    return true;
}



function chkRnaRentWrite(f)
{
    if ( f.company.value.replace(/\ /g).length == 0 )
    {
        alert("¾÷Ã¼¸íÀ» ÀÔ·ÂÇÏ¼¼¿ä!!");
        f.company.focus();
        return false;
    }
    
    if ( f.tel1.value.replace(/\ /g).length == 0 || f.tel2.value.replace(/\ /g).length == 0 || f.tel3.value.replace(/\ /g).length == 0 )
    {
        alert("¿¬¶ôÃ³¸¦ ÀÔ·ÂÇÏ¼¼¿ä!!");
        f.tel1.focus();
        return false;
    }
    
    if ( f.u_email1.value.replace(/\ /g).length == 0 || f.u_email2.value.replace(/\ /g).length == 0 )
    {
        alert("ÀÌ¸ÞÀÏÀ» ÀÔ·ÂÇÏ¼¼¿ä!!");
        f.u_email1.focus();
        return false;
    }
    
    if ( f.address.value.replace(/\ /g).length == 0 )
    {
        alert("ÁÖ¼Ò¸¦ ÀÔ·ÂÇÏ¼¼¿ä!!");
        f.address.focus();
        return false;
    }
    
    if ( f.startdate.value.replace(/\ /g).length == 0 )
    {
        alert("»ç¿ëÀÏÀÚ¿¡ ½ÃÀÛÀÏÀ» ÀÔ·ÂÇÏ¼¼¿ä!!");
        f.startdate.focus();
        return false;
    }
    
    if ( f.enddate.value.replace(/\ /g).length == 0 )
    {
        alert("»ç¿ëÀÏÀÚ¿¡ Á¾·áÀÏÀ» ÀÔ·ÂÇÏ¼¼¿ä!!");
        f.enddate.focus();
        return false;
    }
    
    if ( f.starttime.value.replace(/\ /g).length == 0 )
    {
        alert("½Ã°£ÀÔ·Â¿¡ ½ÃÀÛ½Ã°£À» ¼±ÅÃÇÏ¼¼¿ä!!");
        f.starttime.focus();
        return false;
    }
    
    if ( f.endtime.value.replace(/\ /g).length == 0 )
    {
        alert("½Ã°£ÀÔ·Â¿¡ Á¾·á½Ã°£À» ¼±ÅÃÇÏ¼¼¿ä!!");
        f.endtime.focus();
        return false;
    }   
    
    return true;
}


function chkPrivateUsrWrite(f)
{
    if ( f.u_email1.value.replace(/\ /g,"").length == 0 || f.u_email2.value.replace(/\ /g,"").length == 0 )
    {
        alert("ÀÌ¸ÞÀÏÀ» ÀÔ·ÂÇÏ¼¼¿ä!!");
        f.u_email1.focus();
        return false;
    }
    
    if ( f.tel1.value.replace(/\ /g).length == 0 || f.tel2.value.replace(/\ /g).length == 0 || f.tel3.value.replace(/\ /g).length == 0 )
    {
        alert("¿¬¶ôÃ³¸¦ ÀÔ·ÂÇÏ¼¼¿ä!!");
        f.tel1.focus();
        return false;
    }
    
    if ( f.subject.value.replace(/\ /g).length == 0 )
    {
        alert("Á¦¸ñÀ» ÀÔ·ÂÇÏ¼¼¿ä!!");
        f.subject.focus();
        return false;
    }
    
    if ( f.content.value.replace(/\ /g).length == 0 )
    {
        alert("¿äÃ»³»¿ëÀ» ÀÔ·ÂÇÏ¼¼¿ä!!");
        f.content.focus();
        return false;
    }
    
    return true;
}


function chkPrivateMngWrite(f)
{
    if ( f.subject.value.replace(/\ /g,"").length == 0 )
    {
        alert("Á¦¸ñÀ» ÀÔ·ÂÇÏ¼¼¿ä!!");
        f.subject.focus();
        return false;
    }
    
    if ( f.company.value.replace(/\ /g,"").length == 0 )
    {
        alert("¾÷Ã¼¸íÀ» ÀÔ·ÂÇÏ¼¼¿ä!!");
        f.company.focus();
        return false;
    }
    
    if ( f.ceo.value.replace(/\ /g,"").length == 0 )
    {
        alert("´ëÇ¥ÀÚ¸íÀ» ÀÔ·ÂÇÏ¼¼¿ä!!");
        f.ceo.focus();
        return false;
    }
    
    if ( f.tel1.value.replace(/\ /g).length == 0 || f.tel2.value.replace(/\ /g).length == 0 || f.tel3.value.replace(/\ /g).length == 0 )
    {
        alert("¿¬¶ôÃ³¸¦ ÀÔ·ÂÇÏ¼¼¿ä!!");
        f.tel1.focus();
        return false;
    }
    
    if ( f.product.value.replace(/\ /g,"").length == 0 )
    {
        alert("»ý»êÇ°À» ÀÔ·ÂÇÏ¼¼¿ä!!");
        f.product.focus();
        return false;
    }
    
    if ( f.ocover.value.replace(/\ /g,"").length == 0 )
    {
        if ( f.cover.value.replace(/\ /g,"").length == 0 )
        {
            alert("´ëÇ¥ÀÌ¹ÌÁö¸¦ ÀÔ·ÂÇÏ¼¼¿ä!!");
            f.cover.focus();
            return false;
        }    
    }    

	// Ã¹¹øÂ° ¸Å°³º¯¼ö => true : < & Æ¯¼ö¹®ÀÚ Ã³¸®,  false : Ã³¸®¾ÈÇÔ
	// µÎ¹øÂ° ¸Å°³º¯¼ö => ÀÌ³ëµðÅÍ ¹øÈ£
	var strHTMLCode = fnGetEditorHTMLCode(false, 0); 
	if("" == strHTMLCode)
	{
		alert("³»¿ëÀ» ÀÔ·ÂÇÏ¼¼¿ä");
		return false;
	}

	document.frm["content"].value = strHTMLCode;

//    if ( FCKeditorAPI.GetInstance('content').GetXHTML().length == 0 ||  FCKeditorAPI.GetInstance('content').GetXHTML() == "<p></p>" )
//    {
//	    alert("³»¿ëÀ» ÀÔ·ÂÇÏ¼¼¿ä!!");
//	    return false;
//    }	

    //return true;
}


function getMsgLayer(title,date)
{
	var wx, wy, idw, clw, scl, max_x, left,i,str;
	wx = window.event.clientX;
	wy = window.event.clientY;

	idw = document.getElementById("msgLayer").style.pixelWidth;
	clw = document.body.clientWidth;
	scl = document.body.scrollLeft;

	max_x =  scl + clw - idw - 22;
	left = scl + wx - idw/2;
	
	if(left > max_x) left = max_x;
	if(left < scl) left = scl+2;

	document.getElementById("msgLayer").style.pixelLeft = left;
	document.getElementById("msgLayer").style.pixelTop = document.body.scrollTop + wy + 10;

	document.getElementById("msgTxt").innerHTML = title;
	document.getElementById("msgDate").innerHTML = date; 
	document.getElementById("msgLayer").style.visibility = "visible";
}

function setMsgHide()
{
	document.getElementById("msgLayer").style.visibility = "hidden";
}


function showProduct(i)
{
    document.getElementById("Layer1").style.visibility = "hidden";
    document.getElementById("Layer2").style.visibility = "hidden";
    document.getElementById("Layer3").style.visibility = "hidden";
    document.getElementById("Layer4").style.visibility = "hidden";
    document.getElementById("Layer5").style.visibility = "hidden";
    
    if ( i==1 ) document.getElementById("Layer1").style.visibility = "visible";
    if ( i==2 ) document.getElementById("Layer2").style.visibility = "visible";
    if ( i==3 ) document.getElementById("Layer3").style.visibility = "visible";
    if ( i==4 ) document.getElementById("Layer4").style.visibility = "visible";
    if ( i==5 ) document.getElementById("Layer5").style.visibility = "visible";
}


function chkProductInquiry(f)
{
    if ( f.u_email1.value.replace(/\ /g,"").length == 0 || f.u_email2.value.replace(/\ /g,"").length == 0 )
    {
        alert("ÀÌ¸ÞÀÏ ÁÖ¼Ò¸¦ ÀÔ·ÂÇÏ¼¼¿ä!!");
        f.u_email1.focus();
        return false;
    }
    
    if ( f.tel1.value.replace(/\ /g).length == 0 || f.tel2.value.replace(/\ /g).length == 0 || f.tel3.value.replace(/\ /g).length == 0 )
    {
        alert("¿¬¶ôÃ³¸¦ ÀÔ·ÂÇÏ¼¼¿ä!!");
        f.tel1.focus();
        return false;
    }
    
    if ( f.subject.value.replace(/\ /g,"").length == 0 )
    {
        alert("Á¦¸ñÀ» ÀÔ·ÂÇÏ¼¼¿ä!!");
        f.subject.focus();
        return false;
    }
    
    if ( f.content.value.replace(/\ /g,"").length == 0 )
    {
        alert("³»¿ëÀ» ÀÔ·ÂÇÏ¼¼¿ä!!");
        f.content.focus();
        return false;
    }
    
    return true;
}


function showDiv(index) 
{
    if (navigator.userAgent.indexOf("MSIE") != -1) 
    {
        if (index == 1) 
        {
            qna.style.display = "";
            faq.style.display = "none";
			
        }
        else if(index == 2)
        {
            qna.style.display = "none";
            faq.style.display = "";			
        }
    }
}



function chkFaqWrite(f)
{
    if ( f.subject.value.replace(/\ /g,"").length == 0 )
    {
        alert("Á¦¸ñÀ» ÀÔ·ÂÇÏ¼¼¿ä!!");
        f.subject.focus();
        return false;
    }
    
    if ( f.content.value.replace(/\ /g,"").length == 0 )
    {
        alert("³»¿ëÀ» ÀÔ·ÂÇÏ¼¼¿ä!!");
        f.content.focus();
        return false;
    }
    
    return true;
}


function menu1(index) 
{
    if (navigator.userAgent.indexOf("MSIE") != -1) {
        if (index == 1) {
            t1.style.display = "";
            t2.style.display = "none";
			t3.style.display = "none";
			t4.style.display = "none";
        }else if(index == 2){
            t1.style.display = "none";
            t2.style.display = "";
			t3.style.display = "none";
			t4.style.display = "none";
        }else if(index == 3){
            t1.style.display = "none";
            t2.style.display = "none";
			t3.style.display = "";
			t4.style.display = "none";
        }else if(index == 4){
            t1.style.display = "none";
            t2.style.display = "none";
			t3.style.display = "none";
			t4.style.display = "";
        }
    }
}

function menu2(index) 
{
    if (navigator.userAgent.indexOf("MSIE") != -1) {
        if (index == 1) {
            t1.style.display = "";
            t2.style.display = "none";
        }else if(index == 2){
            t1.style.display = "none";
            t2.style.display = "";
        }
    }
}





function chkIdSearch(f)
{
    if ( f.name.value.replace(/\ /g,"").length == 0 )
    {
        alert("¼º¸íÀ» ÀÔ·ÂÇÏ¼¼¿ä!!");
        f.name.focus();
        return false;
    }
    
    if ( f.email1.value.replace(/\ /g,"").length == 0 || f.email2.value.replace(/\ /g,"").length == 0 )
    {
        alert("ÀÌ¸ÞÀÏÀ» ÀÔ·ÂÇÏ¼¼¿ä!!");
        f.email1.focus();
        return false;    
    }
    
    var email = f.email1.value + "@" + f.email2.value;
    
    var url = "/NetBoard/MemberSearchModule.bipf?gubun=id&name=" + f.name.value + "&email=" + email;
    
    createXMLHttpRequest();        
    xmlHttp.open("POST", url, false);        
    xmlHttp.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
    xmlHttp.send(null);   
        
    if ( xmlHttp.ResponseText == "true" )
    {
        alert("°ü¸®ÀÚ¿¡°Ô ¹®ÀÇÇØÁÖ½Ã±â ¹Ù¶ø´Ï´Ù. Á¤º¸¿î¿µÆÀ 070-7094-5467");
        return true;
    }
    else
    {
        alert("ÀÏÄ¡ÇÏ´Â È¸¿øÁ¤º¸°¡ ¾ø½À´Ï´Ù. ´Ù½Ã ÀÔ·ÂÇØ ÁÖ¼¼¿ä");
        f.name.focus();
        return false;
    }
}


function chkPwdSearch(f)
{
    if ( f.id.value.replace(/\ /g,"").length == 0 )
    {
        alert("¾ÆÀÌµð¸¦ ÀÔ·ÂÇÏ¼¼¿ä!!");
        f.id.focus();
        return false;
    }
    
    if ( f.name.value.replace(/\ /g,"").length == 0 )
    {
        alert("¼º¸íÀ» ÀÔ·ÂÇÏ¼¼¿ä!!");
        f.name.focus();
        return false;
    }
    
    if ( f.email1.value.replace(/\ /g,"").length == 0 || f.email2.value.replace(/\ /g,"").length == 0 )
    {
        alert("ÀÌ¸ÞÀÏÀ» ÀÔ·ÂÇÏ¼¼¿ä!!");
        f.email1.focus();
        return false;    
    }
    
    var email = f.email1.value + "@" + f.email2.value;
    
    var url = "/NetBoard/MemberSearchModule.bipf?gubun=pw&id=" + f.id.value + "&name=" + f.name.value + "&email=" + email;
    
    createXMLHttpRequest();        
    xmlHttp.open("POST", url, false);        
    xmlHttp.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
    xmlHttp.send(null);   
    
    if ( xmlHttp.ResponseText == "true" )
    {
        alert("°ü¸®ÀÚ¿¡°Ô ¹®ÀÇÇØÁÖ½Ã±â ¹Ù¶ø´Ï´Ù. Á¤º¸¿î¿µÆÀ 070-7094-5467");
        return true;
    }
    else
    {
        alert("ÀÏÄ¡ÇÏ´Â È¸¿øÁ¤º¸°¡ ¾ø½À´Ï´Ù. ´Ù½Ã ÀÔ·ÂÇØ ÁÖ¼¼¿ä");
        f.name.focus();
        return false;
    }
}



function chkMemberOut(f)
{
    if ( f.pwd.value.replace(/\ /g,"").length == 0 )
    {
        alert("ºñ¹Ð¹øÈ£¸¦ ÀÔ·ÂÇÏ¼¼¿ä!!");
        f.pwd.focus();
        return false;
    }
    
    if ( confirm("Á¤¸» È¸¿øÅ»Åð ÇÏ½Ã°Ú½À´Ï±î?") )
    {
		var pwd = f.pwd.value;
		var reason = f.reason.value;
        var url = "/NetBoard/MemberOutModule.bipf?pwd=" + pwd + "&reason=" +reason;
    
        createXMLHttpRequest();        
        xmlHttp.open("post", url, false);        
        xmlHttp.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
        xmlHttp.send(null);  
        
        if ( xmlHttp.ResponseText == "true" )
        {          
           alert("Á¤»óÀûÀ¸·Î È¸¿øÅ»Åð Ã³¸® µÇ¾ú½À´Ï´Ù."); 
           parent.location.href = "/";
        }
        else
        {
            alert("ºñ¹Ð¹øÈ£°¡ ÀÏÄ¡ÇÏÁö ¾Ê½À´Ï´Ù. ´Ù½Ã ÀÔ·ÂÇØ ÁÖ¼¼¿ä.");
            f.pwd.focus();
            return false;
        } 
    }
}

function chkMemOut(f)
{
	if ( f.reason.value.replace(/\ /g,"").length == 0 )
    {
        alert("Å»Åð»çÀ¯¸¦ ÀÔ·ÂÇÏ¼¼¿ä!!");
        f.reason.focus();
        return false;
    }
	if ( f.pwd.value.replace(/\ /g,"").length == 0 )
    {
        alert("ºñ¹Ð¹øÈ£¸¦ ÀÔ·ÂÇÏ¼¼¿ä!!");
        f.pwd.focus();
        return false;
    }
	if (confirm("Á¤¸» È¸¿øÅ»Åð ÇÏ½Ã°Ú½À´Ï±î?"))
		{
			f.submit();
		}
	}

function chkProposalWrite(f)
{    
    if ( f.subject.value.replace(/\ /g,"").length == 0 )
    {
        alert("Á¦¸ñÀ» ÀÔ·ÂÇÏ¼¼¿ä!!");
        f.subject.focus();
        return false;
    }
    
    if ( f.writer.value.replace(/\ /g,"").length == 0 )
    {
        alert("ÀÛ¼ºÀÚ¸¦ ÀÔ·ÂÇÏ¼¼¿ä!!");
        f.writer.focus();
        return false;
    }
    
    if ( f.email1.value.replace(/\ /g,"").length == 0 || f.email2.value.replace(/\ /g).length == 0 )
    {
        alert("ÀÌ¸ÞÀÏ ÁÖ¼Ò¸¦ ÀÔ·ÂÇÏ¼¼¿ä!!");
        f.email1.focus();
        return false;
    }
    
    if ( f.tel1.value.replace(/\ /g,"").length == 0 || f.tel2.value.replace(/\ /g,"").length == 0 || f.tel3.value.replace(/\ /g,"").length == 0 )
    {
        alert("¿¬¶ôÃ³¸¦ ÀÔ·ÂÇÏ¼¼¿ä!!");
        f.tel1.focus();
        return false;
    }
    
    if ( f.content.value.replace(/\ /g,"").length == 0 )
    {
        alert("³»¿ëÀ» ÀÔ·ÂÇÏ¼¼¿ä!!");
        f.content.focus();
        return false;
    }
    
    return true;
}

function hideLayer()
{
    Pop.style.display="none";
}

function ViewLayer()
{
    Pop.style.display="block";
}


function chkReserWrite(f)
{
    if ( f.writer.value.replace(/\ /g,"").length == 0 )
    {
        window.open('ComLogin.asp?bbsId=20080708091217120&gopage=ReserWrite','name','resizable=no  width=450 height=570');
        return false;
    }
    
    if ( f.equipment.value.replace(/\ /g,"").length == 0 )
    {
        alert("¿¹¾à ½Ã¼³À» ¼±ÅÃÇÏ¼¼¿ä!!");
        f.equipment.focus();
        return false;
    }
    
    if ( f.company.value.replace(/\ /g,"").length == 0 )
    {
        alert("¾÷Ã¼¸íÀ» ÀÔ·ÂÇÏ¼¼¿ä!!");
        f.company.focus();
        return false;
    }
    
    if ( f.tel1.value.replace(/\ /g,"").length == 0 || f.tel2.value.replace(/\ /g,"").length == 0 || f.tel3.value.replace(/\ /g,"").length == 0 )
    {
        alert("¿¬¶ôÃ³¸¦ ÀÔ·ÂÇÏ¼¼¿ä!!");
        f.tel1.focus();
        return false;
    }
    
    if ( f.address.value.replace(/\ /g,"").length == 0 )
    {
        alert("ÁÖ¼Ò¸¦ ÀÔ·ÂÇÏ¼¼¿ä!!");
        f.address.focus();
        return false;
    }
    
    if ( f.startdate.value.replace(/\ /g,"").length == 0 )
    {
        alert("»ç¿ë ½ÃÀÛÀÏÀÚÀ» ¼±ÅÃÇÏ¼¼¿ä!!");
        f.startdate.focus();
        return false;
    }
    
    if ( f.enddate.value.replace(/\ /g,"").length == 0 )
    {
        alert("»ç¿ë Á¾·áÀÏÀÚÀ» ¼±ÅÃÇÏ¼¼¿ä!!");
        f.enddate.focus();
        return false;
    }
    
    if ( f.stime.value.replace(/\ /g,"").length == 0 )
    {
        alert("»ç¿ë ½ÃÀÛ½Ã°£À» ¼±ÅÃÇÏ¼¼¿ä!!");
        f.stime.focus();
        return false;
    }
    
    if ( f.etime.value.replace(/\ /g,"").length == 0 )
    {
        alert("»ç¿ë Á¾·á½Ã°£À» ¼±ÅÃÇÏ¼¼¿ä!!");
        f.etime.focus();
        return false;
    }
    
    if ( f.content.value.replace(/\ /g,"").length == 0 )
    {
        alert("¿äÃ»»çÇ×À» ÀÔ·ÂÇÏ¼¼¿ä!!");
        f.content.focus();
        return false;
    }
    
    
    return true;
}


function openNewsLetter()
{
    window.open('http://www.bizbc.or.kr/newsletter.asp','newwin','resizable=yes toolbar=yes menubar=yes location=yes scrollbars=yes status=yes');
    self.close();
}

function openNew(url)
{
    window.open(url,'newwin','resizable=yes toolbar=yes menubar=yes location=yes scrollbars=yes status=yes');
    self.close();
}

function openOpener(url)
{
    opener.location.href=url;
    self.close();
}

function closeWin(idx)
{
    if ( document.frm.close.checked ) {
			setCookie("bipfpop"+idx,"bipfpop",1);
	}
    self.close();
}

function closeLayer(idx)
{
    if ( document.frm.close.checked ) setCookie("bipflayer"+idx,"bipfpop",1);
    document.all.bipflayer.style.visibility = "hidden";    
}



function getPopup(nTop, nLeft, nWidth, nHeight, nIdx, szContent)
{
    document.write("<form name='frm'><div id='bipflayer' style='position:absolute;background-color:#ffffff;visibility:visible;z-index:20;top:" + nTop + ";left:" + nLeft + ";width:" + nWidth + ";height:" + nHeight + ";");
    document.write("<table cellspacing='0' cellpadding='0' width='" + nWidth + "'><tr><td valign='top' align='center'>" + szContent + "</td></tr>");
    document.write("<tr><td align='right' bgcolor='0054A6' height='22'>");
    document.write("<input type='checkbox' name='close'><font color='000000'> ¿À´ÃÇÏ·ç ¿­Áö ¾ÊÀ½ </font>&nbsp;&nbsp;");
    document.write("<a href='javascript:;' onclick='closeLayer(" + nIdx + ");return false;'><img src='/images/global/close.gif' valign='absmiddle' border='0'></a>&nbsp;&nbsp;&nbsp;");
    document.write("</td></tr></table>");
    document.write("</div></form>");
}	


function clickBanner(nIdx, type)
{
    var url = "/NetBoard/ComBanner.bipf?idx=" + nIdx;
     
    createXMLHttpRequest();        
    xmlHttp.open("POST", url, false);        
    xmlHttp.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
    xmlHttp.send(null);  
    
    if ( type == "N" )
    {
        window.open(xmlHttp.ResponseText,'bannerwin','resizable=yes toolbar=yes menubar=yes location=yes scrollbars=yes status=yes');
    }
    else if ( type == "O" )
    {
        location.href = xmlHttp.ResponseText;
    }
    else if ( type == "J" )
    {
       window.open(xmlHttp.ResponseText,'ebook','resizable=no width=1024 height=768');      
    }
}



function showGigan(){	
    var f = document.frm;
    
    if ( f.options[2].checked )
    {
        gigan.style.display = "";
    }
    else
    {
        gigan.style.display = "none";
    }   
}

function NewWin(){
	window.open("http://www.bizbc.or.kr/newsletter.asp","NewLetter","menubar=no toolbar=no location=no scrollbars=no status=no resizble=no width=400 height=350 left=100 top=100");
}
