/**** ºí·¯ ****/
var myAnchors=document.all.tags("A");
function allBlur() {for (i=0;i<myAnchors.length;i++) {myAnchors[i].onfocus=new Function("myAnchors["+i+"].blur()");}}


/**** ÀÌ¹ÌÁö·Ñ¿À¹ö ****/
function mouseoverimg(id,imgsrc) {

  var i,j=0,x,a=mouseoverimg.arguments; document.MM_sr=new Array; 
  
  for(i=0;i<(a.length-1);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+1];}

 
}


/**** ·¹ÀÌ¾î ****/
<!--
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_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_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; }
}
//-->


/**** ¸ÞÀÎÅÇ ****/
	function DisplayMenu(index) {
		if (index == 1) {
			menu1.style.display = "";
			menu2.style.display = "none";
			menu3.style.display = "none";
			menu4.style.display = "none";
			menu5.style.display = "none";
			menu6.style.display = "none";
		} else if(index == 2) {
			menu1.style.display = "none";
			menu2.style.display = "";
			menu3.style.display = "none";
			menu4.style.display = "none";
			menu5.style.display = "none";
			menu6.style.display = "none";
		} else if(index == 3) {
			menu1.style.display = "none";
			menu2.style.display = "none";
			menu3.style.display = "";
			menu4.style.display = "none";
			menu5.style.display = "none";
			menu6.style.display = "none";
		} else if(index == 4) {
			menu1.style.display = "none";
			menu2.style.display = "none";
			menu3.style.display = "none";
			menu4.style.display = "";
			menu5.style.display = "none";
			menu6.style.display = "none";
		} else if(index == 5) {
			menu1.style.display = "none";
			menu2.style.display = "none";
			menu3.style.display = "none";
			menu4.style.display = "none";
			menu5.style.display = "";
			menu6.style.display = "none";

		} else {
			menu1.style.display = "none";
			menu2.style.display = "none";
			menu3.style.display = "none";
			menu4.style.display = "none";
			menu5.style.display = "none";
			menu6.style.display = "";
		}
	}
	

/**** ÅÇ2 ****/
	function DisplayMenu2(index) {
		if (index == 1) {
			menu1.style.display = "";
			menu2.style.display = "none";
		} else {
			menu1.style.display = "none";
			menu2.style.display = "";
		}
	}
	

/**** ÅÇ3 ****/
	function DisplayMenu3(index) {
		if (index == 1) {
			menu1.style.display = "";
			menu2.style.display = "none";
			menu3.style.display = "none";
		} else if(index == 2) {
			menu1.style.display = "none";
			menu2.style.display = "";
			menu3.style.display = "none";
		} else {
			menu1.style.display = "none";
			menu2.style.display = "none";
			menu3.style.display = "";
		}
	}
	
/**** ÅÇ4 ****/
function DisplayMenu4(index) {
		if (index == 1) {
			menu1.style.display = "";
			menu2.style.display = "none";
			menu3.style.display = "none";
			menu4.style.display = "none";
			menu5.style.display = "none";
			menu6.style.display = "none";
		} else if(index == 2) {
			menu1.style.display = "none";
			menu2.style.display = "";
			menu3.style.display = "none";
			menu4.style.display = "none";
			menu5.style.display = "none";
			menu6.style.display = "none";
		} else if(index == 3) {
			menu1.style.display = "none";
			menu2.style.display = "none";
			menu3.style.display = "";
			menu4.style.display = "none";
			menu5.style.display = "none";
			menu6.style.display = "none";
		} else if(index == 4) {
			menu1.style.display = "none";
			menu2.style.display = "none";
			menu3.style.display = "none";
			menu4.style.display = "";
			menu5.style.display = "none";
			menu6.style.display = "none";
		} else if(index == 5) {
			menu1.style.display = "none";
			menu2.style.display = "none";
			menu3.style.display = "none";
			menu4.style.display = "none";
			menu5.style.display = "";
			menu6.style.display = "none";
		}else {
			menu1.style.display = "none";
			menu2.style.display = "none";
			menu3.style.display = "none";
			menu4.style.display = "none";
			menu5.style.display = "none";
			menu6.style.display = "";
		}
	}



/**** º£½ºÆ® ****/
var old='';

function menu(name)
{

	submenu=document.getElementById('submenu_'+name).style;
	//submenu=document.all['submenu_'+name].style;
	if(old!=submenu)
	{
		if(old!='')
		{
			old.display='none';
		}
		submenu.display='block';
		old=submenu;
	}
	else
	{
		submenu.display='none';
		old='';
	}
}


