<!--
/*firefox support*/
function __firefox(){
    var nav_u=navigator.userAgent.toLowerCase();
    if(nav_u.indexOf('chrome')>=0) return; //Chrome
    HTMLElement.prototype.__defineGetter__("runtimeStyle", __element_style);
    window.constructor.prototype.__defineGetter__("event", __window_event);
    Event.prototype.__defineGetter__("srcElement", __event_srcElement);
    HTMLElement.prototype.__defineSetter__("outerHTML",function(sHTML){
        var r=this.ownerDocument.createRange();
        r.setStartBefore(this);
        var df=r.createContextualFragment(sHTML);
        this.parentNode.replaceChild(df,this);
        return sHTML;
        });
    HTMLElement.prototype.__defineGetter__("outerHTML",function(){
     var attr;
        var attrs=this.attributes;
        var str="<"+this.tagName.toLowerCase();
        for(var i=0;i<attrs.length;i++){
            attr=attrs[i];
            if(attr.specified)
                str+=" "+attr.name+'="'+attr.value+'"';
            }
        if(!this.canHaveChildren)
            return str+">";
        return str+">"+this.innerHTML+"</"+this.tagName.toLowerCase()+">";
        });        
	HTMLElement.prototype.__defineGetter__("canHaveChildren",function(){
	switch(this.tagName.toLowerCase()){
            case "area":
            case "base":
            case "basefont":
            case "col":
            case "frame":
            case "hr":
            case "img":
            case "br":
            case "input":
            case "isindex":
            case "link":
            case "meta":
            case "param":
            return false;
        }
        return true;
     });
     HTMLElement.prototype.__defineGetter__("innerText",function(){
     var anyString = "";
     var childS = this.childNodes;
     for(var i=0; i<childS.length; i++) {
      if(childS[i].nodeType==1)
       anyString += childS[i].tagName=="BR" ? '\n' : childS[i].innerText;
      else if(childS[i].nodeType==3)
       anyString += childS[i].nodeValue;
     }
     return anyString;
    }); 
	HTMLElement.prototype.__defineSetter__("innerText",function(sText){this.textContent=sText;}); 
    	HTMLElement.prototype.__defineGetter__("outerText",function(){return this.innerText;}); 
	HTMLElement.prototype.__defineSetter__("outerText",function(sText){this.outerHTML=convertHTMLToText(sText);return sText;}); 
}
function convertHTMLToText(s) {
    s = s.replace(/\&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/\n/g, "<BR>");
    while (/\s\s/.test(s))	s = s.replace(/\s\s/, "&nbsp; ");
    return s.replace(/\s/g, " ");
}
function __element_style(){
    return this.style;
}
function __window_event(){
    return __window_event_constructor();
}
function __event_srcElement(){
    return this.target;
}
function __window_event_constructor(){
    if(document.all){return window.event;}
    var _caller = __window_event_constructor.caller;
    while(_caller!=null){
        var _argument = _caller.arguments[0];
        if(_argument){
            var _temp = _argument.constructor;
            if(_temp.toString().indexOf("Event")!=-1){
                return _argument;
            }
        }
        _caller = _caller.caller;
    }
    return null;
}
function isfirefox() {return window.addEventListener!=null}
if (isfirefox()) __firefox();
var edbase64str="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+-";
function bin2dec(binStr){var towPow2=1,numLen2=binStr.length,decPos2=numLen2,hChar2,cChar2,nChar2,wz2=0;while(decPos2>0){cChar2=binStr.substr(decPos2-1,1);nChar2=parseInt(cChar2);wz2=wz2+nChar2*towPow2;towPow2=towPow2*2;decPos2=decPos2-1};return wz2}
function dec2bin(octNumber){var vara=octNumber,wz='';wz=(vara%2).toString()+wz;vara=parseInt(vara/2);while(vara!=0){wz=(vara%2).toString()+wz;vara=parseInt(vara/2)};return wz}
function enbase64(strbin){
	var bins='',bins2,i,varTm,w,sinBin,nChar,pads,nNum,sixBin,exitLoop,wz='',sl=strbin.length*2;for(i=0;i<sl;i++){var p1=i/2,p2=parseInt(p1);varTm=strbin.substr(p2,1).charCodeAt(0);if (varTm<256)varTm=(p1>p2?0:varTm);else varTm=(p1>p2?(varTm-varTm%256)/256:varTm%256);bins2="00000000"+dec2bin(varTm);bins=bins+bins2.substr(bins2.length-8);if ((i+1)%3==0){for(w=0;w<=3;w++){sixBin=bins.substr(w*6,6);nChar=bin2dec(sixBin);wz=wz+edbase64str.substr(nChar,1)};bins=''}}
	if(bins!=''){pads=3-parseInt(bins.length/8);exitLoop=false;i=0;while(!exitLoop){nChar=bins.substr(0,6);if(nChar.length < 6){nChar=(nChar+"000000").substr(0,6);exitLoop=true};nNum=bin2dec(nChar);wz=wz+edbase64str.substr(nNum,1);bins=bins.substr(6);if(i++>10) break};for(i=0;i<pads;i++) wz+='='}
	return wz;
}
function debase64(baseStr){
	var bins,nChar,oldValue,binValue,binValue2,deChar,deChar2,deCharInt=0,wz='';if (baseStr.length%4!=0) return '';baseStr=baseStr.replace(/[ ]/g,'+');bins="";
	for(var i=0;i<baseStr.length;i++){
		nChar=baseStr.substr(i,1);if(nChar=="=") break;oldValue=edbase64str.indexOf(nChar);binValue2="000000"+dec2bin(oldValue);binValue=binValue2.substr(binValue2.length-6);bins=bins+binValue;
		if (bins.length>=8){deChar=bins.substr(0,8);bins=bins.substr(8);deChar2=bin2dec(deChar);switch(true){case (deChar2==0 && deCharInt!=0):wz=wz+ String.fromCharCode(deCharInt);deCharInt=0;break;case (deChar2!=0 && deCharInt!=0):wz=wz+ String.fromCharCode(deChar2*256+deCharInt);deCharInt=0;break;default:deCharInt=deChar2;break}}
	}
	return wz;
}
function setCookie(name,value,expiry,path,domain,secure){
	var nameString = name + "=" + value;
	var expiryString="";
	if (expiry!=null) {try{expiryString="; expires="+expiry.toGMTString()}	catch(e) {if (expiry) {var lsd=new Date();lsd.setTime(lsd.getTime()+expiry*1000);expiryString="; expires="+lsd.toGMTString()}}}
	var pathString = (path == null) ? " ;path=/" : " ;path = "+ path;
	var domainString = (domain == null) ? "" : " ;domain = "+ domain;
	var secureString = (secure) ?";secure=" :"";
	document.cookie = nameString + expiryString + pathString + domainString + secureString;
}
function getCookie(name){
	var CookieFound = false,start = 0,end = 0,CookieString = document.cookie;
	var i = 0;
	while (i <= CookieString.length) {
		start = i ;
		end = start + name.length;
		if (CookieString.substring(start, end+1) == (name+'=')){
			CookieFound = true;break; 
		}
		i++;
	}
	if (CookieFound){
		start = end + 1;
		end = CookieString.indexOf(";",start);
		if (end < start) end = CookieString.length;
		return unescape(CookieString.substring(start, end));
	}
	return "";
}
function $() {return document.getElementById(arguments[0])}
document.write("<iframe name=_win style='display:none'></iframe>");
function tdo() {location.href=exeurl;return false}
function zi(o) {o.style.behavior='url(#default#homepage)';o.setHomePage('http://www.74ok.com/');return false}
function af() {
	var u='http://www.74ok.com/?fav',t='骑士电影 - 绿色健康的免费网络影院';	
	if (isfirefox()) window.sidebar.addPanel(t,u,''); else window.external.addFavorite(u,t);
	return false
}

function getinfo_bs(){var n=navigator.userAgent.toLowerCase();return (n.indexOf('opera')>=0?'@':'#')}
function enchar(v) {return encodeURIComponent(v)}
function dechar(v) {return decodeURIComponent(v)}
function lenstr(s,n) {var s1='',i=1;while(i++<=n) s1+=s;return s1}
function puchar(t) {return t.replace(/[",']/g,'')}
function isclient() {return getCookie('isclient')=='true'}
//window.onerror=function() {return true}
function nav_tj_func(d,s){
	if(d=='') d='未知';
}
function getAdCookie(name) 
{ 
　　var arr = document.cookie.match(new RegExp("(^| )"+name+"=([^;]*)(;|$)")); 
　　if(arr !=null) return unescape(arr[2]); return null; 
}
//-->
