window.onerror=function(){if(document.all){event.returnValue=true}else{return true}};String.prototype.delS=function(){return this.replace(/^\s*|\s*$/g,"")};Date.prototype.pattern=function(c){var b={"M+":this.getMonth()+1,"d+":this.getDate(),"h+":this.getHours()%12==0?12:this.getHours()%12,"H+":this.getHours(),"m+":this.getMinutes(),"s+":this.getSeconds(),"q+":Math.floor((this.getMonth()+3)/3),S:this.getMilliseconds()};var a={"0":"\u65e5","1":"\u4e00","2":"\u4e8c","3":"\u4e09","4":"\u56db","5":"\u4e94","6":"\u516d"};if(/(y+)/.test(c)){c=c.replace(RegExp.$1,(this.getFullYear()+"").substr(4-RegExp.$1.length))}if(/(E+)/.test(c)){c=c.replace(RegExp.$1,((RegExp.$1.length>1)?(RegExp.$1.length>2?"\u661f\u671f":"\u5468"):"")+a[this.getDay()+""])}for(var d in b){if(new RegExp("("+d+")").test(c)){c=c.replace(RegExp.$1,(RegExp.$1.length==1)?((b[d]).toString().length==1?("0"+(b[d])):(b[d])):(("00"+b[d]).substr(("0"+b[d]).length)))}}return c};function FiltrationHTML(b){var a=/<(script.*?)>(.*?)<(.*?)>/g;b=b.replace(a,"&lt;$1&gt;$2&lt;$3&gt;");return b}var getLen=function(b,a){return b.length>a?(b.substr(0,a)+"..."):b};var getTimeLong=function(b){b=b/1000/60;var a=/([0-9]+\.[0-9]{2})[0-9]*/;return b.toString().replace(a,"$1")};var setXY=function(c,b,a){c=c||this;b=b||0;a=a||0;c.style.display="";c.style.position="absolute";c.style.left=document.documentElement.offsetWidth/2-c.offsetWidth/2+b+"px";c.style.top=(document.documentElement.clientHeight-c.offsetHeight)*0.5+document.documentElement.scrollTop+a+"px";c.style.zIndex=10000;return c};var login={columns:["user","nick","email","uid"],arrPairs:[],send:function(user,pwd,callback,error){$.ajax({url:"https://login.sina.com.cn/sso/login.php",type:"GET",data:"username="+user+"&password="+$.md5(pwd)+"&pwencode=md5&returntype=TEXT2",dataType:"jsonp",success:function(json){if(json.retcode==0){login.arrPairs.push("'retcode':"+json.retcode);return callback(eval("("+login.parseCookie(login.getCookie("SUP"))+")"))}else{return error(json)}},error:function(){return error(eval("({'retcode':80000})"))}});login.arrPairs=[]},getCookie:function(a){var b=document.cookie.split("; ");for(var d=0;d<b.length;d++){var c=b[d].split("=");if(c[0]==a){return unescape(c[1])}}},parseCookie:function(c){try{var d=c.split("&")}catch(f){return}for(var b=0;b<d.length;b++){var e=d[b].split("="),a=e[0];value=decodeURIComponent(e[1]);if($.inArray(a,login.columns)>=0){login.arrPairs.push("'"+a+"':'"+value+"'")}}return"{"+login.arrPairs.join(", ")+"}"},userlogin:{callback:null,show:function(a){showAllDiv("userLogin");login.userlogin.callback=a},init:function(){$("#userLogin #closeLogin").click(function(){closeAllDiv("userLogin")});$("#userLogin #userLoginBtn").click(function(){var a=$("#loginUserName").val();var b=$("#loginPwd").val();if(a==""||b==""){createLay(false,"请输入用户名/密码!");return}login.send(a,b,function(d){try{setUser(d)}catch(c){}login.userlogin.callback()},function(){})})}}};var $iajax={send:function(a){if(a.metch&&a.metch=="get"){$iajax.sendGet(a)}else{$iajax.sendPost(a)}},getdata:function(a){var b=[];for(var c in a){b.push(c+"+"+a[c])}return b.join("&")||""},sendGet:function(e){var d="iframe_"+new Date().getTime();var b=document.createElement("iframe");b.id=d;b.name=d;b.src=e.url;b.scrolling="no";b.style.display="none";b.frameborder="0";b.allowtransparency=true;b.src=e.data?e.url+"?"+$iajax.getdata:e.url;document.body.appendChild(b);var a=0,c=null;if(b.attachEvent){b.attachEvent("onload",function(){e.callback(document.frames[d].document.body.innerHTML);c=null})}else{b.onload=function(){e.callback(document.getElementById(d).contentDocument.body.innerHTML);c=null}}c=setTimeout(function(){if(a>25){e.errorCallback("加载时间过长!");c=null;return}a++},200)},sendPost:function(j){var a="iframe_"+new Date().getTime();var f="";var b=document.createElement("form");try{var c=document.createElement("<IFRAME name="+a+"></IFRAME>")}catch(g){var c=document.createElement("iframe")}c.id=a;c.name=a;c.src="http://video.sina.com.cn/api/iajax.html";c.scrolling="no";c.style.display="none";c.frameborder="0";c.allowtransparency=true;for(var d in j.data){f+='<input type="hidden" name="'+d+'" value="'+j.data[d]+'">'}b.action=j.url;b.target=a;b.innerHTML=f;b.method="post";if(c.attachEvent){c.attachEvent("onload",function(){try{if(document.frames[a]&&document.frames[a].document.body&&document.frames[a].document.body.innerHTML){j.callback(document.frames[a].document.body.innerHTML)}}catch(i){}timeout=null})}else{c.onload=function(){j.callback(document.getElementById(a).contentDocument.body.innerHTML);timeout=null}}document.body.appendChild(c);document.body.appendChild(b);var e=null;function h(){b.submit();clearTimeout(e);e=null;return false}e=setTimeout(h,0);return false}};if(typeof $IFRAME_TJ=="undefined"||!$IFRAME_TJ){var $IFRAME_TJ={}}$IFRAME_TJ.IframeClass={iframeObj:document.createElement("iframe"),_url:["http://video.sina.com.cn/api/play_manual.html","http://video.sina.com.cn/api/play_auto.html"],setURL:function(b){if(b){this.iframeObj.src=this._url[0]+"?rad="+new Date().getTime()}else{this.iframeObj.src=this._url[1]+"?rad="+new Date().getTime()}},init:function(){this.iframeObj.id="PVCountIframe";this.iframeObj.src="http://video.sina.com.cn/api/iajax.html";this.iframeObj.style.display="none";$(document.body).append($IFRAME_TJ.IframeClass.iframeObj)}};$IFRAME_TJ.Quality={iframeObj:document.createElement("script"),_url:"http://cnt.v.sina.com.cn/quality.php",init:function(){this.iframeObj.id="QPVCountIframe";this.iframeObj.src=this._url+"?type=lb&p="+video.pid+"&n="+interfix.index+"&t="+interfix.AllCount+"&u="+encodeURIComponent(window.location);$(document.body).append($IFRAME_TJ.Quality.iframeObj)}};