function gothere(){
	var thebox=document.all
	newwindow=window.open("")
	newwindow.location=thebox.example.options[thebox.example.selectedIndex].value
}

function showHide(fieldName1, fieldName2) {
	var selField1;
	
	selField1 = eval(document.getElementById(fieldName1));
	selField2 = eval(document.getElementById(fieldName2));
	
	selField1.style.display = "inline";
	selField2.style.display = "none";
}

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_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}


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_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_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 printShow(url){
   var print_win = window.open(url, "print", "status=no,toolbar=no,scrollbars=no,resizable=no,menubar=no,width=10,height=10");
   print_win.print();
   print_win.blur();
}

		
function swf(src,w,h){
	html = '';
	html += '<object type="application/x-shockwave-flash" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" id="param" width="'+w+'" height="'+h+'">';
	html += '<param name="movie" value="'+src+'">';
	html += '<param name="quality" value="high">';
	html += '<param name="bgcolor" value="#ffffff">';
	html += '<param name="menu" value="false">';
	html += '<param name="wmode" value="transparent">';
	html += '<param name="swliveconnect" value="true">';
	html += '<embed src="'+src+'" quality=high bgcolor="#ffffff" menu="false" width="'+w+'" height="'+h+'" swliveconnect="true" id="param" name="param" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer"><\/embed>';
	html += '<\/object>';
	document.write(html);
}

//Ì¹
function ImgPopup(img2){

	poto= new Image();
	poto.src=(img2);
	Controlla(img2);
}
function Controlla(img2){
	if((poto.width!=0)&&(poto.height!=0)){
		winopen(img2,poto.width,poto.height);
	}else{
		funzione="Controlla('"+img2+"')";
		intervallo=setTimeout(funzione,20);
	}
}
function winopen(img_view, Width, Height) {
	var winHandle = window.open("" ,"windowName","toolbar=no,scrollbars=no,resizable=no, top=200, left=200 ,width=" + Width + ",height=" + Height)
		if(winHandle != null) {
		var htmlString = "<html><head><title>Ì¹</title></head>" 
			htmlString += "<body leftmargin=0 topmargin=0 marginwidth=0 marginheight=0>"
			htmlString += "<a href=javascript:window.close()><img src=" + img_view + " border=0 alt=Ì¹Å¬:È­Ý±></a>"
			htmlString += "</body></html>"
			winHandle.document.open()
			winHandle.document.write(htmlString)
			winHandle.document.close()
		} 
		if(winHandle != null) winHandle.focus()
			return winHandle
}

function isInserted(msg) {
	
	if(arguments.length > 1) {

		for(i=1; i<arguments.length; i++) {	
			if(arguments[i] && arguments[i].value.replace(/ /g, '') == '') {
				if(msg != '') {
					alert(msg + ' ÀÔ·ÂÇÏ¼¼¿ä');
				}

				arguments[i].focus();
				return false;
			}
		}
	}
	return true;
}

function gotoLogin(flag) {
	if (flag) {
		alert("·Î±×ÀÎ ÈÄ ÀÌ¿ëÇÏ½Ç ¼ö ÀÖ½À´Ï´Ù.");
	}
	location = "/me/me_01.asp";
}
//±¤°í¹®ÀÇ ÆË¾÷
function adPop(){
		window.open("/fox/info/ad_pop.asp","adpop","width=600,height=450")
	}


//ÆÐ¹Ð¸®»çÀÌÆ®
function goto_new(sVal) {
		var windowprops = "";
        if (sVal != "" && sVal != null){
		    popup = window.open(sVal,'',windowprops);
		    popup.focus();
		}
}
//Áñ°ÜÃ£±â
function addbookmark()
{
bookmarkurl="http://www.foxchannel.co.kr" // Áñ°ÜÃ£±â¿¡ Ãß°¡ÇÒ °÷ ÀÇ URL
bookmarktitle="¹ÌµåÀÇ º»ÁÂ-FOXÃ¤³Î" // »çÀÌÆ®¸í
if (document.all)
window.external.AddFavorite(bookmarkurl,bookmarktitle)
}


/*------------------------------------------------------------------------------
	ÄíÅ° °ü·Ã ÇÔ¼ö
------------------------------------------------------------------------------*/

/**
 * ÄíÅ° ¾²±â
 *
 * @param name		ÄíÅ°¸í
 * @param value		ÄíÅ°°ª
 * @param expiredays	¸¸·áÀÏ
 */
function setCookie( name, value, expiredays )
{
	var todayDate = new Date();
	todayDate.setDate( todayDate.getDate() + expiredays );
	document.cookie = name + "=" + escape( value ) + "; path=/; expires=" + todayDate.toGMTString() + ";"
	
}

/**
 * ÄíÅ° ÀÐ±â
 *
 * @param name		ÄíÅ°¸í
 * @return string	ÄíÅ°°ª
 */
function getCookie( name )
{
	var nameOfCookie = name + "=";
	var x = 0;
	while ( x <= document.cookie.length )
	{
		var y = (x+nameOfCookie.length);
		if ( document.cookie.substring( x, y ) == nameOfCookie )
		{
			if ( (endOfCookie=document.cookie.indexOf( ";", y )) == -1 )
				endOfCookie = document.cookie.length;
			return unescape( document.cookie.substring( y, endOfCookie ) );
		}
		x = document.cookie.indexOf( " ", x ) + 1;
		if ( x == 0 ) break;
		
	}
	return "";
}
//function getCookie( name )
//{
//	var nameOfCookie = name + "=";
//	var x = 0;
//	while ( x <= document.cookie.length )
//	{
//		var y = (x+nameOfCookie.length);
//		if ( document.cookie.substring( x, y ) == nameOfCookie )
//		{
//			if ( (endOfCookie=document.cookie.indexOf( ";", y )) == -1 )
//				endOfCookie = document.cookie.length;
//			return unescape( document.cookie.substring( y, endOfCookie ) );
//		}
//		x = document.cookie.indexOf( " ", x ) + 1;
//		if ( x == 0 ) break;
//	}
//	return "";
//}

