﻿var hiddobj;
 function ShowTr(hid,t){
            if(hid == "" && hid == null)
                return;
            if(document.getElementById(hid) == null)
             return;
             
            if(document.getElementById(hid).style.display != "none"){
                document.getElementById(hid).style.display = "none";
                t.src = "images/+.gif"
            }
            else{
                document.getElementById(hid).style.display = "";
                document.getElementById(hid+"td").innerHTML = "其他来源：<font color=red>loading...</font>";          
                t.src = "images/-.gif";
                hiddobj = setInterval("FillDivData("+ hid +")",20);
            }
        }
         function FillDivData(hid){
             url="HiddenPage.aspx?hid=" + hid;
              var http = createXMLHttpRequest();
                http.open("get",url,false);
                http.onreadystatechange=function(){
                    if(http.readyState==4&&http.status==200){
                        document.getElementById(hid+"td").innerHTML = http.responseText;                   
                    }
                }
                http.send(null);
                document.getElementById(hid+"td").innerHTML = http.responseText;
                clearInterval(hiddobj);
        }
        function createXMLHttpRequest(){
            var xmlHttp = false;
            try{
                xmlHttp = new XMLHttpRequest();
            }
            catch(trymicrosoft){
                try{
                    xmlHttp = new ActiveXObject("Msxml2.XMLHTTP");
                }
                catch(othermicrosoft){
                   try{
                        xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
                   }
                   catch(failed){}
                }
           }
           return xmlHttp;
        }
        function SearchMovice(sign){
            var  url = document.getElementById("q").value;
            if(sign == 2)
                url = document.getElementById("FooterKey").value   
            location.href="SearchPlayFile.aspx?"+url;
        }
<!--
String.prototype.len=function(){
return this.replace(/[^\x00-\xff]/g,"**").length; 
} 
function setMaxLength(object,length) 
{
    var result = true; 
    var controlid = document.selection.createRange().parentElement().id; 
    var controlValue = document.selection.createRange().text; 
    var tempString=object.value; 
    var tt=""; 
    for(var i=0;i<length;i++) 
        { 
            if(tt.len()<length) 
                tt=tempString.substr(0,i+1); 
            else 
                break; 
        } 
    if(tt.len()>length) 
        tt=tt.substr(0,tt.length-1); 
    object.value=tt;     
} 
function QVODP(M,U,H)
{
	var A=500,B=150;
	var C=(screen.width-A)/2;
	var D=(screen.height-B)/2;
	window.open ("qvodplay.aspx?"+escape(M)+"&hid="+H+"&Url="+escape(U), "newwindow", "height="+B+",width="+A+",top="+D+",left="+C+",toolbar=no, menubar=no, scrollbars=no, resizable=no,location=no, status=no") 
} 
--> 