// ½ºÅ©·Ñ ÀÖ´Â ÆË¾÷Ã¢
function popupscrollyes(sUrl,nWidth,nHeight,sPopName){
	var option = "toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no,width="+nWidth+",height="+nHeight;
	PopWin = window.open(sUrl,sPopName, option);
}

// ½ºÅ©·Ñ ¾ø´Â ÆË¾÷Ã¢
function popupscrollno(sUrl,nWidth,nHeight,sPopName){
	var todayDate = new Date();
	var option = "toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,width="+nWidth+",height="+nHeight;
	PopWin = window.open(sUrl,sPopName, option);
}

// ÄíÅ°°ª °¡Á®¿À±â
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 "";
}

/* ¸ð´Þ¸®½º·Î ÆË¾÷ */
/* type = 0 ±×³É¿ÀÇÂ, 1 ÀÌ¸é ¸ð´Þ¿ÀÇÂ */
function MoDalOpen(url,windowname,width,height,type)
{
	var strUrl = url;
	var strWidth = width;
	var strHeight = height;

	if ( type == '0'){
		var strStatus = "Width="+strWidth+"px; Height="+strHeight+"px; scroll=no; status=no; help=no; "
		window.open(url, windowname, strStatus);
	}

	if( type == '1' ){
		var strStatus = "dialogWidth="+strWidth+"px; dialogHeight="+strHeight+"px; scroll=no; status=no; help=no; "	
		window.showModalDialog(url,  window, strStatus);
	}
}


// ¿øº»ÀÌ¹ÌÁö º¸±â
function news_pop(imagesrc)
{
	var popimage = window.open("",'ÀÌ¹ÌÁöº¸±â','scrollbars=yes,status=no,toolbar=no,resizable=1,location=no,menu=no,width=10,height=10'); 
	popimage.focus(); 
	popimage.document.open(); 
	popimage.document.write("<html><head><title>ÀÌ¹ÌÁöº¸±â</title></head>"); 
	popimage.document.write("<sc"+"ript>\n"); 
	popimage.document.write("function resize() {\n"); 
	popimage.document.write("pic = document.popimg;\n"); 
	popimage.document.write("if (eval(pic).height) { nHeight = eval(pic).height + 32; nWidth = eval(pic).width+9; \n"); 
	popimage.document.write("  clearTimeout();\n"); 
	popimage.document.write("  self.resizeTo(nWidth, nHeight);\n"); 
	popimage.document.write("}else setTimeOut(resize(), 100);}\n"); 
	popimage.document.write("</sc"+"ript>\n"); 

	popimage.document.write('<body topmargin="0" leftmargin="0" marginheight="0" marginwidth="0" bgcolor="#FFFFFF">\n'); 
	popimage.document.write("<img border=0 onclick='self.close()' src="+imagesrc+" xwidth=100 xheight=9 name=popimg onload='resize();' style='cursor:hand'></a>\n"); 
	popimage.document.write("</body></html>\n"); 
}	

/********************************
* IE ÆÐÄ¡¿ë - ·Îµù °É¸²
********************************/
function SetEmbed() 
{ 
	var strName = new String;
	var strUrl = new String;
	var strWidth = new String;
	var strHeight = new String;
	var strAddParameter = new String;
	var strAddParam = new String;
	var strHtml = new String;

	// ÃÊ±â ¼ÂÆÃ
	this.init = function(n, s, w, h){
		strName = n;
		strUrl = s; 
		strWidth = w; 
		strHeight = h; 

		strHtml = "<object ";
		strHtml += " ID='"+strName+"' >";
	}

	this.addParam = function(strParamName, strParamValue){
		strAddParam += "<param name='"+strParamName +"' value='"+ strParamValue + "'>";
	}

	this.addParameter = function(strParameterName, strParameterValue){
		strAddParameter += " " +strParameterName+"='"+ strParameterValue + "' ";
	}

	this.show = function() { 
		strHtml += strAddParam; 
		strHtml += "<embed src='" + strUrl + "' width='"+ strWidth + "' height='"+ strHeight +"' " +strAddParameter+"  ></embed></object>"; 
		document.write( strHtml );  
	}
} 