function deleteCookie(cookieName)
 {
  var expireDate = new Date();
  
  //¾îÁ¦ ³¯Â¥¸¦ ÄíÅ° ¼Ò¸ê ³¯Â¥·Î ¼³Á¤ÇÑ´Ù.
  expireDate.setDate( expireDate.getDate() - 1 );

  document.cookie = cookieName + "= " + "; expires=" + expireDate.toGMTString() + "; path=/";
 }



 /*  Function Equivalent to java.net.URLEncoder.encode(String, "UTF-8")
     Copyright (C) 2002, Cresc Corp.
     Version: 1.0
 */
function encodeURL(str){
     var s0, i, s, u;
     s0 = "";                // encoded str
     for (i = 0; i < str.length; i++){   // scan the source
         s = str.charAt(i);
         u = str.charCodeAt(i);          // get unicode of the char
         if (s == " "){s0 += "+";}       // SP should be converted to "+"
         else {
             if ( u == 0x2a || u == 0x2d || u == 0x2e || u == 0x5f || ((u >= 0x30) && (u <= 0x39)) || ((u >= 0x41) && (u <= 0x5a)) || ((u >= 0x61) && (u <= 0x7a))){       // check for escape
                 s0 = s0 + s;            // don't escape
             }
             else {                  // escape
                 if ((u >= 0x0) && (u <= 0x7f)){     // single byte format
                     s = "0"+u.toString(16);
                     s0 += "%"+ s.substr(s.length-2);
                 }
                 else if (u > 0x1fffff){     // quaternary byte format (extended)
                     s0 += "%" + (oxf0 + ((u & 0x1c0000) >> 18)).toString(16);
                     s0 += "%" + (0x80 + ((u & 0x3f000) >> 12)).toString(16);
                     s0 += "%" + (0x80 + ((u & 0xfc0) >> 6)).toString(16);
                     s0 += "%" + (0x80 + (u & 0x3f)).toString(16);
                 }
                 else if (u > 0x7ff){        // triple byte format
                     s0 += "%" + (0xe0 + ((u & 0xf000) >> 12)).toString(16);
                     s0 += "%" + (0x80 + ((u & 0xfc0) >> 6)).toString(16);
                     s0 += "%" + (0x80 + (u & 0x3f)).toString(16);
                 }
                 else {                      // double byte format
                     s0 += "%" + (0xc0 + ((u & 0x7c0) >> 6)).toString(16);
                     s0 += "%" + (0x80 + (u & 0x3f)).toString(16);
                 }
             }
         }
     }
     return s0;
 }
 
 /*  Function Equivalent to java.net.URLDecoder.decode(String, "UTF-8")
     Copyright (C) 2002, Cresc Corp.
     Version: 1.0
 */
 function decodeURL(str){
     var s0, i, j, s, ss, u, n, f;
     s0 = "";                // decoded str
     for (i = 0; i < str.length; i++){   // scan the source str
         s = str.charAt(i);
         if (s == "+"){s0 += " ";}       // "+" should be changed to SP
         else {
             if (s != "%"){s0 += s;}     // add an unescaped char
             else{               // escape sequence decoding
                 u = 0;          // unicode of the character
                 f = 1;          // escape flag, zero means end of this sequence
                 while (true) {
                     ss = "";        // local str to parse as int
                         for (j = 0; j < 2; j++ ) {  // get two maximum hex characters for parse
                             sss = str.charAt(++i);
                             if (((sss >= "0") && (sss <= "9")) || ((sss >= "a") && (sss <= "f"))  || ((sss >= "A") && (sss <= "F"))) {
                                 ss += sss;      // if hex, add the hex character
                             } else {--i; break;}    // not a hex char., exit the loop
                         }
                     n = parseInt(ss, 16);           // parse the hex str as byte
                     if (n <= 0x7f){u = n; f = 1;}   // single byte format
                     if ((n >= 0xc0) && (n <= 0xdf)){u = n & 0x1f; f = 2;}   // double byte format
                     if ((n >= 0xe0) && (n <= 0xef)){u = n & 0x0f; f = 3;}   // triple byte format
                     if ((n >= 0xf0) && (n <= 0xf7)){u = n & 0x07; f = 4;}   // quaternary byte format (extended)
                     if ((n >= 0x80) && (n <= 0xbf)){u = (u << 6) + (n & 0x3f); --f;}         // not a first, shift and add 6 lower bits
                     if (f <= 1){break;}         // end of the utf byte sequence
                     if (str.charAt(i + 1) == "%"){ i++ ;}                   // test for the next shift byte
                     else {break;}                   // abnormal, format error
                 }
             s0 += String.fromCharCode(u);           // add the escaped character
             }
         }
     }
     return s0;
 }
//copy Content
function _copyContent(){
	var obj = document.getElementById("copyContent");

	if (obj != null)
	{
		window.clipboardData.setData('Text' , obj.innerHTML);
		alert('½ºÅ©·¦ ÇÏ¿´½À´Ï´Ù.');
	}
	else alert('½ºÅ©·¦ÇÒ ÄÁÅÙÃ÷°¡ ¾ø½À´Ï´Ù.');

	
}