/*** »ó¼¼ ÆäÀÌÁö ÀÌµ¿ ***/
function DetailView(code,bigcode,smallcode){

	if(smallcode == null)
	{
		smallcode = "";
	}

	if (bigcode == "mb001"){			// ÀÏ¹Ý¿µÈ­
		document.location.href="/movie/view.jsp?code=" + code + "&smallcode=" + smallcode;
	
	}else if (bigcode == "mb002"){		// ¹«·á°ü
		document.location.href="/movie/view_freemovie.jsp?code=" + code + "&smallcode=" + smallcode;
	
	}else if (bigcode == "mb003"){		// ¼ºÀÎ°ü
		document.location.href="/adult/view_ero.jsp?code=" + code + "&smallcode=" + smallcode;
	
	}else if (bigcode == "mb005"){		// Æ¯º°°ü
		document.location.href="/movie/view_special.jsp?code=" + code + "&smallcode=" + smallcode;
	
	}else if (bigcode == "mb007"){		// ÆÐ¼ÇTV
		document.location.href="/fashionTV/view.jsp?code=" + code + "&smallcode=" + smallcode;
	}else if (bigcode == "mb005"){		// ÇÁ¸®¹Ì¾ö°ü
		document.location.href="/movie/view_series_special.jsp?code=" + code;
	
	}		
}

function DetailView_series(menucode,pagecode,code){
	document.location.href="/movie/view_series.jsp?MENU_CODE=" + menucode + "&page_gb=" + pagecode + "&code=" + code;
	
}


function openSpeedTest(){
	window.open("http://www.cinewel.com/movie/speed_test.jsp","speed","width=600,height=400,toolbar=no,hotkeys=no");
}

/*** Select 2D ***/
var UserAgent = navigator.userAgent;
var AppVersion = (((navigator.appVersion.split('; '))[1].split(' '))[1]);

var SL_ActiveIDX = null;
var SL_Focused = null;
var SL_FocusedIDX = null;
var SL_Table = " cellspacing=0 cellpadding=0 border=0";
var SL_Text = "text-indent:2px;padding-top:1px;";
var SL_IPrefix = "http://image.cinewel.com/";
var SL_IPrefix2 = "http://image.cinewel.com/";
var SL_AImage = "arrow.gif";
var SL_BImage = "blank.gif";
var SL_SBLen = 15;
var SL_SBWidth = 18;


//////////////////////////////////////////////////////////////////////////// top.jsp¿¡¼­ Á¦¾î
// default NSelect style

var SL_ScrollBar = ""
    +"scrollbar-face-color:#ffffff;"
    +"scrollbar-shadow-color:1D3D66;"
    +"scrollbar-highlight-color:#E8E8E8;"
    +"scrollbar-3dlight-color:#1D3D66;"
    +"scrollbar-darkshadow-color:#EEEEEE;"
    +"scrollbar-track-color:#1D3D66;"
    +"scrollbar-arrow-color:#E8E8E8;";

var SL_BGColor = "#FEFFCB";
var SL_BGColor_M = "#225688";
var SL_Border = "0px solid #AFB086";
var SL_FontSize = "10pt";
var SL_FontColor = "#000000";
var SL_Height = "16px";

///////////////////////////////////////////////////////////////////////////


SList = new Array();
document.write( "<div id=NSDiv style='position:absolute;top:-100px;z-index:3;'></div>" );

// set SL Style 
function setEnv( pSrc, pBG, pBM, pBD, pAI )
{
    var oEnv = new Object();
    var oSrc = createObject( pSrc );

    if( oSrc.style.width ) {
	oEnv.Width = oSrc.style.width;
    } else {
	document.all.NSDiv.innerHTML = ""
	    +"<table style='top:2px;'><tr><td height=1>"+pSrc+"</td></tr></table>";
	oEnv.Width = document.all.NSDiv.scrollWidth;
    }
    if( oSrc.style.height ) oEnv.Height = oSrc.style.height; else oEnv.Height = SL_Height;
    if( oSrc.style.fontSize ) oEnv.FontSize = oSrc.style.fontSize; else oEnv.FontSize = SL_FontSize;
    if( oSrc.style.color ) oEnv.FontColor = oSrc.style.color; else oEnv.FontColor = SL_FontColor;

    if( pBG ) oEnv.BGColor = pBG;	else oEnv.BGColor = SL_BGColor;
    if( pBM ) oEnv.BGColor_M = pBM;	else oEnv.BGColor_M = SL_BGColor_M;
    if( pBD ) oEnv.Border = pBD;	else oEnv.Border = SL_Border;
    if( pAI ) oEnv.AImage = pAI;	else oEnv.AImage = SL_AImage;

    return oEnv;
}

