function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
} 
 
function openerReload(){
opener.window.location.reload();
window.close();
}

function popup1(popup_filename1){
	if (getCookie("nomore1")=="checked"){
	}else{
		window.open(popup_filename1,'event1', 'width=10,height=10, marginwidth=0,marginheight=0, toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no');
	}
}
function popup2(popup_filename2){
	if (getCookie("nomore2")=="checked"){
	}else{
		window.open(popup_filename2,'event2', 'width=10,height=10, marginwidth=0,marginheight=0, toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no');
	}
}
function popup3(popup_filename3){
	if (getCookie("nomore3")=="checked"){
	}else{
		window.open(popup_filename3,'event3', 'width=10,height=10, marginwidth=0,marginheight=0, toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no');
	}
}

function nomore1() {
   if ( document.form1.popup1.checked ) {
   	//alert("ÀÌ Ã¢À» ´õÀÌ»ó ¿­Áö ¾Ê½À´Ï´Ù.");
	setCookie( "nomore1", "checked" ,"/",1 );
	}
}
function nomore2() {
   if ( document.form1.popup2.checked ) {
   	//alert("ÀÌ Ã¢À» ´õÀÌ»ó ¿­Áö ¾Ê½À´Ï´Ù.");
	setCookie( "nomore2", "checked" ,"/",1 );
	}
}
function nomore3() {
   if ( document.form1.popup3.checked ) {
   	//alert("ÀÌ Ã¢À» ´õÀÌ»ó ¿­Áö ¾Ê½À´Ï´Ù.");
	setCookie( "nomore3", "checked" ,"/",1 );
	}
}

function getCookie(strName){
	var strArg = new String(strName + "=");	
	var nArgLen, nCookieLen, nEnd;
	var i = 0, j;
	nArgLen    = strArg.length;
	nCookieLen = document.cookie.length;
	if(nCookieLen > 0) {
		while(i < nCookieLen) {
			j = i + nArgLen;
			if(document.cookie.substring(i, j) == strArg) {
				nEnd = document.cookie.indexOf (";", j);
				if(nEnd == -1) nEnd = document.cookie.length;
				return unescape(document.cookie.substring(j, nEnd));
			}
			i = document.cookie.indexOf(" ", i) + 1;
			if (i == 0) break;
		}
	} else {
	return("");
	}
}

function setCookie( name,value,path,expires ){
	if(name == "") return ;
	var nowdate = new Date();                       //date°´Ã¼+getDate()´Â ÇöÀçÀÇ »ç°£À» ³ªÅ¸³¿. + 1 ÀÌ¸é 1ÀÏ ÈÄ±îÁö Áö¼Ó.
	nowdate.setDate( nowdate.getDate()+ expires);
	document.cookie = name+"="+escape( value )+"; path="+path+"; expires="+nowdate.toGMTString()+";";
}

function delCookie( name,path ){
	var todayDate = new Date();
	todayDate.setDate( todayDate.getDate()-1 );
	document.cookie = name+"=; path="+path+"; expires="+todayDate.toGMTString()+";";
}

function tick() {
	
  	var month,date,hours, minutes, seconds, ap;
  	var intYear,intDate,intMon,intHours, intMinutes, intSeconds;
  	var today;

  	today = new Date();

  	intYear = today.getYear();  
  	intDate = today.getDate();
  	intMon = today.getMonth()+1;
  	intHours = today.getHours();
  	intMinutes = today.getMinutes();
  	intSeconds = today.getSeconds();

  	month = intMon;

  	if (intDate < 10) {
    date = "0"+intDate;
  } else {
    date = intDate;
  }
  if (intHours == 0) {
   hours = "12:";
   ap = "AM";
  } else if (intHours < 12) { 
   hours = intHours + ":";
   ap = "AM";	 
  } else if (intHours == 12) {
   hours = "12:";
    ap = "PM";
  } else {
  intHours = intHours - 12
   hours = intHours + ": ";
   ap = "PM";
  }

  if (intMinutes < 10) {
    minutes = "0"+intMinutes+":";
  } else {
    minutes = intMinutes+":";
  }

  if (intSeconds < 10) {
    seconds = "0"+intSeconds;
  } else {
    seconds = intSeconds;
  } 
  	
  timestr = intYear + "-" + month +"-"+ date +" "+hours+minutes+seconds;
  timeString =  "<font color='#000000'>" + intYear + "³â" + month +"¿ù" + date +"ÀÏ" + ap + "" +hours+minutes+seconds + "</font>"; 

  Clock.innerHTML = timestr;

  setTimeout("tick();", 100);
}


