<!--
function ShowDetail(nFilmId, nChannelId)
{
    //top.location = "detail" + nFilmId + ".html"
    window.open("detail" + nFilmId + ".html","","");
	//top.location = "MovieInfo.aspx?FilmId=" + nFilmId + "&ChannelId=" + nChannelId; 
}
function ShowMovie(nFilmId, strContentId, nChannelId, FilmName)
{
		window.open("pop/pop.htm", "player", "toolbar=0,width=450,height=306,top=5,left=5");
		
		//window.open("player/play.aspx?Filmid=" + nFilmId + "&ContentId=" + strContentId + "&ChannelId=" + nChannelId + "&FilmName=" + FilmName + "&back_url=" + window.document.location.href, "player", "toolbar=0,width=450,height=306,top=5,left=5");
		window.location = "player/play.aspx?Filmid=" + nFilmId + "&ContentId=" + strContentId + "&ChannelId=" + nChannelId + "&FilmName=" + FilmName + "&back_url=" + window.document.location.href;
} 


function IsPlayer9(){
     fHasWMP9=false;
     fHasWMP9 = (mPlayer1.URL ==""); 
	if( fHasWMP9 ) WMPVer=mPlayer1.versionInfo; // Has 7.0+ (e.g 8.x, 9.x)
	else {
	   WMPVer="1.00";
	}   
	var strVer = new String(WMPVer);
	s = strVer.split(".");
    if (s[0]=="9" || s[0] == "10")  return true;
	else  return false;
}
function ValidateYx(kid){
	if (IsPlayer9()){
	    //判断频道号来分别做DRM证书处理
	    netobj.GetLicenseFromURL("<a></a>", "http://www.lookgame.com/drm/prelicgen.asp?kid="+encodeURIComponent(kid));
		return true;
	}
	else{
		 if(confirm("您当前的MediaPlayer版本过低，是否现在下载MediaPlay9？")){
					   //window.location.href ='/software/mp90.exe';
        			    return false;
		}
		return false;
	}
}  

function ShowYxdxMovie(nFilmId, strContentId, nChannelId,strDRM)
{
		if(ValidateYx(strDRM)){
		window.open("../../player/play.aspx?Filmid=" + nFilmId + "&ContentId=" + strContentId + "&ChannelId=" + nChannelId + "&back_url=" + EnCode(window.document.location.href), "player", "toolbar=0,width=700,height=700,top=5,left=5");
        }
}

function ShowMovieIndex(nFilmId, strContentId, nChannelId)
{
		window.open("../player/play.aspx?Filmid=" + nFilmId + "&ContentId=" + strContentId + "&ChannelId=" + nChannelId + "&back_url=" + EnCode(window.document.location.href), "player", "toolbar=0,width=700,height=700,top=5,left=5");
}

function ShowFreeMovie(nFilmId, strContentId, nChannelId)
{
		window.open("../../player/playFree.aspx?Filmid=" + nFilmId + "&ContentId=" + strContentId + "&ChannelId=" + nChannelId, "player", "toolbar=0,width=450,height=306,top=5,left=5");
}

function ShowMovieIndex(nFilmId, strContentId, nChannelId)
{
		window.open("../player/play.aspx?Filmid=" + nFilmId + "&ContentId=" + strContentId + "&ChannelId=" + nChannelId + "&back_url= " + EnCode(window.document.location.href), "player", "toolbar=0,width=700,height=700,top=5,left=5");
}

function ShowFreeMovieIndex(nFilmId, strContentId, nChannelId)
{
		window.open("../player/playFree.aspx?Filmid=" + nFilmId + "&ContentId=" + strContentId + "&ChannelId=" + nChannelId, "player", "toolbar=0,width=700,height=700,top=5,left=5");
}
function TestMovieInfo(item) {
	   var str = /.+MovieInfo.aspx\?FilmId.+/
       if(str.test(item)) return true;
       else return false;
   }
			
function SelectMovie(cmb)
{
	var boxLength		= cmb.length;
	var selectedItem	= cmb.selectedIndex;
	if(cmb.selectedIndex == 0)
		return;
	var selectedText	= cmb.options[selectedItem].text;
	var selectedValue	= cmb.options[selectedItem].value;
	var vals = selectedValue.split(",");
	ShowMovie(vals[0], vals[1], vals[2]);
}	
		