// parameter NSelect
function NSelect( HTMLSrc, KIN, BG, BM, BD, AI )
{
    if ( UserAgent.indexOf( "MSIE" ) < 0 || AppVersion < 5 ) {
	document.write( HTMLSrc );
	return;
    } else {
	var SE = setEnv( HTMLSrc, BG, BM, BD, AI );
	var SListObj = new setNSelect( HTMLSrc, KIN, SE );
	SListObj.append();

	return SListObj;
    }
}

function appendSList()
{
    document.write("<div id=TempDiv></div>\n");
    document.all.TempDiv.appendChild( this.Table );
    document.all.TempDiv.removeNode();

    return;
}

function MouseScrollHandler() {
    var f_titleObj = SList[SL_FocusedIDX].Title;
    var f_itemObj = SList[SL_FocusedIDX].Items;
    var idx_length = f_itemObj.options.length;
    var idx_selected = f_itemObj.options.selectedIndex ;

    CancelEventHandler( window.event );

    if( window.event.wheelDelta > 0 ) {
	idx_selected = Math.max( 0, --idx_selected );
    } else {
	idx_selected = Math.min( idx_length - 1, ++idx_selected );
    }

    if( f_itemObj.options.selectedIndex != idx_selected ) {
	f_itemObj.options.selectedIndex = idx_selected;
	SList[SL_FocusedIDX].ChangeTitle();
	if( f_itemObj.onchange ) f_itemObj.onchange();
    }

    return;
}

function ActiveIDXHandler() {
    if( SL_ActiveIDX == null ) {
	for( i = 0; i < SList.length; i++ ) {
	    SList[i].List.style.display = "none";
	    if( i == SL_Focused ) TitleHighlightHandler( i, 1 );
	    else TitleHighlightHandler( i, 0 );
	}

	if( SL_Focused == null )
	    document.detachEvent( 'onclick', ActiveIDXHandler );
    }
    if( SL_Focused == null ) document.detachEvent( 'onmousewheel', MouseScrollHandler );
    else document.attachEvent( 'onmousewheel', MouseScrollHandler );

    SL_ActiveIDX = null;
    SL_Focused = null;

    return;
}

function TitleClickHandler()
{
    SL_ActiveIDX = this.entry;

    for( i = 0; i < SList.length; i++ ) {
	if( i == SL_ActiveIDX ) {
	    if( SList[i].List.style.display == "block" ) {
		SList[i].List.style.display = "none";
		TitleHighlightHandler( i, 1 );
		SL_Focused = i;
		SL_FocusedIDX = i;
	    } else SList[i].List.style.display = "block";
	} else {
	    SList[i].List.style.display = "none";
	    TitleHighlightHandler( i, 0 );
	}
    }

    document.detachEvent( 'onclick', ActiveIDXHandler );
    document.attachEvent( 'onclick', ActiveIDXHandler );

    return;
}

function TitleMouseOverHandler()
{
    this.Title.children(0).cells(1).children(0).style.filter = "";
    if( !this.kin ) this.Title.style.border = "1 solid";

    return;
}

function TitleMouseOutHandler()
{
    this.Title.children(0).cells(1).children(0).style.filter = "alpha( opacity=80 );";
    if( !this.kin ) this.Title.style.border = "1 solid";

    return;
}

function TitleHighlightHandler( entry, t )
{
    if( t ) {
	if( this.kin )
	    SList[entry].Title.children(0).cells(0).style.background = SList[entry].env.BGColor;
	else 
	    SList[entry].Title.children(0).cells(0).style.background = SList[entry].env.BGColor_M;
    } else {
	SList[entry].Title.children(0).cells(0).style.background = SList[entry].env.BGColor;
    }

    return;
}

function ListMouseDownHandler( f )
{
    var tObj = this.Title.children(0);
    var length = this.Items.length;

    for( i = 0; i < length; i++ ) {
	this.Items.options[i].selected = false;
	if ( i == f.idx ) {
	    this.Items.options[i].selected = true;
	    this.ChangeTitle();
	}
    }
    if( this.Items.onchange ) this.Items.onchange();
    if ( this.kin && ( length - 1 ) == f.idx )
	location.href = this.Items.options[f.idx].value;

    this.List.style.display = "none";

    SL_Focused = this.entry;
    SL_FocusedIDX = this.entry;

    return;
}

function ListMouseOverHandler( f )
{
    if( this.kin ) f.style.color = "#FFFFFF";
    f.style.background = this.env.BGColor_M;
    return;
}

function ListMouseOutHandler( f )
{
    f.style.color = this.env.FontColor;
    f.style.background = this.env.BGColor;
    return;
}

function CancelEventHandler( e )
{
    e.cancelBubble = true;
    e.returnValue = false;

    return;
}