function MouseMove() {
	if(navigator.appName == 'Netscape') {
    	window.captureEvents(Event.MOUSEMOVE);
    }
    window.setInterval ("MoveImage();", nInterval);
    			//setintval(function, time) time:±â´Ù¸± ½Ã°£(ms 1/1000ÃÊ)
}

function MoveImage() {
	if(navigator.appName == 'Netscape'){
    	x = window.innerWidth + window.pageXOffset - marginX;   //ÇöÀç À©µµ¿¡ ³ªÅ¸³ª´Â ÁÂÃø »ó´ÜÀÇ ÁÂÇ¥°ª
    	y = window.innerHeight + window.pageYOffset - marginY;

        if (window.scrollbars.visible == true) {
        	x -= scrollbarW;
            y -= scrollbarH;
        }
        document.layers["ad"].pageX = x;
        document.layers["ad"].pageY = y;
    }
    else {
        x=document.body.clientWidth-document.all["ad"].style.width-marginX;
        y=document.body.clientHeight-document.all["ad"].style.height-marginY;

        x += document.body.scrollLeft;
        y += document.body.scrollTop;

        document.all["ad"].style.pixelLeft = x;
        document.all["ad"].style.pixelTop = y;
    }
}

//window.onload = MouseMove; °è¼Ó ÇÔ¼ö¸¦ ºÙÀÏ ¼ö ÀÖ°í body³ª ÀÌ°ÍÁß ÇÏ³ª¸¸ »ç¿ëÇÑ´Ù.

// ============================ Menu, Layer °ü·Ã ÇÔ¼ö =============================
function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}

MM_reloadPage(true);
//-->

<!--
function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v4.0
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && document.getElementById) x=document.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

function MM_showHideLayers() { //v3.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; }
}

//====================ÀÔ·Â³­¿¡ Æ¯¼ö¹®ÀÚ/SQL¹®ÀÚ ÀÔ·Â¹æÁö=========================
//Æ¯¼ö¹®ÀÚ³ª SQL ¹®À» ÀÔ·Â³­¿¡ »ðÀÔÇßÀ» °æ¿ì, ±× ÀÔ·Â³­¿¡¼­ ¹þ¾î³ªÁö ¸øÇÏµµ·Ï focus() ±â´ÉÀ» ³Ö¾úÀ¸¹Ç·Î, 
//ÇØ´ç Æû(°Ô½ÃÆÇÀÇ myform) ³»¿¡ ±â´ÉÀ» Ãß°¡ÇÏÁö ¾Ê¾Æµµ µÇµµ·Ï ÇÔ.

function checknum(id) {
var str = document.getElementById(id).value; 
var val="0123456789";
	for(i=0; i < str.length; i++) {
		if(val.indexOf(str.substring(i,i+1))<0) {
		alert("¼ýÀÚ¸¸ Çã¿ëµË´Ï´Ù.");
		document.getElementById(id).focus();
		return false;
		}
	}
}

function checknum_tel(id) {
var str = document.getElementById(id).value; 
var val="0123456789-";
	for(i=0; i < str.length; i++) {
		if(val.indexOf(str.substring(i,i+1))<0) {
		alert("¼ýÀÚ¿Í - ¸¸ Çã¿ëµË´Ï´Ù.");
		document.getElementById(id).focus();
		return false;
		}
	}
}

