document.write("<SCRIPT LANGUAGE=JavaScript src=/js/common_js.js>")
document.write("</SCRIPT>") 

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_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_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_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];}
}


// object È°¼ºÈ­ °ü·Ã 
function writeObjectStr(buf) {
    document.write(buf) ;
}

function writeplay(playdata) {
	var sBuf = "";
	sBuf += "<OBJECT id=\"dongpy\"	codeBase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab\" height=\"140\" width=\"195\" classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\">";
	sBuf += "<PARAM NAME=\"_cx\" VALUE=\"5080\">";
	sBuf += "<PARAM NAME=\"_cy\" VALUE=\"5080\">";
	sBuf += "<PARAM NAME=\"FlashVars\" VALUE=\"\">";
	sBuf += "<PARAM NAME=\"Movie\" VALUE=\"";
	sBuf += playdata;
	sBuf += "\">";
	sBuf += "<PARAM NAME=\"Src\" VALUE=\"";
	sBuf += playdata;
	sBuf += "\">";
	sBuf += "<PARAM NAME=\"WMode\" VALUE=\"Window\">";
	sBuf += "<PARAM NAME=\"Play\" VALUE=\"-1\">";
	sBuf += "<PARAM NAME=\"Loop\" VALUE=\"-1\">";
	sBuf += "<PARAM NAME=\"Quality\" VALUE=\"High\">";
	sBuf += "<PARAM NAME=\"SAlign\" VALUE=\"\">";
	sBuf += "<PARAM NAME=\"Menu\" VALUE=\"-1\">";
	sBuf += "<PARAM NAME=\"Base\" VALUE=\"\">";
	sBuf += "<PARAM NAME=\"AllowScriptAccess\" VALUE=\"always\">";
	sBuf += "<PARAM NAME=\"Scale\" VALUE=\"ShowAll\">";
	sBuf += "<PARAM NAME=\"DeviceFont\" VALUE=\"0\">";
	sBuf += "<PARAM NAME=\"EmbedMovie\" VALUE=\"0\">";
	sBuf += "<PARAM NAME=\"BGColor\" VALUE=\"000000\">";
	sBuf += "<PARAM NAME=\"SWRemote\" VALUE=\"\">";
	sBuf += "<PARAM NAME=\"MovieData\" VALUE=\"\">";
	sBuf += "<PARAM NAME=\"SeamlessTabbing\" VALUE=\"1\">";
	sBuf += "<PARAM NAME=\"Profile\" VALUE=\"0\">";
	sBuf += "<PARAM NAME=\"ProfileAddress\" VALUE=\"\">";
	sBuf += "<PARAM NAME=\"ProfilePort\" VALUE=\"0\">";
	sBuf += "<PARAM NAME=\"AllowNetworking\" VALUE=\"all\">";
	sBuf += "<PARAM NAME=\"AllowFullScreen\" VALUE=\"false\">";
	sBuf += "<embed src=\"";
	sBuf += playdata; 
	sBuf += "\" quality=\"high\" bgcolor=\"#ffffff\" width=\"420\" height=\"374\" name=\"MNC_HMOVIE\" align=\"middle\" allowScriptAccess=\"always\" type=\"application/x-shockwave-flash\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\" />";
	sBuf += "</OBJECT>";
    document.write(buf);
}

function ObjectDisplay(swffilepath, w, h) {
	var sBuf = "";
	 sBuf += "<OBJECT classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0\"" ;
	 sBuf += "WIDTH=\""+ w +"\" HEIGHT=\""+ h +"\" id=\"flash\" ALIGN=\"\">";
	 sBuf += "<PARAM NAME=movie VALUE=\""+ swffilepath +"\">";
	 sBuf += "<PARAM NAME=quality VALUE=high> <PARAM NAME=wmode VALUE=transparent> <PARAM NAME=bgcolor VALUE=#000000> ";
	 sBuf += "<EMBED src=\""+ swffilepath +"\" quality=high bgcolor=#000000  WIDTH=\""+ w +"\" HEIGHT=\""+ h +"\" NAME=\"flash\" ALIGN=\"\"";
	 sBuf += "TYPE=\"application/x-shockwave-flash\" PLUGINSPAGE=\"http://www.macromedia.com/go/getflashplayer\"></EMBED>";
	 sBuf += "</object>";
    document.write(sBuf) ;
}