function ModifyDivHandler() {
    var width = parseInt( this.Title.style.width );

    this.Items.style.width = null;
    document.all.NSDiv.innerHTML = ""
	+"<table style='top:2px;'><tr><td height=1>"+this.Items.outerHTML+"</td></tr></table>";
    var scrollWidth = parseInt( document.all.NSDiv.scrollWidth );

    if( scrollWidth > width ) {
	this.Title.style.width = scrollWidth;
	this.List.style.width = scrollWidth;
    }

    return;
}

function ChangeTitleHandler() {
    var newTitle = this.Items.options[this.Items.options.selectedIndex].innerHTML ;
    this.Title.children(0).cells(0).innerHTML = "<nobr>"+newTitle+"</nobr>";

    return;
}

function ChangeListHandler() {
    var length = this.Items.length;
    var item = "";

    var listHeight = parseInt( this.env.Height ) * Math.min( SL_SBLen, length ) + 2;
    var overflowY = ( length > SL_SBLen ) ? "scroll" : "hidden";

    this.List.innerHTML = "";
    for( i = 0; i < this.Items.options.length; i++ ) {
	item = ""
	    +"<DIV idx="+i+" style='height:"+this.env.Height+";"+SL_Text+"'"
	    +"  onMouseDown='SList["+this.entry+"].ListMouseDown( this );'"
	    +"  onMouseOver='SList["+this.entry+"].ListMouseOver( this );'"
	    +"  onMouseOut='SList["+this.entry+"].ListMouseOut( this );'>"
	    +"    <nobr>"+this.Items.options[i].innerText+"</nobr>"
	    +"</DIV>";
	oItem = createObject( item );
	this.List.appendChild( oItem );
    }

    this.List.style.height = listHeight;
    this.List.style.overflowY = overflowY;

    return;
}

function AddOptionHandler( sText, sValue, iIndex ) {
    var oOption = document.createElement("OPTION");
    this.Items.options.add(oOption, iIndex);

    oOption.innerText = sText;
    oOption.value = sValue;

    return;
}

function setNSelect( pSrc, pKIN, pSE )
{
    this.entry = SList.length;
    this.lower = null;
    this.src = pSrc;
    this.env = pSE;
    this.kin = pKIN;

    // NSelect Object
    this.Items;
    this.Title;
    this.List;
    this.Table;

    // Create NSelect Element
    this.ItemObj = createObject;
    this.ListObj  = createList;
    this.TitleObj = createTitle;
    this.TableObj = createSList;

    // NSelect EventHandler
    this.TitleClick = TitleClickHandler;
    this.TitleMouseOver = TitleMouseOverHandler;
    this.TitleMouseOut = TitleMouseOutHandler;
    this.ListMouseDown = ListMouseDownHandler;
    this.ListMouseOver = ListMouseOverHandler;
    this.ListMouseOut = ListMouseOutHandler;
    this.CancelEvent = CancelEventHandler;

    // NSelect Function
    this.ModifyDiv = ModifyDivHandler;
    this.ChangeTitle = ChangeTitleHandler;
    this.ChangeList = ChangeListHandler;
    this.AddOption = AddOptionHandler;

    this.append = appendSList; 
    this.Table = this.TableObj();

    SList[this.entry] = this;

    return;
}

function createObject( pSrc )
{       
    oObj = new Object();
    oObj.Div = document.createElement("DIV");
    oObj.Div.insertAdjacentHTML("afterBegin", pSrc);

    return oObj.Div.children(0);
}

function createTitle()
{
    var length = this.Items.length;

    for ( i = 0; i < length; i++ ) {
	if (this.Items.options[i].selected) {
	    SIName = this.Items.options[i].innerText;
	    SIValue = this.Items.options[i].value;
	}
    }

    this.Title = createObject(""
	+"<DIV id=title style='width:"+this.env.Width+";overflow-X:hidden;position:relative;left:0px;top:0px;"
	+"border:"+this.env.Border+";cursor:default;background:"+this.env.BGColor+";'"
	+"	onClick='SList["+this.entry+"].TitleClick( window.event );'"
	+"	onMouseOver='SList["+this.entry+"].TitleMouseOver( window.event );'"
	+"	onMouseOut='SList["+this.entry+"].TitleMouseOut( window.event );'"
	+">"
        +"<table height="+this.env.Height+" "+SL_Table+" style='table-layout:fixed;text-overflow:hidden;'>"
	+"<tr>"
        +"    <td style='width:100%;font-size:"+this.env.FontSize+";color:"+this.env.FontColor+";"+SL_Text+"'><nobr>"+SIName+"</nobr></td>"
        +"    <td style='display:none;'></td>"
        +"    <td align=center valign=center width="+SL_SBWidth+"><img src='"+SL_IPrefix2+this.env.AImage+"' border=0 style='Filter:Alpha( Opacity=80 )'></td>"
	+"</tr>"
	+"</table>"
	+"</DIV>");

    oTitle_Sub = createObject(""
	+"<img style='position:absolute;top:1px;left:0;width:"+this.env.Width+";height:"+this.env.Height+";'"
	+"    ondragstart='SList["+this.entry+"].CancelEvent( window.event );'"
	+" src='"+SL_IPrefix+SL_BImage+"'>");

    this.Title.childNodes(0).cells(1).appendChild( this.Items );
    this.Title.childNodes(0).cells(2).appendChild( oTitle_Sub );

    return;
}