function checknum2(num) { //name°ªÀ¸·Î Ã¼Å©ÇÏ´Â ±¸¹öÀü.
var val="0123456789";
var string=num;
var len=string.length;
	for(i=0;i<len;i++) {
		if(val.indexOf(string.substring(i,i+1))<0) {
		alert("¼ýÀÚ¸¸ Çã¿ëµË´Ï´Ù.");
		return;
		}
	}
}

function getSpecialChars(id) { //(°ø¹é)(.96¹ø)(,46¹ø)(_ 95¹ø)(-45¹ø) Æ¯¼ö¹®ÀÚ 4 Çã¿ë. ÃÑ 32°³Æ¯¼ö¹®ÀÚ(°ø¹éÁ¦¿Ü)Áß 28°³ Æ¯¼ö¹®ÀÚ »ç¿ë±ÝÁö.
var str = document.getElementById(id).value; 
    for (var i=0; i < str.length; i++) { 
        ch_char = str.charAt(i); 
        ch = ch_char.charCodeAt();
        if( (ch >= 33 && ch <= 43) || (ch == 47) || (ch >= 58 && ch <= 64) || (ch >= 91 && ch <= 94) || (ch >= 123 && ch <= 126) ) { 
            alert("Æ¯¼ö¹®ÀÚ´Â . , _ - ¸¸ »ç¿ëÇÒ ¼ö ÀÖ½À´Ï´Ù.");
			document.getElementById(id).focus();
            return false; 
		} 
	}
}

function getSpecialChars_subject(id) { //(°ø¹é)(.96¹ø)(,46¹ø)(_ 95¹ø)(-45¹ø)(!33¹ø)(?63¹ø)((40¹ø)()41¹ø)([91¹ø)(]93¹ø)(/47¹ø) Æ¯¼ö¹®ÀÚ 11 Çã¿ë. ÃÑ 32°³Æ¯¼ö¹®ÀÚ(°ø¹éÁ¦¿Ü)Áß 21°³ Æ¯¼ö¹®ÀÚ »ç¿ë±ÝÁö.
var str = document.getElementById(id).value; 
    for (var i=0; i < str.length; i++) { 
        ch_char = str.charAt(i); 
        ch = ch_char.charCodeAt();
        if( (ch >= 34 && ch <= 39) || (ch == 42) || (ch == 43) || (ch >= 58 && ch <= 62) || (ch == 64) || (ch == 92) || (ch == 94) || (ch >= 123 && ch <= 126) ) { 
            alert("Æ¯¼ö¹®ÀÚ´Â . , _ - ! ? / ( ) [ ] ¸¸ »ç¿ëÇÒ ¼ö ÀÖ½À´Ï´Ù.");
			document.getElementById(id).focus();
            return false; 
		} 
	}
}

function getSpecialChars_email(id) { //(°ø¹é)(.96¹ø)(_ 95¹ø)(-45¹ø)(@64¹ø) Æ¯¼ö¹®ÀÚ 4 Çã¿ë. ÃÑ 32°³Æ¯¼ö¹®ÀÚ(°ø¹éÁ¦¿Ü)Áß 28°³ Æ¯¼ö¹®ÀÚ »ç¿ë±ÝÁö.
var str = document.getElementById(id).value; 
    for (var i=0; i < str.length; i++) { 
        ch_char = str.charAt(i); 
        ch = ch_char.charCodeAt(); 
        if( (ch >= 33 && ch <= 44) || (ch == 47) || (ch >= 58 && ch <= 63) || (ch >= 91 && ch <= 94) || (ch == 96) || (ch >= 123 && ch <= 126) ) { 
            alert("Æ¯¼ö¹®ÀÚ´Â . _ - @ ¸¸ »ç¿ëÇÒ ¼ö ÀÖ½À´Ï´Ù.");
			document.getElementById(id).focus();
            return false; 
		} 
	}
}