function fnSetFlash(sFile, sWID, sWVar, iWidth, iHeight, sWAlign, sWDomain, sQuality, sWmode, sWmenu, sWbgColor) {
     if (sFile == "") alert("ÆÄÀÏ ÀÌ¸§Àº ¹Ýµå½Ã Á¤±ÔÈ­µÇ¾î¾ß ÇÕ´Ï´Ù.");
     if (sWAlign == "") sWAlign = "middle";
     if (sQuality == "") sQuality = "high";
     if (sWmode == "") sWmode = "transparent";
     if (sWmenu == "") sWmenu = "false";

     if (sWDomain == "") sWDomain = "sameDomain";
     if (sWbgColor == "") sWbgColor = "#FFFFFF";

var sHTML = '<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" '
          + ' codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" '
          + ' ID="' + sWID
          + '" WIDTH="' + iWidth
          + '" HEIGHT="' + iHeight
          + '" ALIGN="' + sWAlign + '">'
          + ' <PARAM NAME="allowScriptAccess" VALUE="' + sWDomain + '" />'
          + ' <PARAM NAME="movie" VALUE="' + sFile + '" />'
          + ' <PARAM NAME="FlashVar" VALUE="' + sWVar + '" />'
          + ' <PARAM NAME="quality" VALUE="' + sQuality + '" />'
          + ' <PARAM NAME="wmode" VALUE= "' + sWmode + '" />  \n'
          + ' <PARAM NAME="menu" VALUE="' + sWmenu + '" />'
          + ' <param name="bgcolor" value="' + sWbgColor +'" /> '
          + ' <EMBED src=' + sFile
          + ' menu=' + sWmenu
          + ' quality=' + sQuality
          + ' wmode=' + sWmode + ' '
          + ' swLiveConnect=TRUE'
          + ' WIDTH=' + iWidth
          + ' HEIGHT=' + iHeight
          + ' NAME=' + sWID
          + ' ALIGN=' + sWAlign
          + ' allowScriptAccess=' + sWDomain
          + ' TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer" />'
          + ' </object>';

	document.write(sHTML);
}


// ·¹ÀÌ¾î °ü·Ã
 function HShowLayer(id) {
	var tmp_obj_nm;
	var tmp_obj;

	for(var i=1; i<3 ;i++) {

		tmp_obj_nm = "L"+i;
		tmp_obj = document.getElementById(tmp_obj_nm);
		if(i == id) {
			tmp_obj.style.display = '';
		}
		else {
			tmp_obj.style.display = 'none';
		}
	}//end for
}

function HShowLayer2(id) {
	var tmp_obj_nm;
	var tmp_obj;

	for(var i=1; i<3 ;i++) {

		tmp_obj_nm = "Z"+i;
		tmp_obj = document.getElementById(tmp_obj_nm);

		if(i == id) {
			tmp_obj.style.display = '';
		}
		else {
			tmp_obj.style.display = 'none';
		}
	}//end for
}




//±ÛÀÚ¼ö¿¡ µû¸¥ Æ÷Ä¿½º ÀÚµ¿ÀÌµ¿ ÇÔ¼ö
function moveNext(chk,limit,next) {
	if( chk.value.length == limit ) next.focus();
}


function checkSpace( str ) {
	  if( str.indexOf(" ") != -1) {
		//alert("¶ç¾î¾²±â ¾øÀÌ ¸ðµç ¹®ÀÚ¸¦ ºÙ¿©¾²¼¼¿ä.");
		str = str.replace(/\s/gi, "" );    /* '\s' is white space regular expression */ 
		return str; }
	  else { return ""; }
} 


// trimÇÔ¼ö
function trim(s){ 
	s = s.replace(/^\s*/,'').replace(/\s*$/, ''); 
return s; 
} 

function Left(str, n){
        if (n <= 0)
                return "";
        else if (n > String(str).length)
                return str;
        else
                return String(str).substring(0,n);
  }