function createList()
{
    var ListDiv = ""
	+"<DIV id=list style='position:absolute;z-index:2;display:none;background:"+this.env.BGColor+";"
	+"border:"+this.env.Border+";font-size:"+this.env.FontSize+";color:"+this.env.FontColor+";cursor:default;"
	+"width:"+this.env.Width+";overflow-X:hidden;"+SL_ScrollBar+"'></DIV>";

    this.List = createObject( ListDiv );
    this.ChangeList();

    return;
}

function createSList()
{
    this.Items = this.ItemObj( this.src );

    this.TitleObj();
    this.ListObj();

    var table = createObject(""
        +"<table cellspacing=0 cellpadding=1 border=0>"
        +"<tr><td></td></tr>"
        +"</table>");

    table.cells(0).appendChild( this.Title );
    table.cells(0).appendChild( this.List );

    return table;
}

function changeSubNS( t, oSub ) {
    var s_idx = t.options.selectedIndex;
    oSub.Items.options.length = 0;

    for( i = 0; i < section_list[s_idx].length; i++ ) {
	content = section_list[s_idx][i].split(",");
	oSub.AddOption( content[0], content[1], 0 );
    }
    oSub.ChangeTitle();
    oSub.ChangeList();

    return;
}

/* Select Guide ALT function 
	t : this
	f : form name 
	e : event
*/
var pDoc = false;
function showSelectGuide( f, e )
{
    if ( UserAgent.indexOf("MSIE") < 0 || AppVersion < 5 ) return;
    else 
    {
        var realWidth = document.body.clientWidth - 148;
        var divWidth = document.all.NSDiv.scrollWidth;
    }   

    if( pDoc && document.all.NSDiv.innerHTML )
	document.all.NSDiv.style.display = "block";
    else
	document.all.NSDiv.style.display = "none";

    if( e.x < realWidth / 2 )
        document.all.NSDiv.style.left = e.x+document.body.scrollLeft + 5;
    else
        document.all.NSDiv.style.left = e.x+document.body.scrollLeft - divWidth -5;
        
    document.all.NSDiv.style.top = e.y + document.body.scrollTop + 5;

    return;
}   

function showSelectGuide_ALT(t, f, e)
{
    if ( UserAgent.indexOf("MSIE") < 0 || AppVersion < 5 ) return;
    else 
    {
	var s_idx = 0;
	var realWidth = document.body.clientWidth - 148;
	var meanWidth = realWidth / 2;
	var divWidth = document.all.NSDiv.scrollWidth;

	if( f.u ) {
	    if( f.u.options ) {
		s_idx = f.u.options.selectedIndex;
		sub_name = f.u.options[s_idx].innerText; 
		sub_url = f.u.options[s_idx].value; 
	    } else {
		sub_url = f.u.value; 
	    }
	}

	if ( f.desc ) {
	    sub_url = f.desc.options[s_idx].innerText;
	}

	if ( sub_url.length >= 70 ) { 
	    sub_url = sub_url.substring(0, 60); 
	    sub_url = sub_url + "...";
	}

	if( sub_url.length ) {
	    pDoc = true;
	    content = ""
	    	+"<table height=16 bgcolor=#FEFFCB cellspacing=0 cellpadding=0"
		+" style='filter:alpha(opacity=100); border:1 solid #AFB086'>"
		+"<tr><td style='text-indent:2px;cursor:hand;font-size:9pt;height:16px;padding-top:2px;'>"
	    	+"<font color=black style='font-size:9pt'>"+sub_url+"</font>"
	    	+"</td><td width=10 nowrap></td></tr></table>";

	    document.all.NSDiv.innerHTML = content;
	    document.all.NSDiv.style.display = "block";

	    if ( e.x < realWidth / 2 )
	        document.all.NSDiv.style.left = e.x+document.body.scrollLeft + 5;
	    else
	        document.all.NSDiv.style.left = e.x+document.body.scrollLeft - divWidth -5;
	
	    document.all.NSDiv.style.top = e.y + document.body.scrollTop + 5;
	} else {
	    pDoc = false;
	    document.all.NSDiv.style.display= "none";
	}
    }

    return;
}