function getSpecialChars_filename(id) { //(°ø¹é)(.96¹ø)(_ 95¹ø)(-45¹ø)(:58¹ø) Æ¯¼ö¹®ÀÚ 4 Çã¿ë. ÃÑ 32°³Æ¯¼ö¹®ÀÚ(°ø¹éÁ¦¿Ü)Áß 28°³ Æ¯¼ö¹®ÀÚ »ç¿ë±ÝÁö.
var str = document.getElementById(id).value; 
    for (var i=0; i < str.length; i++) { 
        ch_char = str.charAt(i); 
        ch = ch_char.charCodeAt(); 
        if( (ch >= 33 && ch <= 44) || (ch == 47) || (ch >= 59 && ch <= 64) || (ch >= 91 && ch <= 94) || (ch == 96) || (ch >= 123 && ch <= 126) ) { 
            alert("Æ¯¼ö¹®ÀÚ´Â . _ - : ¸¸ »ç¿ëÇÒ ¼ö ÀÖ½À´Ï´Ù.");
			document.getElementById(id).focus();
            return false; 
		} 
	}
}

function getSpecialChars_link(id) { //(°ø¹é)(.96¹ø)(_ 95¹ø)(-45¹ø)(:58¹ø)(/47¹ø)(?63¹ø)(&38¹ø)(~126¹ø)  Æ¯¼ö¹®ÀÚ 8 Çã¿ë. ÃÑ 32°³Æ¯¼ö¹®ÀÚ(°ø¹éÁ¦¿Ü)Áß 24°³ Æ¯¼ö¹®ÀÚ »ç¿ë±ÝÁö.
var str = document.getElementById(id).value; 
    for (var i=0; i < str.length; i++) { 
        ch_char = str.charAt(i); 
        ch = ch_char.charCodeAt(); 
        if( (ch >= 33 && ch <= 37) || (ch >= 39 && ch <= 44) || (ch >= 59 && ch <= 62) || (ch == 64) || (ch >= 91 && ch <= 94) || (ch == 96) || (ch >= 123 && ch <= 125) ) { 
            alert("Æ¯¼ö¹®ÀÚ´Â . _ - : / ? & ~ ¸¸ »ç¿ëÇÒ ¼ö ÀÖ½À´Ï´Ù.");
			//document.getElementById(id).focus();
            return false; 
		} 
	}
}

function getSpecialChars_color(id) { //(°ø¹é)(#35¹ø)  Æ¯¼ö¹®ÀÚ 1 Çã¿ë. ÃÑ 32°³Æ¯¼ö¹®ÀÚ(°ø¹éÁ¦¿Ü)Áß 31°³ Æ¯¼ö¹®ÀÚ »ç¿ë±ÝÁö.
var str = document.getElementById(id).value; 
    for (var i=0; i < str.length; i++) { 
        ch_char = str.charAt(i); 
        ch = ch_char.charCodeAt(); 
        if( (ch >= 33 && ch <= 34) || (ch >= 36 && ch <= 47) || (ch >= 58 && ch <= 64) || (ch >= 91 && ch <= 96) || (ch >= 123 && ch <= 126) ) { 
            alert("Æ¯¼ö¹®ÀÚ´Â # ¸¸ »ç¿ëÇÒ ¼ö ÀÖ½À´Ï´Ù.");
			document.getElementById(id).focus();
            return false; 
		} 
	}
}

function getSpecialChars_query(id) { //(#35)($36)(/47)(:58)(;59)(?63)(@64)([91)(]93)(^94)(`96)({123) (}125)(~126¹ø) ºÒÇã¿ë. ÃÑ 32°³ Æ¯¼ö¹®ÀÚÁß 18 Çã¿ë, 14°³ »ç¿ë±ÝÁö.
var str = document.getElementById(id).value; 
    for (var i=0; i < str.length; i++) { 
        ch_char = str.charAt(i); 
        ch = ch_char.charCodeAt();
        if( (ch == 35) || (ch == 36) || (ch == 47) || (ch == 58) || (ch == 59) || (ch == 63) || (ch == 64) || (ch == 91) || (ch == 93) || (ch == 94) || (ch == 96) || (ch == 123) || (ch == 125) || (ch == 126) ) { 
            alert("ÁúÀÇ¹®¿¡¼­ Æ¯¼ö¹®ÀÚ # $ : ; ? @ / ^ [ ] ` { } ~ ´Â »ç¿ëÇÒ ¼ö ¾ø½À´Ï´Ù.");  // ^, / ´Â ÃßÈÄ °ËÅä.2011-03-18
			document.getElementById(id).focus();
            return false; 
		} 
	}
}