function Right(str, n){
        if (n <= 0)
             return "";
        else if (n > String(str).length)
             return str;
        else {
             var iLen = String(str).length;
             return String(str).substring(iLen, iLen - n);
        }
}

//--¿µ¹®°ú ¼ýÀÚ¸¸ ÀÔ·Â ¹Þ±â-----------------------
function valid(field) { 
	var valid = "abcdefghijklmnopqrstuvwxyz0123456789" ;
	var temp; 
	
	for (var i=0; i<field.value.length; i++) { 
		temp = "" + field.value.substring(i, i+1); 
		if (valid.indexOf(temp) == "-1") return false;
	} 
	return true;
}



//-- ±Û¾²±â ÅÂ±× ÀÔ·Â½Ã Æ¯¼ö¹®ÀÚ Á¦°Å  
//tag ±ÝÄ¢ ¹®ÀÚ (%, &, +, <, >, ?, /, \, ', ", =,  \n) 
//comma´Â º°·Îµµ Á¦¿ÜÇÏ´Â ·ÎÁ÷ÀÌ ÀÖÀ½
var restrictedTagChars = /[\x25\x26\x2b\x3c\x3e\x3f\x2f\x5c\x27\x22\x3d]|(\x5c\x6e)/g;
var IE = false ;
if (window.navigator.appName.indexOf("Explorer") !=-1){
	IE = true;
}

function chkTag1(aEvent, input) 	{	
	var keynum;
	if(typeof aEvent=="undefined") aEvent=window.event;
	if(IE) { keynum = aEvent.keyCode; }
	else { keynum = aEvent.which; }

	var ret = input.value;
	if(ret.match(restrictedTagChars) != null ) {
		 ret = ret.replace(restrictedTagChars, "");
		 input.value=ret;
	}
	//ÄÞ¸¶°¡ ¿¬¼ÓÀ¸·Î ÀÖÀ¸¸é ÇÏ³ª·Î ¸¸µç´Ù.
	re = /[\x2c][\x2c]+/g;
	if(ret.match(re) != null ){
		ret = ret.replace(re, ",");
		input.value=ret;
	}
	return;
}


function chkTag2(input) {
		input.value = ArticleTag.validateTagString(input.value);
		//Áßº¹µÇ´Â ÅÂ±× Á¦°Å
		input.value = ArticleTag.eliminateDuplicate(input.value);
		var tagcount = ArticleTag.length(input.value);
		return;
		//ÅÂ±× ¼ö Á¦ÇÑ
		if(tagcount > 10) {
			alert("ÅÂ±×´Â ÃÖ´ë 10°³ ±îÁö ÀÔ·ÂÀÌ °¡´ÉÇÕ´Ï´Ù.");
			input.value = ArticleTag.absoluteTagString(input.value, 10);			
			input.focus();			
			return;
		}
			

		//ÅÂ±×ÀÇ ±æÀÌ Á¦ÇÑ
		var bvalidate;
		var tagmaxlength = 100;
		bvalidate = ArticleTag.isValidateTagLength(input.value, tagmaxlength);

		if(!bvalidate) {
			alert("ÅÂ±×´Â  100ÀÚ ÀÌ»ó ÀÔ·ÂÇÒ ¼ö ¾ø½À´Ï´Ù.");
			input.focus();
			return;
		}
}


