//
//#############################//
if(typeof $=='undefined'){var $=function(o){return document.getElementById(o)};}
(function(){var _ua=navigator.userAgent.toLowerCase();var $IE=/msie/.test(_ua);var $moz=/gecko/.test(_ua);var $Safari=/safari/.test(_ua);function $E(id){return typeof(id)=='string'?_viewWindow.document.getElementById(id):id;}
var getScrollPos=function(oDocument){oDocument=oDocument||document;return[Math.max(oDocument.documentElement.scrollTop,oDocument.body.scrollTop),Math.max(oDocument.documentElement.scrollLeft,oDocument.body.scrollLeft),Math.max(oDocument.documentElement.scrollWidth,oDocument.body.scrollWidth),Math.max(oDocument.documentElement.scrollHeight,oDocument.body.scrollHeight)];};var getStyle=function(el,property){switch(property){case"opacity":var val=100;try{val=el.filters['DXImageTransform.Microsoft.Alpha'].opacity;}
catch(e){try{val=el.filters('alpha').opacity;}catch(e){}}
return val;case"float":property="styleFloat";default:var value=el.currentStyle?el.currentStyle[property]:null;return(el.style[property]||value);}};if($moz){getStyle=function(el,property){if(property=="float"){property="cssFloat";}
try{var computed=document.defaultView.getComputedStyle(el,"");}
catch(e){traceError(e);}
return el.style[property]||computed?computed[property]:null;};}
var getXY=function(el){if((el.parentNode==null||el.offsetParent==null||getStyle(el,"display")=="none")&&el!=document.body){return false;}
var parentNode=null;var pos=[];var box;var doc=el.ownerDocument;box=el.getBoundingClientRect();var scrollPos=getScrollPos(el.ownerDocument);return[box.left+scrollPos[1],box.top+scrollPos[0]];parentNode=el.parentNode;while(parentNode.tagName&&!/^body|html$/i.test(parentNode.tagName)){if(getStyle(parentNode,"display").search(/^inline|table-row.*$/i)){pos[0]-=parentNode.scrollLeft;pos[1]-=parentNode.scrollTop;}
parentNode=parentNode.parentNode;}
return pos;};if($moz){getXY=function(el){if((el.parentNode==null||el.offsetParent==null||getStyle(el,"display")=="none")&&el!=document.body){return false;}
var parentNode=null;var pos=[];var box;var doc=el.ownerDocument;pos=[el.offsetLeft,el.offsetTop];parentNode=el.offsetParent;var hasAbs=getStyle(el,"position")=="absolute";if(parentNode!=el){while(parentNode){pos[0]+=parentNode.offsetLeft;pos[1]+=parentNode.offsetTop;if($Safari&&!hasAbs&&getStyle(parentNode,"position")=="absolute"){hasAbs=true;}
parentNode=parentNode.offsetParent;}}
if($Safari&&hasAbs){pos[0]-=el.ownerDocument.body.offsetLeft;pos[1]-=el.ownerDocument.body.offsetTop;}
parentNode=el.parentNode;while(parentNode.tagName&&!/^body|html$/i.test(parentNode.tagName)){if(getStyle(parentNode,"display").search(/^inline|table-row.*$/i)){pos[0]-=parentNode.scrollLeft;pos[1]-=parentNode.scrollTop;}
parentNode=parentNode.parentNode;}
return pos;};}
var getEvent=function(){return window.event;};if($moz){getEvent=function(){var o=arguments.callee.caller;var e;var n=0;while(o!=null&&n<40){e=o.arguments[0];if(e&&(e.constructor==Event||e.constructor==MouseEvent)){return e;}
n++;o=o.caller;}
return e;};}
var stopEvent=function(){var ev=getEvent();ev.cancelBubble=true;ev.returnValue=false;};if($moz){stopEvent=function(){var ev=getEvent();ev.preventDefault();ev.stopPropagation();};}
Function.prototype.bind3=function(object,args){args=args==null?[]:args;var __method=this;return function(){__method.apply(object,args);}};function addEvent2(elm,func,evType,useCapture){var elm=$E(elm);if(typeof useCapture=='undefined')useCapture=false;if(typeof evType=='undefined')evType='click';if(elm.addEventListener){elm.addEventListener(evType,func,useCapture);return true;}
else if(elm.attachEvent){var r=elm.attachEvent('on'+evType,func);return true;}
else{elm['on'+evType]=func;}};var _inputNode;var _rndID=parseInt(Math.random()*100);var _showMenuItems=[];var _selectMenuIndex=-1;var _selectMenuText="";var _viewWindow=window;var passcardOBJ={overfcolor:"#999",overbgcolor:"#e8f4fc",outfcolor:"#000000",outbgcolor:"",menuStatus:{"sina.com":true,"vip.sina.com":true,"2008.sina.com":true}}
passcardOBJ.createNode=function(){var d=_viewWindow.document;var div=d.createElement('div');div.innerHTML='
'
d.body.appendChild(div);}
passcardOBJ.arrowKey=function(keyCodeNum){if(keyCodeNum==38){if(_selectMenuIndex<=0)_selectMenuIndex=_showMenuItems.length;_selectMenuIndex--;passcardOBJ.selectLi(_selectMenuIndex);}
if(keyCodeNum==40){if(_selectMenuIndex>=_showMenuItems.length-1)_selectMenuIndex=-1;_selectMenuIndex++;passcardOBJ.selectLi(_selectMenuIndex);}};passcardOBJ.showList=function(e)
{_selectMenuText="";var keyCodeNum=getEvent().keyCode;if(keyCodeNum==38||keyCodeNum==40){passcardOBJ.arrowKey(keyCodeNum);return false;}
if(!$E('sinaNote'))
passcardOBJ.createNode();var username=$E(e).value;var menuList={};var atIndex=username.indexOf("@");var InputCase="";var InputStr="";if(atIndex>-1){InputCase=username.substr(atIndex+1);InputStr=username.substr(0,atIndex);}
_showMenuItems=[];_selectMenuIndex=0;_showMenuItems[_showMenuItems.length]="sinaNote_MenuItem_Title_"+_rndID;for(var key in this.menuStatus){this.menuStatus[key]=true;if(InputCase!=""&&InputCase!=key.substr(0,InputCase.length)){this.menuStatus[key]=false;}
else{_showMenuItems[_showMenuItems.length]="sinaNote_MenuItem_"+key+"_"+_rndID;}}
var listcontent='请选择登录类型';listcontent+='';var itemLabel;for(var key in this.menuStatus){if(this.menuStatus[key]==true){if(InputStr==""){itemLabel=username+"@"+key;}
else{itemLabel=InputStr+"@"+key;}
listcontent+='';}}
$E("sinaNote").innerHTML=listcontent;for(var i=0;io.offsetWidth?o.scrollWidth:o.offsetWidth;y=o.scrollHeight>o.offsetHeight?o.scrollHeight:o.offsetHeight;}
return{X:x,Y:y};},showBg:function(type,id)
{var Div=$('_userLoginBgDiv');if(type=='show')
{var XY=this.getXY();var css="position:absolute;display:block;top:0px;left:0px;height:"+XY.Y+"px;width:"+XY.X+"px;opacity:0.2;filter:alpha(opacity=20);background:#000;z-index:90009;";if(this.isNull(Div))
{Div=this.makeDiv('_userLoginBgDiv',css);}
else
{Div.style.cssText=css;}
Div.onclick=function(){userLogin.loginHide()}
document.body.onresize=top.window.onresize=function(){try{var auto=top.$('_userLoginBgDiv');if(auto!=null&&auto.style.display=='block'){userLogin.showBg('show',id);if(typeof id!='undefined'){userLogin.showLogin('show',id);}}}catch(e){return true;}}}
else
{Div.style.display='none';}
return true;},showLogin:function(type,id)
{var obj=$('_userLoginDiv');var html='';if(type=='show')
{var thisHeight=200;var thisWidth=300;var XY=this.getXY();if(!this.isCard)
{var thisId=$(id);var thisPos=this.getPos(thisId);var thisTop=Math.floor(thisPos.top-(thisHeight-thisId.offsetHeight)/2)-this.userTop;var thisLeft=Math.floor(thisPos.left-(thisWidth-thisId.offsetWidth)/2);var cutWidth=XY.X-(thisLeft+thisWidth);}
else
{var cardIframe=top.$('friendDialogIframe');var thisPos=this.getPos(cardIframe);var thisTop=thisPos.top+2;var thisLeft=thisPos.left+2;var cutWidth=XY.X-(thisLeft+thisWidth);}
thisTop=thisTop<=0?1:thisTop;thisLeft=cutWidth>=0?thisLeft:thisLeft+cutWidth-10;thisLeft=thisLeft<=20?20:thisLeft;var css="position:absolute;display:block;top:"+thisTop+"px;left:"+thisLeft+"px;height:auto;width:"+thisWidth+"px;z-index:90010;";if(this.isNull(obj))
{obj=this.makeDiv('_userLoginDiv',css);obj.className='passCard';obj.innerHTML=html;}
else
{obj.style.cssText=css;obj.innerHTML=html;}
var ckName=new RegExp("(^|)jsUserName=([^;]*)(;|$)","gi").exec(document.cookie);if(!this.isNull(ckName))
{$('_userLogin_name').value=decodeURIComponent(ckName[2]);$('_userLogin_save').checked=true;}
passcardOBJ.init(document.getElementById("_userLogin_name"),{overfcolor:"#999",overbgcolor:"#e8f4fc",outfcolor:"#000000",outbgcolor:""},document.getElementById("_userLogin_pass"));}
else
{obj.style.display='none';}},loginHide:function()
{this.showBg('hide');this.showLogin('hide');document.body.onresize=top.window.onresize=null;},getPos:function(obj)
{var x=y=w=h=0;if(obj.getBoundingClientRect)
{var box=obj.getBoundingClientRect();y=box.top+Math.max(document.documentElement.scrollTop,document.body.scrollTop)-2;x=box.left+Math.max(document.documentElement.scrollLeft,document.body.scrollLeft)-2;w=h=2;}
else
{for(;obj!=document.body;x+=obj.offsetLeft,y+=obj.offsetTop,obj=obj.offsetParent);w=h=2;if(this.isFFbutton)
{y-=12;h=12;}}
return{'left':x,'top':y,'w':w,'h':h};},showClickDiv:function(id,useLink)
{obj=$(id);var Div=$('_userLoginClickDiv');var pos=this.getPos(obj);var css="position:absolute;display:block;cursor:pointer;top:"+pos.top+"px;left:"+pos.left+"px;height:"+(obj.offsetHeight+pos.h)+"px;width:"+(obj.offsetWidth+pos.w)+"px;background:#eee;z-index:90011;opacity:0.1;filter:alpha(opacity=10);";if(this.isNull(Div))
{Div=this.makeDiv('_userLoginClickDiv',css);}
else
{Div.style.cssText=css;}
Div.focus();Div.onblur=Div.onmouseout=function(){if(useLink)obj.style.color="#001A9F";this.style.display='none'}
Div.onclick=function(){this.style.display='none'
userLogin.showBg('show',id);userLogin.showLogin('show',id);}},UicDiv:function(id,useLink)
{obj=$(id);var Div=$('_UicDiv');var pos=this.getPos(obj);var css="position:absolute;display:block;cursor:pointer;top:"+pos.top+"px;left:"+pos.left+"px;height:"+(obj.offsetHeight+pos.h)+"px;width:"+(obj.offsetWidth+pos.w)+"px;background:#eee;z-index:90011;opacity:0.1;filter:alpha(opacity=10);";if(this.isNull(Div))
{Div=this.makeDiv('_UicDiv',css);}
else
{Div.style.cssText=css;}
Div.focus();Div.onblur=Div.onmouseout=function(){if(useLink)obj.style.color="#001A9F";this.style.display='none'}
Div.onclick=function(){this.style.display='none';userLogin.loadJs('uic',id);}},checkLogin:function(id,notLink,FF)
{var useLink=(typeof notLink=="undefined");this.isFFbutton=!(typeof FF=="undefined");if(id=="card_showInvite"||id=="card_sendMsg")
{this.isCard=true;userLogin.showBg('show',id);userLogin.showLogin('show',id);return false;}
else
{this.isCard=false;if(!this.isLogin())
{this.userTop=(id=='pq_quanzhi'||id=='pq_savetotopic')?-90:0;if(useLink)$(id).style.color="#BD0302";this.showClickDiv(id,useLink);}
else
{if(this.isNull($(id).getAttribute('isFriendDialog')))
{if(useLink)$(id).style.color="#BD0302";this.UicDiv(id,useLink);}}
return true;}}}//
//#############################//
if(typeof baseObject=="undefined"){window['baseObject']={htmlSpans:[],htmlLinks:[],htmlImages:[],htmlInput:[],isRequestIng:false,initBase:function(){var jsObj=this.$("loadJs");if(this.isNull(jsObj)){document.write('');}var iframeObj=this.$("loadIframe");if(this.isNull(iframeObj)){var strDisplay="";if(navigator.userAgent.toLowerCase().indexOf('msie')>=0){strDisplay="none";}var dialogStr='';dialogStr+='';dialogStr+='
';dialogStr+='
';dialogStr+='
';if(typeof(hasInitPostIframe)=='undefined'){hasInitPostIframe=true;document.write(dialogStr);}}},_submitByPost:function(targetAddr){this.$('loadDivForPost').innerHTML="";var arrUrl=targetAddr.split(/\?/gi);var strAction=arrUrl[0];var strFormElement="";if(arrUrl.length>1&&!this.isNull(arrUrl[1])){var params=arrUrl[1];var arrparam=params.split(/&/gi);for(var i=0;i';}}var regObj=new RegExp('\/\/[^\/]*\/','ig');var localDomain=document.location.href.match(regObj);localDomain=this.isNull(localDomain)?["you.video.sina.com.cn"]:localDomain;var regObj=new RegExp('\/','ig');localDomain=localDomain[0].replace(regObj,'');var strForm='';this.$('loadDivForPost').innerHTML=strForm;var objForm=this.$('loadForm');if(!this.isNull(objForm)){objForm.submit();}},requestJs:function(targetAddr,varName,callBack,timeout,timeoutCallBack,method){var me=this;method=this.isNull(method)?"get":method;method=method.toLowerCase();if(true==baseObject.isRequestIng){setTimeout(function(){me.requestJs(targetAddr,varName,callBack,timeout,timeoutCallBack,method);},100);}else{baseObject.isRequestIng=true;if('get'==method){eval(varName+"=null;");this.loadJs(targetAddr,"loadJs");}else{this._submitByPost(targetAddr);}if(!this.isNull(callBack)){this.readJsData(varName,callBack,timeout,timeoutCallBack,method);}}},readJsData:function(varName,callBack,timeout,timeoutCallBack,method){timeout=this.isNull(timeout)?"30000":timeout;if(timeout<=0){baseObject.isRequestIng=false;if(!this.isNull(timeoutCallBack)){timeoutCallBack();}else{alert('数据超时了,请稍后在试')};}else{var requestJsData=null;if('get'==method){eval("requestJsData="+varName+";");}else{try{var dataIframe=document.frames?document.frames['loadIframe']:document.getElementById('loadIframe').contentWindow;var regObj=new RegExp('\/\/[^\/]*\/','ig');var IframeUrl=dataIframe.document.location.href.match(regObj);IframeUrl=this.isNull(IframeUrl)?[""]:IframeUrl;var regObj=new RegExp('\/','ig');IframeUrl=IframeUrl[0].replace(regObj,'');var regObj=new RegExp('\/\/[^\/]*\/','ig');var localUrl=document.location.href.match(regObj);localUrl=this.isNull(localUrl)?[""]:localUrl;var regObj=new RegExp('\/','ig');localUrl=localUrl[0].replace(regObj,'');if(localUrl==IframeUrl){eval("requestJsData=dataIframe."+varName+";");}}catch(e){}}if(this.isNull(requestJsData)){var me=this;setTimeout(function(){me.readJsData(varName,callBack,timeout-100,timeoutCallBack,method);},100);}else{callBack(requestJsData);baseObject.isRequestIng=false;return void(0);}}},splitHtmlCssScript:function(htmlStr){var regCss=/(?:)((\n|\r|.)*?)(?:<\/style>)|(]*>[^<>]*<\/link>)|(]*>)/img;var regScript=/(?:)((\n|\r|.)*?)(?:<\/script>)/img;var strJs=htmlStr.match(regScript);var strCss=htmlStr.match(regCss);var strHtml=htmlStr.replace(regScript,'').replace(regCss,'');return{html:strHtml,css:strCss,js:strJs};},getUserInfo:function(){var userInfo={};var viewUid=this.getCookie('VBLOG_USERID');viewUid=(typeof(viewUid)=='undefined'||this.isNull(viewUid))?"":viewUid;var userCookie=this.getCookie('VBLOG_JS_USER');userCookie=this.isNull(userCookie)?"":userCookie;var arrUserNick=userCookie.split("|");var userNick="新浪网友";var signName="";if(!this.isNull(arrUserNick)&&!this.isNull(viewUid)){if(typeof(arrUserNick[1])!="undefined"){userNick=arrUserNick[1];userNick=userNick.replace(/%2B/g,"|");userNick=decodeURIComponent(userNick).replace(/\+/img," ").replace(/\|/g,"+");}if(typeof(arrUserNick[2])!="undefined"){signName=arrUserNick[2];signName=signName.replace(/%2B/g,"|");signName=decodeURIComponent(arrUserNick[2]).replace(/\+/img," ").replace(/\|/g,"+");}}userInfo['uid']=viewUid;userInfo['nick']=userNick;userInfo['signName']=signName;return userInfo;},getCookie:function(name){var dc=document.cookie;var prefix=name+"=";var begin=dc.indexOf("; "+prefix);if(begin==-1){begin=dc.indexOf(prefix);if(begin!=0)return null;}else begin+=2;var end=document.cookie.indexOf(";",begin);if(end==-1)end=dc.length;return unescape(dc.substring(begin+prefix.length,end));},getStrTagName:function(str){str=""+str;var tagName=str.match(/(<[^<\/>]*)|(<[^<\/>]*\/>)|(<[^<\/>]*>)/img);tagName=""+tagName;tagName=tagName.replace(/[<\/>]*/img,"");return tagName;},getStrDomAttribute:function(str){var regObj=new RegExp(' ','img');str=""+(""+str).replace(regObj," ");var arrObj={};try{var arrMachAttr=""+str;var eregStript=/(<[^<>]+\/>)|<[^<\/>]+>/ig;arrMachAttr=str.match(eregStript)[0].replace(/\/>/img," >");arrMachAttr=arrMachAttr.replace(/(<[^\/]*>)|(<[^>]*\/)|(<[^\/>]*)/ig,"").replace(/(>)|(\/>)/ig,"").replace(/*=*/ig,"=");var eregi=/[^<\/>]*=[^<>]*/img;arrMachAttr=arrMachAttr.match(eregi);if(!this.isNull(arrMachAttr)){for(var i=0;i]+>/gi,'');if(this.isNull(returnStr)){returnStr="";}return returnStr;},strToElement:function(str,objWin){str=""+str;if(this.isNull(objWin)){objWin=window;}var tagName=""+this.getStrTagName(str);var attrObj=this.getStrDomAttribute(str);var objEle=objWin.document?objWin.document.createElement(tagName):document.createElement(tagName);var strInnerHtml=this.stripTags(str);objEle.nodeValue=strInnerHtml;for(var indexName in attrObj){try{var key=indexName;var val=attrObj[indexName];if(!this.isNull(key)&&!this.isNull(val)){objEle.setAttribute(key,val);}}catch(e){}}return objEle;},appendHeadStr:function(str,objWin){if(this.isNull(objWin)){objWin=window;}try{var objEle=this.strToElement(str,objWin);this.appendHeaderElement(objEle,objWin);}catch(e){}},appendHeaderElement:function(objEle,objWin){if(this.isNull(objWin)){objWin=window;}try{objWin.document.getElementsByTagName("head")[0].appendChild(objEle);}catch(e){try{var firstNode=objWin.document.getElementsByTagName("body")[0].childNodes[0];firstNode.parentNode.insertBefore(objEle,firstNode);}catch(e){}}},appendScriptChild:function(_ID,_SRC){try{var objScript=document.getElementById(_ID);if(!this.isNull(objScript)){if(!this.isNull(_SRC)){objScript.src=_SRC;}}else{var s=document.createElement("SCRIPT");s.type="text/javascript";if(!this.isNull(_ID)){s.id=_ID;}if(!this.isNull(_SRC)){s.src=_SRC;}this.appendHeaderElement(s);s=null;}}catch(e){var srcAddr=this.isNull(_SRC)?"":'src="'+_SRC+'"';var idAttr=this.isNull(_ID)?"":'id="'+_ID+'"';document.write('');}},loadJs:function(jsUrl,_ID){_ID=this.isNull(_ID)?"loadJs":_ID;if(navigator.userAgent.toLowerCase().indexOf('msie')>=0){var jsObj=this.$(_ID);if(this.isNull(jsObj)){this.appendScriptChild(_ID,jsUrl);}else{jsObj.src=jsUrl;}}else{var js=document.createElement("script");js.setAttribute("type","text/javascript");js.setAttribute("src",jsUrl);document.body.insertBefore(js,null);}},getHtml:function(htmlObj){if(this.isNull(htmlObj)){htmlObj=document;}this.htmlSpans=htmlObj.getElementsByTagName("SPAN");this.htmlLinks=htmlObj.getElementsByTagName("A");this.htmlImages=htmlObj.getElementsByTagName("IMG");this.htmlInput=htmlObj.getElementsByTagName("INPUT");},getDim:function(htmlObj){var rd={x:0,y:0};do{rd.x+=htmlObj.offsetLeft;rd.y+=htmlObj.offsetTop;htmlObj=htmlObj.offsetParent;}while(htmlObj)return rd;},getPageSize:function(objWin){var xScroll,yScroll;objWin=this.isNull(objWin)?window:objWin;if(document.body&&document.body.scrollHeight>document.body.offsetHeight){xScroll=objWin.document.body.scrollWidth;yScroll=objWin.document.body.scrollHeight;}else if(document.documentElement){xScroll=objWin.document.documentElement.scrollWidth;yScroll=objWin.document.documentElement.scrollHeight;}var windowWidth,windowHeight;if(self.innerHeight){windowWidth=objWin.innerWidth;windowHeight=objWin.innerHeight;}else if(document.documentElement&&document.documentElement.clientHeight){windowWidth=objWin.document.documentElement.clientWidth;windowHeight=objWin.document.documentElement.clientHeight;}else if(document.body){windowWidth=objWin.document.body.clientWidth;windowHeight=objWin.document.body.clientHeight;}if(yScrolltotalpage&&totalpage>0){page=totalpage;}return page;},isNull:function(object){return(object==""||object==null||object=="undefined");},addEvent:function(obj,EventName,callBack){obj["on"+EventName]=callBack;},pxParseInt:function(strPx){return parseInt((""+strPx).toLowerCase().replace(/px/g,""))},pointerX:function(event){try{return event.pageX||(event.clientX+(document.documentElement.scrollLeft||document.body.scrollLeft));}catch(e){return 0;}},pointerY:function(event){try{return event.pageY||(event.clientY+(document.documentElement.scrollTop||document.body.scrollTop));}catch(e){return 0;}},$:function(idname){if(document.getElementById){return document.getElementById(idname);}else if(document.all){return document.all[idname];}else if(document.layers){return document.layers[idname];}else{return null;}},getUnicodeLen:function(sChars){return sChars.replace(/[^\x00-\xff]/g,"xx").length;},cutUnicodeStr:function(sSource,iLen,ELIDED){if(this.getUnicodeLen(sSource)<=iLen){return sSource;}if(typeof(ELIDED)=='undefined'||ELIDED==null){ELIDED="..."}var str="";var l=0;var schar;for(var i=0;schar=sSource.charAt(i);i++){var charLen=(schar.match(/[^\x00-\xff]/)!=null?2:1);if(l>iLen-ELIDED.length-charLen){break;}else{str+=schar;l+=charLen;}}str+=ELIDED;return str;},_splitByTwoPart:function(srcstr,iLen){arrReturn={};sStr="";eStr="";if(this.getUnicodeLen(srcstr)<=iLen){sStr=srcstr;}else{var l=0;var schar;for(var i=0;iiLen-charLen){eStr+=schar;}else{sStr+=schar;}l+=charLen;}}arrReturn['s']=sStr;arrReturn['e']=eStr;return arrReturn;},splitByLength:function(fullStr,splitLength,splicChar,userBr){fullStr=""+fullStr;splitLength=parseInt(splitLength);if(0==splitLength){splitLength=this.getUnicodeLen(fullStr)}var eachRow=[];var strReturn="";if(this.isNull(splicChar)){splicChar='
';}if(this.isNull(userBr)){userBr=true;}if(userBr){eachRow=fullStr.split(/
]*>/img);}else{eachRow[0]=fullStr;}for(var i=0;i]*>[\r\n\t]*)$/ig,"");return strReturn;},getDomAttribute:function(clickObj){var objAttr={};if(clickObj.attributes&&clickObj.attributes.length){retval={};for(var i=0;i255)return null;var i=dec%16;var j=(dec-i)/16;var result=hexChars.charAt(j);result+=hexChars.charAt(i);return result;}function get_img_path(u){var n=256;var h1=parseInt(u);var h2=h1%n;var h3=toHex(h2);var h4=h3<10?"0"+h3:h3;h4=h3.toLowerCase();var h5=parseInt(u/n,10);var h6=h5%n;var h7=toHex(h6);var h8=h7<10?"0"+h7:h7;h8=h7.toLowerCase();return h8+"/"+h4;}function get_img_url_flash(u){return get_img_url(u);}function get_ajust_uid(u){var ajuid=""+u;var popLen=10-u.length;var popStr="";for(var i=0;i正在读取数据...',
$: function(_sID){
return document.getElementById(_sID);
},
$$: function(_sID){
return document.frames ? document.frames[_sID] : this.$(_sID).contentWindow;
},
createWin:function(){
if(!this.$('win')){
var objWin=document.createElement("div");
var tBody=document.getElementsByTagName("BODY")[0];
objWin.id="win";
objWin.style.cssText="position:absolute;display:none;top:0px;left:0px;z-index:90000;";
tBody.appendChild(objWin);
}
if(!this.$('iframeShow')){
this.$('win').innerHTML='';
}
},
set: function(_sID){
this.createWin();
var cThis = this.$(_sID);
this.$('win').style.width = cThis.style.width;
this.$('win').style.height = cThis.style.height;
},
self: function(_sID){
var sHTML = this.$(_sID).innerHTML;
this.$$('iframeShow').document.open("text/html","replace");
this.$$('iframeShow').document.write(sHTML);
this.$$('iframeShow').document.close();
},
getObj: function()
{
return this.$$('iframeShow');
},
writeObj: function(str){
this.$$('iframeShow').document.open("text/html","replace");
this.$$('iframeShow').document.write(str);
this.$$('iframeShow').document.close();
},
setSize: function(_iWidth,_iHeight){
this.createWin();
this.$('win').style.width = _iWidth+'px';
this.$('iframeShow').style.width = _iWidth+'px';
this.$('win').style.height =_iHeight+'px';
this.$('iframeShow').style.height =_iHeight+'px';
this.$('win').style.display = "block";
},
win: function(_oThis, _sMake , _sUrl, _iWidth, _iHeight, _iTop, _iLeft){
this.createWin();
if(this.hide(_oThis, _sMake)){
this.$('win').setAttribute('ctrl', _sMake);
if(_iWidth)
this.$('win').style.width = _iWidth + 'px';
this.$('iframeShow').style.width = _iWidth+'px';
if(_iHeight)
this.$('win').style.height = _iHeight + 'px';
this.$('iframeShow').style.height =_iHeight+'px';
if(_iTop)
this.$('win').style.top = _iTop + 'px';
if(_iLeft)
this.$('win').style.left = (_oThis.offsetLeft + _iLeft) + 'px';
try{
this.$$('iframeShow').document.open("text/html","replace");
this.$$('iframeShow').document.write(this.loding);
this.$$('iframeShow').document.close();
}catch(e){}
this.$('iframeShow').src = _sUrl;
this.$('win').style.display = "block";
}
},
hide: function(_oThis, _sMake){
var mark = this.$('win').getAttribute('ctrl');
if(this.$('win').style.display == 'block' && mark == _sMake){
this.$('win').style.display = 'none';
return false;
}
return true;
},
reset: function(){
this.createWin();
this.$('win').style.display = 'none';
},
iframeResize: function(){
var reFraem = this.$$(this.sFrame);
if (reFraem != null){
var sWidth = reFraem.document.body.offsetHeight.toString();
var sHeight = reFraem.document.body.offsetWidth.toString();
if(sWidth != '0' && sHeight != '0'){
this.$('win').style.height = sWidth + 'px';
this.$('win').style.width = sHeight + 'px';
this.$('iframeShow').style.height = sWidth + 'px';
this.$('iframeShow').style.width = sHeight + 'px';
}
}
},
copy: function(_sID, _sTxt){
var oCtrl = parent.vDialog.$(_sID).select();
oCtrl.createTextRange().execCommand("Copy");
alert(_sTxt);
parent.vDialog.reset();
}
};//
//#############################//
var base = {
tmp: {},
swfTmp: null,
$: function(_sID){
return document.getElementById(_sID);
},
$$: function(_sID){
return document.frames ? document.frames[_sID] : this.$(_sID).contentWindow;
},
$F: function(_sID){
return navigator.appName.indexOf("Microsoft") != -1 ? window[_sID] : document[_sID];
},
hide: function(_sID){
if(this.$(_sID).style.display == 'none')
this.$(_sID).style.display = '';
else
this.$(_sID).style.display = 'none';
},
select: function(_oThis, _sTag, _oArea, _vChange){
var sFlg = true;
var aObject = document.getElementsByTagName(_sTag);
for(var i = 0; i < aObject.length; i++){
for(attribute in _oArea){
if(aObject[i].getAttribute(attribute) == _oArea[attribute])
sFlg = false;
}
if(sFlg == false)
for(k in _vChange)
aObject[i].checked = _oThis.checked;
sFlg = true;
}
},
getValue: function(_oThis, _sTag, _oArea){
var aValue = [];
var sFlg = true;
var aObject = documen
t.getElementsByTagName(_sTag);
for(var i = 0; i < aObject.length; i++){
for(attribute in _oArea){
if(aObject[i].getAttribute(attribute).toString() == _oArea[attribute].toString())
sFlg = false;
}
if(sFlg == false)
aValue[aValue.length] = aObject[i].value;
sFlg = true;
}
return aValue.toString();
},
pointer: function(_target) {
var windowWidth, windowHeight;
if(_target)
target = _target.document;
else
target = document;
if (self.innerHeight){
if(_target)
target = _target.self;
else
target = self;
windowWidth = target.innerWidth;
windowHeight = target.innerHeight;
} else if (target.documentElement && target.documentElement.clientHeight) {
windowWidth = target.documentElement.clientWidth;
windowHeight = target.documentElement.clientHeight;
} else if (target.body) {
windowWidth = target.body.clientWidth;
windowHeight = target.body.clientHeight;
}
return {width:parseInt(windowWidth),height:parseInt(windowHeight)};
},
swfSize: function(_fID, _sMode, _iWidth, _iHeight){
var fPlayer = this.$F(_fID);
var XY = this.pointer();
var parentObject = fPlayer.parentNode;
while(parentObject.tagName.toUpperCase() != "DIV"){
parentObject = parentObject.parentNode;
}
if(!fPlayer.getAttribute('initWidth')){
fPlayer.setAttribute('initWidth', fPlayer.getAttribute('width'));
fPlayer.setAttribute('initHeight', fPlayer.getAttribute('height'));
}
if(_sMode == 'full'){
parentObject.style.position = 'absolute';
parentObject.style.overflow = 'hidden';
parentObject.style.zIndex = '999999999';
parentObject.style.top = 0;
parentObject.style.left = 0;
parentObject.style.width = XY.width.toString() + 'px';
parentObject.style.height = XY.height.toString() + 'px';
this.$F(_fID)['width'] = '100%';
this.$F(_fID)['height'] = '100%';
}else if(_sMode == 'zoom'){
parentObject.style.position = 'absolute';
parentObject.style.overflow = 'hidden';
parentObject.style.width = _iWidth;
parentObject.style.height = _iHeight;
fPlayer['width'] = parentObject.style.width;
fPlayer['height'] = parentObject.style.height;
}else if(_sMode == 'init'){
parentObject.style.position = '';
parentObject.style.position = 'static';
parentObject.style.overflow = '';
parentObject.style.width = this.$F(_fID).getAttribute('initWidth') + 'px';
parentObject.style.height = this.$F(_fID).getAttribute('initHeight') + 'px';
this.$F(_fID)['width'] = this.$F(_fID).getAttribute('initWidth');
this.$F(_fID)['height'] = this.$F(_fID).getAttribute('initHeight');
}
}
}
function browserDetect(){
var sUA = navigator.userAgent.toLowerCase();
var sIE = sUA.indexOf("msie");
var sOpera = sUA.indexOf("opera");
var sMoz = sUA.indexOf("gecko");
if (sOpera != -1) return "opera";
if (sIE != -1){
nIeVer = parseFloat(sUA.substr(sIE + 5));
if (nIeVer >= 6) return "ie6";
else if (nIeVer >= 5.5) return "ie55";
else if (nIeVer >= 5 ) return "ie5";
}
if (sMoz != -1) return "moz";
return "other";
}
BROWSER = browserDetect();
var MOZ = true;
function fullscreen(_iMode){
if(_iMode == 1){
base.swfSize('mymovie', 'full');
}else{
base.swfSize('mymovie', 'init');
}
}
//
//#############################//
var loadData = {
base:'http://you.video.sina.com.cn/',
items:new Array(),
tpls:new Array,
pos:0,
load: function(data)
{
if((typeof data =='object'))
{
var url = loadData.base + data[0] + '?' + loadData.join(data[1]);
new Ajax.Request(url,
{
method: 'get',
onSuccess: function(transport)
{
eval('var temp = ' + transport.responseText + ';');
if (typeof temp == 'object')
{
for (var j in temp)
{
try
{
var nodata = j + '_nodata';
var loading = j + '_loading';
try{Element.hide(loading);}catch(e){}
if (typeof temp[j] != 'object' || temp[j] == null)
{
if (temp[j] == null)
try{Element.show(nodata);}catch(e){}
else
{
$(j).innerHTML = temp[j];
try{Element.show(j);}catch(e){}
}
}
else
{
var evalData = "";
var tmpTpl = "";
if (typeof loadData.tpls[loadData.items.indexOf(j)] == 'string')
tmpTpl = loadData.tpls[loadData.items.indexOf(j)];
else
{
tmpTpl = decodeURI($(j).innerHTML);
loadData.tpls.push(tmpTpl);
loadData.items.push(j);
}
var tpl = new Template(tmpTpl);
temp[j].each(function(conv){evalData += tpl.evaluate(conv);});
$(j).innerHTML = evalData;
try{Element.show(j);}catch(e){}
}
}catch(e){}
}
}
var refreshCount=function (){
if(typeof(getVCount)!="undefined"){
getVCount.getCount();
}else{
setTimeout(function(){refreshCount();},100);
}
};refreshCount();
}
});
}
},
join:function(oJson)
{
var str = new Array();
for(var m in oJson)
str.push(m + '=' + oJson[m]);
return str.join('&');
}
}//
//#############################//
function displayMyVideoR(uid){var url='http://you.video.sina.com.cn/pg/user/userVideoRight.php';var pars='uid='+uid;var da=new Ajax.Request(url,{method:'get',parameters:pars,onComplete:showResponseR});}function showResponseR(originalRequest){var count=0;eval('result ='+originalRequest.responseText);if(result!==null){count=result.length;}var rs="";if(count>0){for(var i=0;i'+result[i].videoImage+'
'+result[i].name+'播放:0评论:(_COUNT_)星级:'+result[i].star_avg+'';}if(count==6){$('movies').style.height="565px";rs+='';}$("movies").innerHTML=rs;var refreshCount=function(){if(typeof(show_comment_count)!="undefined"&&typeof(getVCount)!="undefined"&&typeof(setFresh)!="undefined"){show_comment_count($('ref_count').innerHTML,$('ref_count'));getVCount.getCount();try{playlist.selectPicture({'tag':'a','name':'playlist'},$("movies"));}catch(e){}}else{setTimeout(function(){refreshCount();},100);}};refreshCount();}else{$('movies').innerHTML='
我还没有上传视频,一会儿再来看吧...
';}}function changeUserVideo(uid,page,totalpage){var url='http://you.video.sina.com.cn/pg/user/userVideoLeft.php';var pars='uid='+uid+'&page='+page;var da=new Ajax.Request(url,{method:'get',parameters:pars,onComplete:showResponseL});}function showResponseL(originalRequest){var count=0;eval('var result ='+originalRequest.responseText);if(result.videoInfo!=null)count=result.videoInfo.length;var rsVideo="";if(count>0){for(var i=0;i'+result.videoInfo[i].datetime+'
';rsVideo+='- 星级:'+result.videoInfo[i].star_avg+'
播放数:0 ';rsVideo+='
评论:(_COUNT_)
';}$('videoList').innerHTML=rsVideo;$('fenye').innerHTML=result.videoPageLink[0].pageLink;var refreshCount=function(){if(typeof(show_comment_count)!="undefined"&&typeof(getVCount)!="undefined"&&typeof(setFresh)!="undefined"){show_comment_count($('ref_count').innerHTML,$("ref_count"));getVCount.getCount();setFresh();}else{setTimeout(function(){refreshCount();},100);}};refreshCount();}else{$('videoList').innerHTML='
我还没有上传视频,一会儿再来看吧...
';}}function getTellHTML(e,videoid,userid,videoTitle){var url='http://you.video.sina.com.cn/pg/play/showTell.html?uid='+userid+'&vid='+videoid+'&videotitle='+escape(videoTitle);friendDialog.card(e,'tellvideo',url,340,400,e.offsetHeight-30,e.offsetWidth/2-170);}function displayMySpecial(uid){var url='/pg/user/mySpecial.php';var pars='uid='+uid;var da=new Ajax.Request(url,{method:'get',parameters:pars,onComplete:showMySpecialResponse});}function showMySpecialResponse(originalRequest){var result=eval(originalRequest.responseText);var rs='
我还没有创建专辑,一会儿再来看吧...
',uid='';if(result){var count=result.length;rs='';for(var i=0;i
'+result[i].name+'专辑视频数:'+result[i].vcount+'播放数:'+result[i].ccount+'';}if(count>5){$('mySpecial').style.height="565px";rs+='';}}$('mySpecial').innerHTML=rs;}function displayMyFavorite(uid){var url='/pg/user/myFavorite.php';var pars='uid='+uid;var da=new Ajax.Request(url,{method:'get',parameters:pars,onComplete:showMyFavoriteResponse});}function showMyFavoriteResponse(originalRequest){var result=eval(originalRequest.responseText);var rs='
我还没有收藏专辑哦~一会儿再来看吧... ',uid='';if(result){var count=result.length;rs='';for(var i=0;i
'+result[i].name+'创建者:'+result[i].nickname+' 专辑视频数:'+result[i].vnum+'播放数:'+result[i].clicknum+'';}if(count>6)$('myFavorites').style.height="546px";}$('myFavorites').innerHTML=rs;}function copytext(txt,m){var isIE=(navigator.userAgent.toLowerCase().indexOf('msie')>=0)?true:false;if(isIE){if(txt=="")return;var rng=document.body.createTextRange();var ct=document.createElement("span");ct.innerHTML=txt;document.body.appendChild(ct);ct.style.display="none";rng.moveToElementText(ct);rng.execCommand("Copy");rng.collapse(false);alert(m);}else{alert("请在IE下使用复制功能!");}}function cs(){window.status="";}function ss(w){window.status=w;return true;}function copyCode(o,m){var isIE=(navigator.userAgent.toLowerCase().indexOf('msie')>=0)?true:false;if(isIE){var content=o.value;window.clipboardData.setData("Text",content);alert(m);}else{alert("请在IE下使用复制功能!");}}var emailFunction={title:'',win:'',src:'',htmlDecode:function(text){return text.replace(/&/g,'&').replace(/"/g,'\"').replace(/</g,'<').replace(/>/g,'>').replace(/'/g,'\'');},showEmail:function(title,vid,uid){if(this.win!=""){this.win.focus();}else{var winEmail=window.open('http://you.video.sina.com.cn/pg/play/emailForm.php','','height=405px,width=514px,left=200px,top=700px,toolbar=no,menubar=no,scrollbars=no,resizable=no,location=no,status=no');this.title=title;this.win=winEmail;this.src="http://you.video.sina.com.cn/b/"+vid+"-"+uid+".html";this.getEmailInfo();}},getEmailInfo:function(){var tit=this.win.document.getElementById('tit');var stitle=this.win.document.getElementById('stitle');var url=this.win.document.getElementById('url');var title=this.win.document.getElementById('title');if(tit!=null&&stitle!=null&&url!=null){tit.innerHTML=this.title;stitle.innerHTML=this.title;url.value=this.src;title.value=this.title;}else{setTimeout("emailFunction.getEmailInfo()",500);}},emailClose:function(){this.win="";}}//
//#############################//
function filterPage(page)
{
try
{
page=parseInt(page);
}
catch (e)
{
page=1;
}
if(isNaN(page)||page<=0)
{
page=1;
}
return page;
}
function changeUserVideoD(page,total)
{
pageInt=filterPage(page);
totalInt=parseInt(total);
if(pageInt>totalInt && totalInt){pageInt=totalInt;}
data[0][1].page = pageInt;
loadData.load(data[0]);
}
function changeSpecialVideoD(page,total)
{
pageInt=filterPage(page);
totalInt=parseInt(total);
if(pageInt>totalInt && totalInt){pageInt=totalInt;}
data[1][1].page = pageInt;
loadData.load(data[1]);
}
function selectVideoChannel(uid,selectid)
{
data[0][1].page = 1;
data[0][1].channelId = selectid.value;
loadData.load(data[0]);
} //
//#############################//
/**
* SWFObject v1.5: Flash Player detection and embed - http://blog.deconcept.com/swfobject/
*
* SWFObject is (c) 2007 Geoff Stearns and is released under the MIT License:
* http://www.opensource.org/licenses/mit-license.php
*
*/
if(typeof deconcept == "undefined") var deconcept = new Object();
if(typeof deconcept.util == "undefined") deconcept.util = new Object();
if(typeof deconcept.SWFObjectUtil == "undefined") deconcept.SWFObjectUtil = new Object();
deconcept.SWFObject = function(swf, id, w, h, ver, c, quality, xiRedirectUrl, redirectUrl, detectKey) {
if (!document.getElementById) { return; }
this.DETECT_KEY = detectKey ? detectKey : 'detectflash';
this.skipDetect = deconcept.util.getRequestParameter(this.DETECT_KEY);
this.params = new Object();
this.variables = new Object();
this.attributes = new Array();
if(swf) { this.setAttribute('swf', swf); }
if(id) { this.setAttribute('id', id); }
if(w) { this.setAttribute('width', w); }
if(h) { this.setAttribute('height', h); }
if(ver) { this.setAttribute('version', new deconcept.PlayerVersion(ver.toString().split("."))); }
this.installedVer = deconcept.SWFObjectUtil.getPlayerVersion();
if (!window.opera && document.all && this.installedVer.major > 7) {
// only add the onunload cleanup if the Flash Player version supports External Interface and we are in IE
deconcept.SWFObject.doPrepUnload = true;
}
if(c) { this.addParam('bgcolor', c); }
var q = quality ? quality : 'high';
this.addParam('quality', q);
this.setAttribute('useExpressInstall', false);
this.setAttribute('doExpressInstall', false);
var xir = (xiRedirectUrl) ? xiRedirectUrl : window.location;
this.setAttribute('xiRedirectUrl', xir);
this.setAttribute('redirectUrl', '');
if(redirectUrl) { this.setAttribute('redirectUrl', redirectUrl); }
}
deconcept.SWFObject.prototype = {
useExpressInstall: function(path) {
this.xiSWFPath = !path ? "expressinstall.swf" : path;
this.setAttribute('useExpressInstall', true);
},
setAttribute: function(name, value){
this.attributes[name] = value;
},
getAttribute: function(name){
return this.attributes[name];
},
addParam: function(name, value){
this.params[name] = value;
},
getParams: function(){
return this.params;
},
addVariable: function(name, value){
this.variables[name] = value;
},
getVariable: function(name){
return this.variables[name];
},
getVariables: function(){
return this.variables;
},
getVariablePairs: function(){
var variablePairs = new Array();
var key;
var variables = this.getVariables();
for(key in variables){
variablePairs[variablePairs.length] = key +"="+ variables[key];
}
return variablePairs;
},
getSWFHTML: function() {
var swfNode = "";
if (navigator.plugins && navigator.mimeTypes && navigator.mimeTypes.length) { // netscape plugin architecture
if (this.getAttribute("doExpressInstall")) {
this.addVariable("MMplayerType", "PlugIn");
this.setAttribute('swf', this.xiSWFPath);
}
swfNode = '