function hideSelectGuide_ALT()
{
    document.all.NSDiv.style.display = "";
    document.all.NSDiv.style.display = "none";
    pDoc = false;

    return;
}

// New Media

/*** »ó¼¼ ÆäÀÌÁö ÀÌµ¿ ***/
function DetailView2(code,bigcode,smallcode,listview){
	if (bigcode == "mb001"){			// ÀÏ¹Ý¿µÈ­
		document.location.href="/newmedia/movie_view.jsp?code=" + code + "&smallcode=" + smallcode + "&listview=" + listview;
	
	}else if (bigcode == "mb002"){		// ¹«·á°ü
		document.location.href="/movie/view_freemovie.jsp?code=" + code + "&smallcode=" + smallcode;
	
	}else if (bigcode == "mb003"){		// ¼ºÀÎ°ü
		document.location.href="/newmedia/movie_view.jsp?code=" + code + "&smallcode=" + smallcode + "&listview=" + listview;
	
	}else if (bigcode == "mb005"){		// Æ¯º°°ü
		document.location.href="/movie/view_special.jsp?code=" + code + "&smallcode=" + smallcode;
	
	}		
}

function DetailView_series2(menucode,pagecode,code){
	document.location.href="/movie/view_series.jsp?MENU_CODE=" + menucode + "&page_gb=" + pagecode + "&code=" + code;
	
}

function DetailView_Player(code,bigcode,smallcode){
	if (bigcode == "mb001"){			// ÀÏ¹Ý¿µÈ­
 		opener.location.href="/movie/view.jsp?code=" + code + "&smallcode=" + smallcode;
	
	}else if (bigcode == "mb002"){		// ¹«·á°ü
		opener.location.href="/movie/view_freemovie.jsp?code=" + code + "&smallcode=" + smallcode;
	
	}else if (bigcode == "mb003"){		// ¼ºÀÎ°ü
		opener.location.href="/adult/view_ero.jsp?code=" + code + "&smallcode=" + smallcode;
	
	}else if (bigcode == "mb005"){		// Æ¯º°°ü
		opener.location.href="/movie/view_special.jsp?code=" + code + "&smallcode=" + smallcode;
	
	}		
}

function ListPage_Link(mode, listview, adult, cate)
{
	document.location.href="/newmedia/movie_list.jsp?mode="+mode+"&listview="+listview+"&adult="+adult+"&cate="+cate;
}

function AdultFail(){
	alert("ÀÌ ¿µÈ­´Â ¸¸ 18¼¼ ÀÌ»ó È¸¿ø¸¸ °ü¶÷ÇÏ½Ç¼ö ÀÖ½À´Ï´Ù.");
	return;
}

function MuhyupFail(){
	alert("PMP, PMC¸¸ Áö¿øÇÕ´Ï´Ù.");
}

///// ¾¾³×Áø..¤Ñ¤Ñ^ ########script.js ÆÄÀÏ º¯°æ½Ã ¿¬¶ô¹Ù¶÷..############

function galleryDetail(code) {
	location.href = "http://cinezine.cinewel.com/jsp/cinezine/star_gallery_view.jsp?num="+code;
}

function fwDetail(code) {
	location.href = "http://cinezine.cinewel.com/jsp/cinezine/movies/movie_now_view.jsp?moviecode="+code;
}

function fwDetail(code,code2) {
	location.href = "http://cinezine.cinewel.com/jsp/cinezine/movies/movie_now_view.jsp?moviecode="+code+"&arg="+code2;
}

function netizneDetail(code) {
	location.href = "http://cinezine.cinewel.com/jsp/cinezine/movies/movie_netizen_view.jsp?no="+code;
}

function fwTitle(code) {
	var zineUrl;
	if(code == '01')		zineUrl = "http://cinezine.cinewel.com/jsp/cinezine/movies/movie_now.jsp";
	else if(code == '02')	zineUrl = "http://cinezine.cinewel.com/jsp/cinezine/movies/movie_coming.jsp";
	else if(code == '03')	zineUrl = "http://cinezine.cinewel.com/jsp/cinezine/news/news_head.jsp";
	else if(code == '04')	zineUrl = "http://cinezine.cinewel.com/jsp/cinezine/news/news_zip.jsp";
	else if(code == '05')	zineUrl = "http://cinezine.cinewel.com/jsp/cinezine/news/news_interview.jsp";
	else if(code == '06')	zineUrl = "http://cinezine.cinewel.com/jsp/cinezine/news/news_review.jsp";
	else if(code == '07')	zineUrl = "http://cinezine.cinewel.com/jsp/cinezine/news/news_plan.jsp";
	else if(code == '08')	zineUrl = "http://www.cinewel.com/login/inz.jsp?go_url=http://cinezine.cinewel.com/jsp/cinezine/news/news_sexmovie.jsp";
	else if(code == '09')	zineUrl = "http://cinezine.cinewel.com/jsp/cinezine/movies/movie_netizen_review.jsp";
	else if(code == '10')	zineUrl = "http://cinezine.cinewel.com/jsp/cinezine/star_gallery.jsp";
	else if(code == '11')	zineUrl = "http://cinezine.cinewel.com/jsp/cinezine/multi/multimedia.jsp";
	else if(code == '13')	zineUrl = "http://cinezine.cinewel.com/jsp/cinezine/news/news_etv.jsp";

	location.href = zineUrl;
}