//下载
function SelectDrm(cmb)
{
	var boxLength		= cmb.length;
	var selectedItem	= cmb.selectedIndex;
	if(cmb.selectedIndex == 0)
		return;
	var selectedText	= cmb.options[selectedItem].text;
	var selectedValue	= cmb.options[selectedItem].value;
	var vals = selectedValue.split(",");
	ShowDrm(vals[0], vals[1], vals[2]);
}	

function ShowDrm(nFilmId, strContentId, nChannelId)
{
		window.open("../player/DownloadMovie.aspx?Filmid=" + nFilmId + "&ContentId=" + strContentId + "&ChannelId=" + nChannelId, "drm", "toolbar=0,width=700,height=700,top=5,left=5");	
}

//播放器控制
function ShowFull()
{	
	var obj = MediaPlayer1;
	if(typeof(obj) != "undefined")
	{
		obj.DisplaySize="3";
	}
}
function ShowPlay()
{
	var obj = MediaPlayer1;
	if(typeof(obj) != "undefined")
	{
		obj.play();
	}		
}

function ShowPause()
{
	var obj = MediaPlayer1;
	if(typeof(obj) != "undefined")
	{
		obj.pause();
	}		
}

function ShowStop()
{
	var obj = MediaPlayer1;
	if(typeof(obj) != "undefined")
	{
		obj.stop();
	}		
}

function TurnPage(strCatg,nTypeNo,nPageNo)
{
    self.location="List"+strCatg+nTypeNo+"P"+nPageNo+".html";
/*
//	alert(" i love you");
	MovieChannel.lblPageNo.value     = nPageNo;
//	alert(nPageNo);
//	alert(MovieChannel.lblPageNo.value);
	MovieChannel.submit();				
*/	
}
function TurnPageSearch(strUrl,nPageNo)
{
   self.location=strUrl + "&PageNo=" + nPageNo;
}



//进行查询的函数
function Search()
{
    strVal = MovieSearch.ucSearchForm_srchKey.value;
	
	if(strVal.length == 0)
	{alert("请输入关键字!");MovieSearch.ucSearchForm_srchKey.focus();return;
	}
	document.location = "SearchRslt.aspx?Type=" + MovieSearch.ucSearchForm_srchType.value + "&Key=" + EnCode(strVal) + "&ChannelId=" + MovieSearch.ucSearchForm_srchChannel.value;
}


function SearchIndex()
{
    strVal = myform.sky.value;
	
	if(strVal.length == 0)
	{alert("请输入关键字!");myform.sky.focus();return;
	}
	if(myform.pindao.value == 1){
	
	  StrChannelId = 17;
	}
	else if(myform.pindao.value == 2)
	{
	  StrChannelId = 20;
	}
	else if(myform.pindao.value == 3)
	{
	  StrChannelId = 19;
	}
	else if(myform.pindao.value == 4)
	{
	  StrChannelId = 21;
	}
	if(myform.pindao.value == 4){
	  document.location = "SearchYxdxRslt.aspx?Key=" + EnCode(strVal) + "&ChannelId=" + StrChannelId;
	}
	else{
      document.location = "SearchRslt.aspx?Key=" + EnCode(strVal) + "&ChannelId=" + StrChannelId;
	}
}



function EnCode(strIn)
{
	strOut = "";
	for(nI=0; nI < strIn.length; nI++)
	{
		switch(strIn.charAt(nI))
		{
			case " ":
				strOut += "%20";
				break;
			case "\"":
				strOut += "%22";
			case "#":
				strOut += "%23";
				break;
			case "%":
				strOut += "%25";
				break;							
			case "&":
				strOut += "%26";
				break;							
			case "+":
				strOut += "%2B";
				break;							
			case ",":
				strOut += "%2C";							
				break;							
			case "/":
				strOut += "%2F";							
				break;							
			case ":":
				strOut += "%3A";
				break;
			case ";":
				strOut += "%3B";
				break;							
			case "<":
				strOut += "%3C";
				break;							
			case "=":
				strOut += "%3D";
				break;							
			case ">":
				strOut += "%3E";
				break;							
			case "@":
				strOut += "%40";
				break;							
			case "`":
				strOut += "%60";
				break;							
			case "\\":
				strOut += "%5C";
				break;							
			case "|":
				strOut += "%7C";
				break;							
			default:
				strOut += strIn.charAt(nI);
		}
	}
	return strOut;
}
-->