function getSpecialChars_bankbook(id) { //(°ø¹é)((40¹ø)()41¹ø)(-45¹ø)(/47¹ø)(:58¹ø) Æ¯¼ö¹®ÀÚ 5 Çã¿ë. ÃÑ 32°³Æ¯¼ö¹®ÀÚ(°ø¹éÁ¦¿Ü)Áß 27°³ Æ¯¼ö¹®ÀÚ »ç¿ë±ÝÁö.
var str = document.getElementById(id).value; 
    for (var i=0; i < str.length; i++) { 
        ch_char = str.charAt(i); 
        ch = ch_char.charCodeAt();
        if( (ch >= 33 && ch <= 39) || (ch >= 42 && ch <= 44) || (ch == 46) || (ch >= 59 && ch <= 64) || (ch >= 91 && ch <= 96) || (ch >= 123 && ch <= 126) ) { 
            alert("Æ¯¼ö¹®ÀÚ´Â : - ( ) / ¸¸ »ç¿ëÇÒ ¼ö ÀÖ½À´Ï´Ù.");
			document.getElementById(id).focus();
            return false; 
		} 
	}
}

//function getSpecialChars_tel(id) {} Àº À§ÀÇ function checknum_tel(id) ·Î ´ë½ÅÇÔ.

function getSqlChars(id) {
var str2 = document.getElementById(id).value; 
	if(str2.match(/select|union|insert|update|delete|drop|--/i)) {
		alert("SQL¹® ¶Ç´Â -- À» »ç¿ëÇÒ ¼ö ¾ø½À´Ï´Ù."); 
		document.getElementById(id).focus();
        return false; 
	}
}

function getSqlChars_query(id) {
var str2 = document.getElementById(id).value; 
	if(str2.match(/union|insert|update|delete|drop|--/i)) {
		alert("select ÀÌ¿ÜÀÇ SQL¹® ¶Ç´Â -- À» »ç¿ëÇÒ ¼ö ¾ø½À´Ï´Ù."); 
		document.getElementById(id).focus();
        return false; 
	}
}

// ============================ Font °ü·Ã ÇÔ¼ö =============================
		
	var article_fontSize = parseInt(getCookie("article_fontSize")); 		


	function initFont() { 

		if ( (article_fontSize < 10) || (article_fontSize > 18) || (isNaN(article_fontSize) == true)) {
			article_fontSize = 9;	
		}

		setFont(article_fontSize);
	}
	
	function setFont(article_fontSize) { 		
		document.getElementById("articleBody").style.fontSize = article_fontSize+"pt";
		setFontCookie(article_fontSize);
	}	
	
	function setFontCookie(article_fontSize)
	{
		var expiry = new Date();
		var path = "/";
		var domain = ".joins.com";
		var secure = "";


		expiry.setTime(expiry.getTime() + 90 * (24 * 60 * 60 * 1000));

		setCookie("article_fontSize",article_fontSize,expiry,path,domain,secure);
	}	
	
	function fontPlus() {		
		if (article_fontSize < 17) {
			article_fontSize = article_fontSize + 1; 
			setFont(article_fontSize); 
		}
	}

	function fontMinus() {
		if (article_fontSize > 9) {
			article_fontSize = article_fontSize - 1; 
			setFont(article_fontSize); 
		}
	}	
// ============================ Font °ü·Ã ÇÔ¼ö ³¡=============================