function detail(num,code) {
	if(code == '09') {
		location.href = "http://www.cinewel.com/login/inz.jsp?go_url="+escape("http://cinezine.cinewel.com/jsp/cinezine/news/news_view.jsp?news_num="+num+"&news_code="+code);
	}else {
		location.href = "http://cinezine.cinewel.com/jsp/cinezine/news/news_view.jsp?news_num="+num+"&news_code="+code;
	}
}

function fwMultimedia(a,b,c,d,e) {
	location.href = "http://cinezine.cinewel.com/jsp/cinezine/multi/multimedia.jsp?m_code="+a+"&vodcode="+b+"&gubun="+c+"&"+d+"="+e;
}

function fwMultimedia2(a,b,c,d,e,f) {
	location.href = "http://cinezine.cinewel.com/jsp/cinezine/multi/multimedia.jsp?m_code="+a+"&vodcode="+b+"&gubun="+c+"&"+d+"="+e+"&page="+f;
}

function open_player_win(mode,code,title)
{
   var openurl = "http://www.cinewel.com/player/preview_new/pvm_win.jsp?mode="+mode+"&code="+code+"&title="+title;
   var openwin = window.open(openurl, 'cinepvmwin', 'width=600,height=600,toolbar=no,hotkeys=no');
   openwin.focus();
}

function open_player_win2(mode,code,title)
{
   var openurl = "http://www.cinewel.com/player/preview_new/player_zine.jsp?mode="+mode+"&code="+code+"&title="+title;
   var openwin = window.open(openurl, 'cinepvmwin', 'width=740,height=600,toolbar=no,hotkeys=no');
   openwin.focus();
}

function open_player_win3(mode,code)
{
   var openurl = "http://www.cinewel.com/player/preview_new/player_zine.jsp?mode="+mode+"&code="+code;
   var openwin = window.open(openurl, 'cinepvmwin', 'width=740,height=600,toolbar=no,hotkeys=no');
   openwin.focus();
}

function open_player_win4(mode,code,ccode,num)
{
   var openurl = "http://www.cinewel.com/player/preview_new/player_zine1.jsp?mode="+mode+"&code="+code+"&ccode="+ccode+"&num="+num;
   var openwin = window.open(openurl, 'cinepvmwin', 'width=740,height=600,toolbar=no,hotkeys=no');
   openwin.focus();
}


///// ¾¾³×Áø(¾¾³×À£ÄÄ¿¡¼­ È£Ãâ....)..¤Ñ¤Ñ^ ########script.js ÆÄÀÏ º¯°æ½Ã ¿¬¶ô¹Ù¶÷..############

 
function fwTitle_w(code,domain) {
	var zineUrl;
	if(code == '01')		zineUrl = domain+"/jsp/cinezine/movies/movie_now.jsp";
	else if(code == '02')	zineUrl = domain+"/jsp/cinezine/movies/movie_coming.jsp";
	else if(code == '03')	zineUrl = domain+"/jsp/cinezine/news/news_head.jsp";
	else if(code == '04')	zineUrl = domain+"/jsp/cinezine/news/news_zip.jsp";
	else if(code == '05')	zineUrl = domain+"/jsp/cinezine/news/news_interview.jsp";
	else if(code == '06')	zineUrl = domain+"/jsp/cinezine/news/news_review.jsp";
	else if(code == '07')	zineUrl = domain+"/jsp/cinezine/news/news_plan.jsp";
	else if(code == '08')	zineUrl = domain+"/jsp/cinezine/news/news_sexmovie.jsp";
	else if(code == '09')	zineUrl = domain+"/jsp/cinezine/movies/movie_netizen_review.jsp";
	else if(code == '10')	zineUrl = domain+"/jsp/cinezine/star_gallery.jsp";
	else if(code == '11')	zineUrl = domain+"/jsp/cinezine/multi/multimedia.jsp";

	location.href = zineUrl;
}

function detail_w(num,code,domain) {
	location.href = domain+"/jsp/cinezine/news/news_view.jsp?news_num="+num+"&news_code="+code;
}