/********************************
* IE ÆÐÄ¡¿ë - ¾ÆÁÖ °£´ÜÇÏ°Ô 
********************************/
function ShowActive(s) 
{ 
	document.write(s);  
} 

// ÆÒ»çÀÌÆ® ¹Ù·Î°¡±â »çÀÌÁî Á¶Á¤
function fan_flash_resize(c){
	if(c == "0"){
		document.all["right_fan_div"].style.height = 38;
	}
	if(c == "1"){
		document.all["right_fan_div"].style.height = 305;
	}
}

// ¿À¸¥ÂÊ ÆÒ½ÎÀÌÆ® ¹Ù·Î°¡±â
function ShowFanMenu(){
var _Img = "http://www.mud4u.com/images/basic/flash/fan.swf";

var	msg = '<div id="right_fan_div" style="position:absolute;height:38;OVERFLOW:hidden" >';
	msg += '<Object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" ';
	msg += 'codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" ';
	msg += 'ID=right_fan WIDTH=160 HEIGHT=300>';
	msg += '<PARAM NAME=movie VALUE="'+_Img+'">';
	msg += '<PARAM NAME=quality VALUE=high>';
	msg += '<param name=wmode value=transparent>';
	msg += '<EMBED src="'+_Img+' quality=high ID=right_fan ';
	msg += 'WIDTH=160 HEIGHT=300 TYPE="application/x-shockwave-flash" ';
	msg += 'PLUGINSPAGE="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash">';
	msg += '</EMBED>';
	msg += '</OBJECT>';
	msg += '</div>';
	document.write(msg);
}

/********************************
* TI ¹è³Ê JS ÇÔ¼ö
********************************/

// Hook for Internet Explorer.

function orange1 () {
	document.all["FloatLayer1"].style.visibility="hidden";
	document.all["FloatLayer2"].style.visibility="visible";
}

function orange2 () {
	document.all["FloatLayer1"].style.visibility="visible";
	document.all["FloatLayer2"].style.visibility="hidden";
}

function hidelayer()
{
	hideLayer();
}

function hideLayer(){
	showLayer = false;
	document.all["lLayer"].style.visibility="hidden";
}