var ArticleTag =
{
	//À¯È¿ÇÑ ÅÂ±×¸íÀÎÁö È®ÀÎ.
	isTagname : function(tagname)
		{
			return tagname.match(restrictedTagChars)==null;
		}
	,

	//ÅÂ±× ¹®ÀÚ¿­À» À¯È¿ÇÏ°Ô ¸¸µç´Ù.( ±ÝÁö¹®ÀÚ Á¦°Å, ¿¬¼ÓµÇ´Â ÄÄ¸¶ Á¦°Å )
	validateTagString : function(tagstring)
		{
			var ret = tagstring.replace(restrictedTagChars, "");
			//ÄÞ¸¶°¡ ¿¬¼ÓÀ¸·Î ÀÖÀ¸¸é ÇÏ³ª·Î ¸¸µç´Ù.
			re = /[\x2c]+/g;
			return ret.replace(re, ",");
		}
	,
	
	absoluteTagString : function(tagstring, maxcnt)
		{
			var valitags = ArticleTag.validateTagString(tagstring); 	
			var arraytag = valitags.split(","); 		
			var tagnames = ""; 
			var absolutecnt = arraytag.length;
			if(absolutecnt > maxcnt) absolutecnt = maxcnt;			
			for(var i=0; i< absolutecnt; i++) { tagnames = tagnames + arraytag[i] + ","; }
			tagnames = ArticleTag.validateTagString(tagnames);		
			tagnames = tagnames.substring(0, tagnames.length-1);
			return tagnames;	
		} 
	,

	//Áßº¹µÇ´Â ÅÂ±×¸¦ ¾ø¾Ø´Ù.
	eliminateDuplicate : function(tagstring) 
		{
			var valitags = ArticleTag.validateTagString(tagstring);
			var arraytag = valitags.split(",");
			var tagnames = "";		
			for(var i=0; i<arraytag.length; i++)
			{
				for(var j=0; j<i; j++) { if(trim(arraytag[j])==trim(arraytag[i])) { arraytag[i]=""; } } //ÀÌ¹Ì Á¸Àç ÇÏ´Â ÅÂ±×¶ó¸é ¾ø¾Ú.
				tagnames = tagnames + arraytag[i] + ",";	
			}
			tagnames = ArticleTag.validateTagString(tagnames);
			tagnames = tagnames.substring(0, tagnames.length-1);
			return tagnames;
		}
	,

	//ÅÂ±×¼ö ¸¦ °è»ê ÇÑ´Ù.
	length : function(tagstring)
		{
			var arraytag = tagstring.split(",");		
			return arraytag.length;
		}
	,

	//°¢ ÅÂ±×ÀÇ ±æÀÌ¸¦ Æ¯Á¤ Å©±â ÀÌÇÏ·Î Á¦ÇÑÇÑ´Ù.
	validateTagLength : function(tagstring, maxlen)
		{
			var arraytag = tagstring.split(",");
			var tagnames = '';
			for(var i=0; i<arraytag.length; i++) {
				if(arraytag[i].length > maxlen) { arraytag[i] = arraytag[i].substring(0, maxlen); }
				tagnames = tagnames + arraytag[i] + ",";
			}
			tagnames = tagnames.substring(0, tagnames.length-1);
			tagnames = ArticleTag.eliminateDuplicate(tagnames);
			return tagnames;
		}
	,

	//°¢ ÅÂ±×ÀÇ ±æÀÌ°¡ À¯È¿ÇÑÁö È®ÀÎÇÑ´Ù.
	isValidateTagLength : function(tagstring, maxlen)
		{
			var arraytag = tagstring.split(",");
			for(var i=0; i<arraytag.length; i++) { if(arraytag[i].length > maxlen) { return false; } }
			return true;
		}
}	

function mainpreview(filename){
		window.open("/newsTV/imgPreview.asp?filename="+filename,"preview","width=100 , height=100 , resizable=yes , scrollbars=yes")
	}



function viewMypage(Login_UserID, viewuserid){
	if (Login_UserID == viewuserid) {
		parent.location.href  = "/section/member/index.asp?userid="+Login_UserID;
	} else {
		var winl = (screen.width - 1024)/2;
		var wint = (screen.height - 800)/2;
		var Url = "/section/member/index.asp?userid="+viewuserid;
		w = window.open(Url, 'mypagewin', 'scrollbars=yes, resizable=yes width=1024, height=800, top='+wint+', left='+winl);
		w.focus();
	} 
}

function viewMypagePulug(Login_UserID, viewuserid, vHome){
	var winl = (screen.width - 1024)/2;
	var wint = (screen.height - 800)/2;
	var vUrl = vHome;

	if (Login_UserID == viewuserid) {
		vUrl += "/section/member/index.asp?userid="+Login_UserID;
	} else {
		vUrl += "/section/member/index.asp?userid="+viewuserid;
	} 
	w = window.open(vUrl, 'mypagewin', 'scrollbars=yes, resizable=yes width=1024, height=800, top='+wint+', left='+winl);
	w.focus();
}