// ÀÏ¹Ý¸µÅ©,ÆË¾÷È£Ãâ
function onForword(Url,gubun,nameWin,W,H) {
	if(gubun == '1') { // ÀÏ¹Ý¸µÅ©
		location.href = Url;
	}else if(gubun == '2') { //ÆË¾÷¸µÅ©
		if( W != '' ) {
			window.open(Url,nameWin,"toolbar=yes,scrollable=yes,resizable=yes,width=" + W + ",height=" + H + ",top=0,left=0");
		}else {
			window.open(Url,nameWin,"");
		}
	}
}

function getCookieScript(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 checkadult()
{

	member_id = getCookieScript("member_id");


	if (member_id.length == 0)
	{
		return false;
	} else {
		member_jnum1 = getCookieAdult("member_jnum1");
		member_jnum2 = getCookieAdult("member_jnum2");
		member_lastlogin = getCookieAdult("member_lastlogin");

		birth = 1900 + parseInt(member_jnum1.substring(0, 2));
		limitdate = parseInt(member_lastlogin) - 190000;

		if (member_jnum2.substring(0,1) == '3' || member_jnum2.substring(0,1) == '4')
		{
			birth += 100;
		}


		birth *= 10000;

		birth += parseInt(member_jnum1)%10000;

		if (limitdate < birth) {
			return false;
		}
	}

	return true;

}

function checkpay()
{
	member_type = getCookieScript("member_type");
	if (member_type == "3" || member_type == "4" || member_type == "5" || member_type == "31" || member_type == "51") {
		return true;
	}
	return false;
}

////////////////////////////////////////////////////////////////////////////////
// °í°´¼¾ÅÍ ¸¶¹ý»ç Ã¢À» ¶ç¿ì´Â ½ºÅ©¸³Æ®
// 2006.07.11 - ¹ÚÁ¾¼±
function openCustomerWizard(){
	var customer_wizard_Win;
	customer_wizard_Win = window.open('http://www.cinewel.com/help/wizard/a.jsp','customer_wizard_Win','width=700,height=640,toolbar=no,hotkeys=no,top=0,left=0');
    if (customer_wizard_Win == null)
	{
		if ( confirm("°í°´¼¾ÅÍ ¸¶¹ý»ç¸¦ ½ÇÇà ½ÃÅ°±â À§ÇØ¼­´Â ÆË¾÷Ã¢ÀÌ ¶ç¿öÁ®¾ß ÇÕ´Ï´Ù.\nÆË¾÷Ã¢ Â÷´Ü ÇØÁö¸¦ ÇÏ½Ã°Ú½À´Ï±î?") ) {
			this.location.href = "http://www.cinewel.com/help/faq/faq_list.jsp?code=05&no=37&page=1";
		} else {
		}
	}    
}
////////////////////////////////////////////////////////////////////////////////
// ¿À¸®ÄÜ ¼³¹®Á¶»ç Ã¢À» ¶ç¿ì´Â ½ºÅ©¸³Æ®
// 2006.07.14 - ¹ÚÁ¾¼±
function openResearchOricon(){
	var oricon_Win;
	oricon_Win = window.open('http://check.cinewel.com/event/060714_oricon/research_oricon_01.jsp','oricon_Win','width=530,height=850,toolbar=no,hotkeys=no,top=0,left=0');
    if (oricon_Win == null)
	{
		if ( confirm("°í°´¼¾ÅÍ ¸¶¹ý»ç¸¦ ½ÇÇà ½ÃÅ°±â À§ÇØ¼­´Â ÆË¾÷Ã¢ÀÌ ¶ç¿öÁ®¾ß ÇÕ´Ï´Ù.\nÆË¾÷Ã¢ Â÷´Ü ÇØÁö¸¦ ÇÏ½Ã°Ú½À´Ï±î?") ) {
			this.location.href = "http://www.cinewel.com/help/faq/faq_list.jsp?code=05&no=37&page=1";
		} else {
		}
	}
}

// ·Î±×ÀÎ ÇÏÁö ¾Ê´Â ·Î±×ÀÎ Æû¿¡ Æ÷Ä¿½º°¡ ¸ÂÃçÁú °æ¿ì background¿¡ ÀÖ´Â ÀÌ¹ÌÁö¸¦ Áö¿öÁØ´Ù.
function imageNone(obj){
	 obj.style.backgroundImage= "none";
}

// ÄíÅ°¸¦ ºê¶ó¿ìÁ®¿¡ ÀúÀå
function setCinewelCookie( name, value, expiredays ) {
	var todayDate = new Date();
	todayDate.setDate( todayDate.getDate() + expiredays );
	document.cookie = name + "=" + escape( value ) + "; path=/; expires=" + todayDate.toGMTString() + ";"
}