function ti_banner_view(intSeq,intMain,intTrans,intSmall,strUrl1,strUrl2,intWidth1,intHeight1,intWidth2,intHeight2,intCookie){

	// ÄíÅ°°¡ ¾øÀ»°Ü¿ì¿¡¸¸
	if ( getCookie(intSeq) != "done" ) {
		
		// ÀÓÇÁ·¹ÀÌ¼Ç ÃøÁ¤
		document.getElementById("ad_imp_layer").src = "http://imp.mud4u.com/ad_implation.asp?i&"+intMain;
		setCookieMin( intSeq , "done", intCookie, "mud4u.com");

		// ¸®¸¶ÀÎ´õ°¡ ÀÖÀ»°æ¿ì
		if(intSmall == "1"){

			var _Img = new Array( strUrl1,	strUrl2 );
			var _Width  = new Array( intWidth1 , intWidth2);     
			var _Height = new Array( intHeight1, intHeight2);      
			var _DivID  = new Array( "FloatLayer1", "FloatLayer2");
			var _View    = new Array("visible","hidden");
			var _ID       = new Array( "fx_ad", "moneta_button" );

			// Max
			i = 0
			if(intMain == 11374){
			msg = '<div id="'+_DivID[i]+'" style="visibility:'+_View[i]+';"><div style="position:relative; top:-40px;right:-260px; ">';
			}else{
			msg = '<div id="'+_DivID[i]+'" style="visibility:'+_View[i]+';"><div style="position:relative; top:0px;right:-100px; ">';
			}
			msg += '<Object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" ';
			msg += 'codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" ';
			msg += 'ID='+_ID[i]+' WIDTH='+_Width[i]+' HEIGHT='+_Height[i]+'>';
			msg += '<PARAM NAME=movie VALUE="'+_Img[i]+'">';
			msg += '<PARAM NAME=quality VALUE=high>';
			if(intTrans == "1") { // Åõ¸íÀÏ°æ¿ì
			msg += '<param name=wmode value=transparent>';
			}
			msg += '<param name="allowScriptAccess" value="always" />';
			msg += '<EMBED src="'+_Img[i]+' quality=high ';
			msg += 'WIDTH='+_Width[i]+' HEIGHT='+_Height[i]+' ';
			msg += 'allowScriptAccess="always"  type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer">';
			msg += '</EMBED>';
			msg += '</OBJECT>';
			msg += '</div></div>';
			document.write(msg);





			// Min
			i = 1
			if(intMain == 11265){
			msg = '<div id="'+_DivID[i]+'"  style="visibility:'+_View[i]+';"><div style="position:relative; top:-30px;left:500px;">';
			}else{
			msg = '<div id="'+_DivID[i]+'"  style="visibility:'+_View[i]+';"><div style="position:relative; top:0px;left:500px;">';
			}
			msg += '<Object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" ';
			msg += 'codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" ';
			msg += 'ID='+_ID[i]+' WIDTH='+_Width[i]+' HEIGHT='+_Height[i]+'>';
			msg += '<PARAM NAME=movie VALUE="'+_Img[i]+'">';
			msg += '<PARAM NAME=quality VALUE=high>';
			if(intTrans == "1") { // Åõ¸íÀÏ°æ¿ì
			msg += '<param name=wmode value=transparent>';
			}
			msg += '<EMBED src="'+_Img[i]+' quality=high ';
			msg += 'WIDTH='+_Width[i]+' HEIGHT='+_Height[i]+' TYPE="application/x-shockwave-flash" ';
			msg += 'PLUGINSPAGE="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash">';
			msg += '</EMBED>';
			msg += '</OBJECT>';
			msg += '</div></div>';
			document.write(msg);

		}else{

			if (intMain == '11258')
			{
				msg = '<DIV ID="lLayer" STYLE="position:absolute; left:expression((document.body.clientWidth/2)-300); top:200px; z-index:100;display:show;">';
			}else{
				msg = '<DIV ID="lLayer" STYLE="position:absolute; left:expression((document.body.clientWidth/2)-300); top:298px; z-index:100;display:show;">';
			}
			msg += '<Object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" ';
			msg += 'codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" ';
			msg += 'ID="lFlash" WIDTH='+intWidth1+' HEIGHT='+intHeight1+'>';
			msg += '<PARAM NAME=movie VALUE='+strUrl1+'>';
			msg += '<PARAM NAME=quality VALUE=high>';
			if(intTrans == "1") { // Åõ¸íÀÏ°æ¿ì
			msg += '<param name=wmode value=transparent>';
			}
			msg += '<EMBED src='+strUrl1+' quality=high ';
			msg += 'WIDTH='+intWidth1+' HEIGHT='+intHeight1+' TYPE="application/x-shockwave-flash" ';
			msg += 'PLUGINSPAGE="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash">';
			msg += '</EMBED>';
			msg += '</OBJECT>';
			msg += '</div>';
			document.write(msg);
		}
	}
}


// FC_Command
if (navigator.appName && navigator.appName.indexOf("Microsoft") != -1 && navigator.userAgent.indexOf("Windows") != -1 && navigator.userAgent.indexOf("Windows 3.1") == -1) {
	document.write('<script language=\"VBScript\"\>\n');
	document.write('On Error Resume Next\n');
	document.write('Sub fx_ad_FSCommand(ByVal command, ByVal args)\n');
	document.write('	Call orange1()\n');
	document.write('End Sub\n');
	document.write('Sub moneta_button_FSCommand(ByVal command, ByVal args)\n');
	document.write('	Call orange2()\n');
	document.write('End Sub\n');
	document.write('Sub lFlash_FSCommand(ByVal command, ByVal args)\n');
	document.write('	Call hideLayer()\n');
	document.write('End Sub\n');
	document.write('Sub right_fan_FSCommand(ByVal command, ByVal args)\n');
	document.write('	Call fan_flash_resize(command)\n');
	document.write('End Sub\n');
	document.write('</script\>\n');
}