// »õÃ¢ °ü·Ã
function popup_open(url, w, h) {
	var winl = (screen.width - w)/2;
	var wint = (screen.height - h)/2;
	w = window.open(url, 'mypagewin', 'scrollbars=auto, resizable=no width='+w+', height='+h+', top='+wint+', left='+winl);
	w.focus();
}

function popup_search(url, w, h) {
	var winl = (screen.width - w)/2;
	var wint = (screen.height - h)/2;
	w = window.open(url, 'searchwin', 'toolbar=yes, location=yes, directories=no, status=yes, menubar=yes, scrollbars=yes, resizable=yes, width='+w+', height='+h+', top='+wint+', left='+winl);
	w.focus();
}

function zoom_pop_open(theURL) { //v2.0
  w = window.open("/lib/bbs/file_view.asp?view_img="+escape(theURL),"zoom_pop", " toolbar=0, status=0, scrollbars=no, location=0, menubar=0, width=100, height=100, resizable=yes,scrollbars=no,status=0");
  w.focus();
}


// ÆÄÀÏ ´Ù¿î·Îµå
function file_download(getpath) {
	var s=getpath.lastIndexOf("/");
	var m=getpath.lastIndexOf(".");
	var e=getpath.length;
	 var filepath = getpath.substring(0,s+1);
	var filename=getpath.substring(s+1,m);
	var extname=getpath.substring(m+1,e);
	 filename = filename + "." + extname;
	var url = '/lib/bbs/DownLoad.asp?filepath='+getpath+'&filename='+filename;
	 popup_open(url, 300, 300);
}


// ÆÄÀÏ ´Ù¿î·Îµå
function file_download2(getpath,filenum) {

	if(typeof filenum=="undefined") filenum="1";
	var s=getpath.lastIndexOf("/");
	var m=getpath.lastIndexOf(".");
	var e=getpath.length;
	 var filepath = getpath.substring(0,s+1);
	var filename=getpath.substring(s+1,m);
	var extname=getpath.substring(m+1,e);
	 filename = filename + "." + extname;
	var url = '/lib/bbs/DownLoad.asp?filepath='+getpath+'&filename='+filename+'&filenum='+filenum;
	 popup_open(url, 300, 300);
}



//################################################
// ÆÄÀÏ È®ÀåÀÚ¸¦ ¼Ò¹®ÀÚ·Î ¸®ÅÏ È®ÀåÀÚÃßÃâ 07/08/29
//################################################
function getFileExtension(filePath)
{
	  var lastIndex = -1;
	  lastIndex = filePath.lastIndexOf('.');
	  var extension = "";
	  if ( lastIndex != -1 ) {
		extension = filePath.substring( lastIndex+1, filePath.len );
	  }
	  else {
		extension = "";
	  }
	  extension	=	extension.toLowerCase()
	  return extension;		
}



function topSearch() {
	if(document.TopForm.keyword.value==""){
		alert("ÅëÇÕ°Ë»ö½Ã °Ë»ö¾î´Â ÇÊ¼öÀÔ´Ï´Ù.");
		document.TopForm.keyword.focus();
		return;
	}
	if (document.TopForm.f_code.value == "") { document.TopForm.action = "/section/search/index.asp";	}
	document.TopForm.submit();
}

function total_search() {
	if(document.TopForm.keyword.value==""){
		alert("°Ë»ö¾î¸¦ ÀÔ·ÂÇØ ÁÖ¼¼¿ä.");
		document.TopForm.keyword.focus();
		return;
	}
	if (document.TopForm.collection.value == "") { document.TopForm.action = "/section/search/index.asp";	}
	document.TopForm.submit();
}

function Login_Msg() {
	alert("·Î±×ÀÎ ÇÏ½Å ÈÄ »ç¿ëÀÌ °¡´ÉÇÕ´Ï´Ù. ·Î±×ÀÎÀ» ÇØÁÖ¼¼¿ä.");
	location.href="/member/login.asp";
}

