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 PutFlash(strUrl, strWidth, strHeight)
{
	document.writeln("<object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' codebase='http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0' width='" + strWidth + "px' height='" + strHeight + "'px>");
	document.writeln("<param name='allowScriptAccess' value='always'>");
	document.writeln("	<param name='movie' value='" + strUrl + "'>");
	document.writeln("	<param name='quality' value='high'>");
	document.writeln("	<param name='wmode' value='transparent'>");		
	document.writeln("	<embed src='" + strUrl + "' quality='high' pluginspage='http://www.macromedia.com/go/getflashplayer' allowScriptAccess='always' wmode='transparent' type='application/x-shockwave-flash' width='" + strWidth + "px' height='" + strHeight + "'px ></embed>");
	document.writeln("</object>");
}

function gate(next)
{
	location.href = next;
	return;
	
	var move_url;
	
	var SID = getCookie("ISession%5FID");
	var SMEM = getCookie("IMem%5FNO");
	
	if (SID == "ISession%5FID") {SID="";}
	if (SMEM == "IMem%5FNO") {SMEM="";}
	
	if(next.indexOf('www.interpark.com') > 0 || next.indexOf('ticket.interpark.com') > 0 || next.indexOf('movie.interpark.com') > 0)
	{
		move_url = 'http://www.interpark.com/gate/sitemap/SiteGateway.jsp?COMM_001=0000100000&COMM_002=0&Session_ID='+SID+'&Mem_NO='+SMEM+'&nextpage='+escape(next);		
		location.href = move_url;
	}
	else if(next.indexOf('ipointmall.interpark.com') > 0 || next.indexOf('interpark.com/PointMall/') > 0)
	{
		move_url = 'http://www.interpark.com/gate/sitemap/SiteGateway.jsp?COMM_001=0&COMM_002=0&Session_ID='+SID+'&Mem_NO='+SMEM+'&nextpage='+escape(next);		
		location.href = move_url;
	}	
	else if(next.indexOf('talkbean.interpark.com') > 0 ){	  
	  	move_url = "http://talkbean.interpark.com/member.do?cmd=talkBeanGateWay&Session_ID=" +SID + "&Mem_NO="+SMEM+"&nextpage="+escape(next);		
		location.href = move_url;
	}

	else if(next.indexOf('beautiful.interpark.com') > 0)
	{
		move_url = 'http://www.interpark.com/gate/sitemap/SiteGateway.jsp?COMM_001=0000100000&COMM_002=0&Session_ID='+SID+'&Mem_NO='+SMEM+'&nextpage='+escape(next);
		location.href = move_url;
	}	
	else if(next.indexOf('mart.interpark.com') > 0)
	{
		location.href = next;
		//move_url = 'http://mart.interpark.com/gate/sitemap/SiteGateway.jsp?Session_ID='+SID+'&Mem_NO='+SMEM+'&nextpage='+escape(next);
		//location.href = move_url;
	}
	else if(next.indexOf('www.interparktravel.com') > 0)
	{		
		move_url = 'http://www.interparktravel.com/gate/sitegateway.asp?Session_ID='+SID+'&Mem_NO='+SMEM+'&nextpage='+escape(next);	
		location.href = move_url;
	}
	else if(next.indexOf('air.interpark.com') > 0)
	{
		move_url = 'http://tour.interpark.com/gate/sitegateway.asp?Session_ID='+SID+'&Mem_NO='+SMEM+'&nextpage='+escape(next);
		location.href = move_url;
	}
	else if(next.indexOf('airticket.interpark.com') > 0)
	{
		move_url = 'http://tour.interpark.com/gate/sitegateway.asp?Session_ID='+SID+'&Mem_NO='+SMEM+'&nextpage='+escape(next);
		location.href = move_url;
	}
	else if(next.indexOf('travel.interpark.com') > 0)
	{
		move_url = 'http://tour.interpark.com/gate/sitegateway.asp?Session_ID='+SID+'&Mem_NO='+SMEM+'&nextpage='+escape(next);
		location.href = move_url;
	}
	else if(next.indexOf('tour.interpark.com') > 0){
		move_url = 'http://tour.interpark.com/gate/sitegateway.asp?Session_ID='+SID+'&Mem_NO='+SMEM+'&nextpage='+escape(next);
		location.href = move_url;
	}
	else if(next.indexOf('book.interpark.com') > 0)
    {
        move_url= 'http://book.interpark.com/gate/sitemap/SiteGateway.jsp?COMM_001=0000100000&COMM_002=0&Session_ID='+SID+'&Mem_NO='+SMEM+'&nextpage='+escape(next);
        location.href = move_url;
    }
	else
	{
		location.href = next;
	}
		
}

function ViewVideo_Movie(strGoodsCode, strFileName)
{
	var strUrl;
	
	strUrl = "http://movie.interpark.com/Webzine/Paper/Movie_Multimedia_Pop.asp?GroupCode=" + strGoodsCode + "&FileName=" + strFileName;
	window.open(strUrl	,"Multimedia","width=700,height=640,left=100,top=100");
}

function ViewVideo_Play(strGoodsCode, strFileName)
{
	var strUrl;
	
	strUrl = "http://ticket.interpark.com/Webzine/Paper/Play_Multimedia_Pop.asp?GoodsCode=" + strGoodsCode + "&FileName=" + strFileName;
	window.open(strUrl	,"Multimedia","width=700,height=640,left=100,top=100");
}

function ViewVideo_OST(strGoodsCode, strFileName)
{
	var strUrl;
	
	strUrl = "http://ticket.interpark.com/Webzine/Paper/Play_OST_Pop.asp?GoodsCode=" + strGoodsCode + "&FileName=" + strFileName;
	window.open(strUrl	,"Multimedia","width=350,height=267,left=100,top=100");
}

function f_OpenMovie(sReqPlayNo, sReqMediaNo, sMovieCategory) {
		var url = "http://www.playdb.co.kr/magazine/MovieView.asp?sReqPlayNo=" + sReqPlayNo + "&sReqKind=" + sMovieCategory + "&sReqMediaNo=" + sReqMediaNo;
		window.open(url);
	}