/*BEGIN*/
/*====================================================
||    Create By jjkk at 2001-10-223333                   ||
====================================================*/
function view_lp(url)
{
window.open(url,"","titlebar=yes,toolbar=no,location=no,menubar=no,status=yes,width=550,height=496,top=150,left=5,scrollbars=yes,resizeable=no");
}
function viewcontent(url)
{
if(url.indexOf("STOCK")>0 )
	{
	window.open(url,"","titlebar=yes,toolbar=no,location=no,menubar=no,status=no,width=725,height=460,top=150,left=5,scrollbars=yes,resizeable=no");
    }
else
	{
		if(url.indexOf("GJDL")>0)
		{
		window.open(url,"","titlebar=yes,toolbar=no,location=no,menubar=no,status=no,width=550,height=630,top=150,left=5,scrollbars=yes,resizeable=no");
		}
		
		else
		{
		window.open(url,"","titlebar=yes,toolbar=no,location=no,menubar=no,status=no,width=850,height=630,top=150,left=5,scrollbars=yes,resizeable=no");
		}
	}
}
function preview(id)
{

window.open("http://home.xintv.com/media_play_pre.php?id="+id,"mediawindow","titlebar=no,toolbar=no,location=no,menubar=no,status=no,width=470,height=380,top=150,left=5,scrollbars=no,resizeable=no");
}
function goBrocastContent(strChannelID, strLocation, iType)
{
	if (!confirm("你正在将直播节目加入列表，当直播节目开始播放后，你必须停止直播，才能继续放映播放列表中的其他节目。你可以使用播放器中的停止功能，或播放列表的删除功能停止直播。\n你确定要将直播节目加入列表吗？")) 
	{
		return;
	}
	top.window.scrollTo(0,0);
	if(strChannelID!='')
	{
		if(iType==0)
			top.ctrlFrame.location='/home/media_ctrl.php?addbid='+strChannelID;
		if(iType==1)
			top.ctrlFrame.location='/home/media_ctrl.php?addsid='+strChannelID;
	}
	if(strLocation!='') 
		top.mainFrame.location=strLocation;
	//else
	//	top.mainFrame.location='/stock/zqhq.php';
}
function goContent(strContentID, strLocation, iType)
{
	// iType: 0 Video, 1 Audio, 2 Nothing
	if(iType==0)
		top.window.scrollTo(0,0)
	if(strContentID!='')
	{
		if(iType==0)
			top.ctrlFrame.location='/home/media_ctrl.php?addid='+strContentID;
		if(iType==1)
			top.ctrlFrame.location='/home/media_ctrl.php?addaid='+strContentID;
	}
	if(strLocation!='')
		window.open(strLocation,"","titlebar=no,toolbar=no,location=no,menubar=no,status=no,width=455,height=370,top=0,left=450,scrollbars=yes,resizeable=yes");
}
function goRelateContent(strContentID, strLocation, iType)
{
	// iType: 0 Video, 1 Audio, 2 Nothing
	if(strContentID!='')
	{
		if(iType==0)
			top.ctrlFrame.location='/home/media_ctrl.php?addid='+strContentID;
		if(iType==1)
			top.ctrlFrame.location='/home/media_ctrl.php?addaid='+strContentID;
	}
	if(strLocation!='') top.mainFrame.location=strLocation;
}

function goAd(strChannelID)
{
	top.ctrlFrame.location='/home/media_ctrl.php?strChannelID='+strChannelID;
}
function goNextVideo()
{
	top.ctrlFrame.location='/home/media_ctrl.php?playend=1';
}
function goPosition(iTime)
{
	if(top.mediaFrame.MediaPlayer!=null)
	{
		top.mediaFrame.MediaPlayer.CurrentPosition=iTime;
	}
}
function goChannel(strChannelPath)
{
	// iType: 0 Video, 1 Audio, 2 Nothing
	top.ctrlFrame.location='/home/media_ctrl.php?strChannelID='+strChannelID;
	//top.mainFrame.location='/news/index.php?channelid='+strChannelID;
	//modify by xch
	top.mainFrame.location='/'+strChannelPath+'/main.php';
}
function goLiveChannel(strChannelID)
{
	// iType: 0 Video, 1 Audio, 2 Nothing
	//window.alert('尊敬的用户：您好！Xintv.com在试播期间推出的该频道，用户反响良好。然而，由于与频道供应商合作的一些条件目前尚不成熟，所以我们正在与其洽谈新的合作方案。在此期间，暂停播出，敬请见谅。感谢您的合作。 ');
	//window.alert("");
	top.ctrlFrame.location='/home/media_ctrl.php?strChannelID='+strChannelID;
	top.mainFrame.location='/liveplay/index.php?channelid='+strChannelID;
}
function goColumn(strColumnPath)
{
	// iType: 0 Video, 1 Audio, 2 Nothing
	top.ctrlFrame.location='/home/media_ctrl.php?columnid='+strColumnID;
	//top.mainFrame.location='/news/column.php?columnid='+strColumnID;
	//modify by xch
	top.mainFrame.location='/'+strColumnPath;
}
function goHome()
{
	top.ctrlFrame.location='/home/media_ctrl.php?strChannelID=all';
	top.mainFrame.location='/home/main.php';
}
function goURL(strLocation)
{
	// iType: 0 Video, 1 Audio, 2 Nothing
	if(strLocation!='') top.mainFrame.location=strLocation;
}
function goNeedInfo()
{
	return;
	//top.mainFrame.location='/shcentell/xh2/register_b.php';
}

function playPart(url,type)
{
window.open("http://home.xintv.com/media_play.php?url="+url,"mediawindow","titlebar=no,toolbar=no,location=no,menubar=no,status=no,width=470,height=380,top=150,left=5,scrollbars=no,resizeable=no");
}
function refashPage()
{
if(window.location.pathname.indexOf("play")==(-1)  && window.location.hostname.indexOf("auto")==(-1))
	if(window.location.pathname.indexOf("main")==(-1) && window.location.hostname.indexOf("news")==(-1)){
		setTimeout("history.go();",180000); }
}
refashPage();