function Login_Msg_nolocation() {
	alert("·Î±×ÀÎ ÇÏ½Å ÈÄ »ç¿ëÀÌ °¡´ÉÇÕ´Ï´Ù. ·Î±×ÀÎÀ» ÇØÁÖ¼¼¿ä.");
	return;
}

function goScrap(bd_idx){
	var Login_UserId = "<%=Login_UserId%>";
	if (Login_UserId == "") alert("·Î±×ÀÎÀ» ÇÏ¼Å¾ß ½ºÅ©·¦ÀÌ °¡´ÉÇÕ´Ï´Ù.");
	else {
		var winl = (screen.width - 360)/2;
		var wint = (screen.height - 150)/2;
		var Url = "/include/common/goScrap.asp?bd_idx="+bd_idx;
		w = window.open(Url, 'goScrap', 'scrollbars=no, width=360, height=150, top='+wint+', left='+winl);
		w.focus();
	} 
}

function goSingo(bd_idx,sType,stitle,sUserName,sUserid){
	var Login_UserId = "<%=Login_UserId%>";
	if (Login_UserId == "") alert("·Î±×ÀÎÀ» ÇÏ¼Å¾ß ½Å°íÇÏ±â°¡ °¡´ÉÇÕ´Ï´Ù.");
	else {
		var winl = (screen.width - 360)/2;
		var wint = (screen.height - 300)/2;
		var Url = "/include/common/goSingo.asp?bd_idx="+bd_idx+"&sType="+sType+"&stitle="+stitle+"&sUserName="+sUserName+"&sUserid="+sUserid;
		w = window.open(Url, 'goSingo', 'scrollbars=no, width=360, height=300, top='+wint+', left='+winl);
		w.focus();
	}
}



function getLinkPath(menucode){
	switch (Left(menucode,4)) {
		case "M003" : return "tvzone/";
		case "M013" : return "video/";
		case "M005" : return "onlinepc/";
		case "M014" : return "onlinepc/";
		case "M006" : return "ucc/";
		case "M017" : return "ucc/";
		case "M012" : return "gamer_news/";
		//case "M007" : return "flashgame/";
		case "M011" : return "customer/";
		//case "M002" : return "newsTV/";
		//case "M004" : return "info/";
		case "M015" : return "starcraft/";
		//case "S001" : return "knowledge/";
	}	
}


//ÀúÀÛ±Ç°ü·Ã Ã¼Å©
function exception_check (str) {
	var pos1 = str.indexOf("ÅÂ¿Õ");
	var pos2 = str.indexOf("ÅÂ¿Õ»ç½Å±â");
	var pos3 = str.indexOf("ÀÌ»ê");
	var pos4 = str.indexOf("·Îºñ½ºÆ®");		
	var pos5 = str.indexOf("¿Õ°ú³ª");
	var pos6 = str.indexOf("¿Õ°ú ³ª");
	if (pos1 > -1 || pos2 > -1 || pos3 > -1 || pos4 > -1 || pos5 > -1 || pos6 > -1) {
		alert("ÀúÀÛ±Ç¿¡ À§¹èµÇ´Â ÄÁÅÙÃ÷´Â ¾÷·Îµå¸¦ ±ÝÁö ÇÕ´Ï´Ù.\n\nÀúÀÛ±Ç¿¡ À§¹èµÇ´Â ÄÁÅÙÃ÷, ¶Ç´Â ¿µ»ó¹°\n(¹æ¼Û3»ç ¿µ»ó¹°, ¹ÂÁ÷ºñµð¿À)Àº ¾÷·Îµå¸¦ ±ÝÁö ÇÕ´Ï´Ù.\n\n´Ü, ÆÐ·¯µð/ÄÚ¹Í¹°ÀÇ °æ¿ì´Â ¾÷·Îµå °¡´ÉÇÕ´Ï´Ù."); 
		return false ;
	}
	return true; 
}


// ±ÛÀÚ¼ö ÀÔ·Â Á¦ÇÑ (object name, byte)
function fc_chk_byte(aro_name,ari_max) {
	var ls_str     = aro_name.value;
	var li_str_len = ls_str.length;
	//var li_max      = ari_max * 2;
	var li_max      = ari_max;
	var i           = 0;
	var li_byte     = 0;
	var li_len      = 0;
	var ls_one_char = "";
	var ls_str2     = "";

	for(i=0; i< li_str_len; i++) {
		ls_one_char = ls_str.charAt(i);
		if (escape(ls_one_char).length > 4) li_byte += 2;
		else li_byte++;
		if (li_byte <= li_max) li_len = i + 1;
	}

	if(li_byte > li_max) {
		alert("ÇÑ±Û " +  ari_max + "Byte¸¦ ÃÊ°ú ÀÔ·ÂÇÒ¼ö ¾ø½À´Ï´Ù. ÃÊ°úµÈ ³»¿ëÀº ÀÚµ¿À¸·Î »èÁ¦ µË´Ï´Ù.");
		ls_str2 = ls_str.substr(0, li_len);
		aro_name.value = ls_str2;
	}
	aro_name.focus();   
}


function getCookie(sName) {
        var aCookie = document.cookie.split("; ") ;
        for(var i=0 ; i<aCookie.length ; i++) {
             var aCrumb = aCookie[i].split("=") ;
             if(sName == aCrumb[0])
                  return unescape(aCrumb[1]) ;
        }
 }

function setCookie( name, value, expiredays ) {
	var now = new Date();
	now.setDate( now.getDate() + expiredays );
	document.cookie = name + "=" + escape( value ) + "; path=/; expires=" + now.toGMTString() + ";"
}


//ÀÌ¹ÌÁö¿øº»»çÀÌÁî ÆË¾÷¶ç¿ì±â  ½ÃÀÛ
function ZoomImgPop(img_path, viewtype){
	poto= new Image();
	poto.src=(img_path);
	WinOpenControl(img_path, viewtype);
}

function WinOpenControl(img_path, viewtype){
	if((poto.width!=0)&&(poto.height!=0)){
		ZoomWinOpen(img_path,poto.width,poto.height, viewtype);
	}else{
		winobj = "WinOpenControl('"+img_path+"', '"+viewtype+"')";
		openterm = setTimeout(winobj,20); 
	}
}

function ZoomWinOpen(img_view, W, H, scrollbarsType) {
	if (scrollbarsType = "yes") { // ½ºÅ©·Ñ »ý±â°Ô ¿ÀÇÂ
		if (W > screen.availWidth || H > screen.availHeight) scrollbarsType = "yes"; 	
		else 	scrollbarsType = "no"; 
		var wint = (screen.height - H)/2;
		var winl = (screen.width - W)/2;
	} else {  // È­¸éÀ» ³ÑÄ¡Áö ¾Ê°Ô Ãà¼Ò
		scrollbarsType = "no"; 
		if (W >= screen.availWidth || H >= screen.availHeight) {
			if (W > H) {
				H = parseInt((screen.availWidth * H) / W) ;
				W = screen.availWidth;
			} else {
				W = parseInt((screen.availHeight * W) / H) ;
				H = screen.availHeight; 
			}
		}
		var wint = (screen.height - H)/2;
		var winl = (screen.width - W)/2;
	}

	var winHandle = window.open("" ,"ZoomWin","toolbar=no, resizable=no, scrollbars="+scrollbarsType+", top="+wint+", left="+winl+" ,width=" + W + ",height=" + H); 
	if(winHandle != null) {
		var htmlString = "<html><head><title>¿øº» ÀÌ¹ÌÁö</title></head>" ;
		htmlString += "<body leftmargin=0 topmargin=0 marginwidth=0 marginheight=0>" ; 
		htmlString += "<img src=\"" + img_view + "\" border=0 width='"+W+"' height='"+H+"' alt='ÀÌ¹ÌÁöÅ¬¸¯:È­¸é´Ý±â' onclick='window.close();'>" ;
		htmlString += "</body></html>" ;
		winHandle.document.open ();
		winHandle.document.write(htmlString);
		winHandle.document.close();
	} 
	if(winHandle != null) winHandle.focus();
	return winHandle;
}
//ÀÌ¹ÌÁö¿øº»»çÀÌÁî ÆË¾÷¶ç¿ì±â  ³¡


function isNull(v) {
	v = trim(v);
	if (v.length <= 0) return true;
	else return false;

}