//显示FLASH播放器
function showFlash(exp)
{
exp=typeof(exp)=="undefined"?60000:exp;
var oFlashDiv=document.getElementById("flash");
if(typeof(SWFObject)!="undefined"&&oFlashDiv){
var strVideo=oFlashDiv.getAttribute('video');
if(strVideo)
{
var objFlash = new SWFObject("http://p.you.video.sina.com.cn/swf/player.swf", "mymovie",oFlashDiv.getAttribute('fwidth'), oFlashDiv.getAttribute('fheigh'), "7", "#ffffff");
objFlash.addParam("allowFullScreen", "true");
objFlash.addParam("allowScriptAccess", "always");
objFlash.addParam("quality", "high");
objFlash.addVariable("vid", oFlashDiv.getAttribute('video'));
objFlash.addVariable("auto", "1");
objFlash.addVariable("vblog", "1");
objFlash.addVariable("type", "0");
objFlash.addVariable("tabad", 1);
if("1"==oFlashDiv.getAttribute('fullScreen'))
{
objFlash.addVariable("realfull", "0");
objFlash.addVariable("initfull", "1");
}
objFlash.write("flash");
}
}else{
if(exp>0)
{
setTimeout(function(){showFlash(exp-100);},100);
}
}
};showFlash();
//
//#############################//
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;i= 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');
}
}
//
//#############################//
// 功能栏处理
function switchShow(_oThis, _sShow){
// 切换显示
Element.toggle(_sShow);
// 切换样式表
_oThis.className = _oThis.className == 'right1' ? 'right' : 'right1' ;
}
// 分栏处理
function switchTab(sTab1, sTab2, sShow1, sShow2){
var Text1 = $(sTab1).innerText ? $(sTab1).innerText : $(sTab1).textContent;
var Text2 = $(sTab2).innerText ? $(sTab2).innerText : $(sTab2).textContent;
$(sTab1).innerHTML = '' + Text1 + '
';
$(sTab2).innerHTML = '' + Text2 + '';
Element.show(sShow1);
Element.hide(sShow2);
}//
//#############################//
function $(_sID){return document.getElementById(_sID);}function $$(_sID){return document.frames?document.frames[_sID]:$(_sID).contentWindow;}function $$$(objId){return vDialog.getObj().document.getElementById(objId);}function htmlCheck(obj){if(obj.value=="和大家一起写下您对该视频的评论吧!"){obj.innerHTML="";}}var ObjTimeOut="";function hideIframe(){pauseHideIframe();ObjTimeOut=setTimeout(_hideIframe,2000);}function _hideIframe(){}function pauseHideIframe(){if(""!=ObjTimeOut){clearTimeout(ObjTimeOut);}ObjTimeOut="";}function setIframeSize(ifWidth,ifHeight){vDialog.setSize(ifWidth,ifHeight);}function getConfrmStr(strMsg){var confirmDialog="";confirmDialog+="";confirmDialog+="";confirmDialog+="";confirmDialog+="";confirmDialog+="";confirmDialog+="播客提示";confirmDialog+="";confirmDialog+="";confirmDialog+="";confirmDialog+="";confirmDialog+="
";confirmDialog+="
";confirmDialog+="
温馨提示
";confirmDialog+="
";confirmDialog+="
";confirmDialog+="
";confirmDialog+=""+strMsg+"
";confirmDialog+=" ";confirmDialog+="
";confirmDialog+="
";confirmDialog+="
";confirmDialog+="
";confirmDialog+="";confirmDialog+="";return confirmDialog;}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);}var DelayedShow=new Array();function vv_addEvent(obj,EventName,callBack){if(obj.addEventListener){obj.addEventListener(EventName,callBack,false);}else if(obj.attachEvent){obj.attachEvent('on'+EventName,callBack);}else{obj["on"+EventName]=callBack;}}function displayUserOtherVideo(uid,vid){var url='http://you.video.sina.com.cn/pg/play/userOtherVideo.php';var pars='uid='+uid+'&vid='+vid;var da=new Ajax.Request(url,{method:'get',parameters:pars,onComplete:showUserOtherVideoResponse});}DelayedShow["ov"]=new Array();DelayedShow["ov"]["flag"]=false;DelayedShow["ov"]["num"]=4;DelayedShow["ov"]["img"]=Array();function showUserOtherVideoResponse(originalRequest){eval('result='+originalRequest.responseText);var userCount=result.count;var listArr=result.list;if(listArr&&listArr.length>0){var _count=listArr.length;var uid=location.href.substring(location.href.indexOf('-')+1,location.href.indexOf('.html'));var rs="";var ov_src="";for(var i=0;i<_count;i++){ov_src=i
'+listArr[i]['name']+'播放:0评论:(_COUNT_)';}var obj=$("userOtherVideoList");obj.innerHTML=rs;vv_addEvent($("userOtherVideoList"),"scroll",function(){performDelayLoad("ov");});var refreshCount=function(){if(typeof(show_comment_count)!="undefined"&&typeof(getVCount)!="undefined"){show_comment_count(obj.innerHTML,obj);getVCount.getCount();try{playlist.selectPicture({'tag':'a','name':'playlist'},obj);}catch(e){}}else{setTimeout(function(){refreshCount();},100);}};refreshCount();var moreHTML='';if(_count查看播主全部视频 >>';}$('userOtherVideoMore').innerHTML=moreHTML;}else{$('userOtherVideoList').innerHTML='
该播主还没上传其他视频,看看其他视频吧! ';$('userOtherVideoMore').style.display='none';}}function displayUserOtherSpecial(uid){var url='http://you.video.sina.com.cn/pg/play/userOtherSpecial.php';var pars='uid='+uid;var da=new Ajax.Request(url,{method:'get',parameters:pars,onComplete:showUserOtherSpecialResponse});}DelayedShow["os"]=new Array();DelayedShow["os"]["flag"]=false;DelayedShow["os"]["num"]=4;DelayedShow["os"]["img"]=Array();function showUserOtherSpecialResponse(originalRequest){eval('result='+originalRequest.responseText);var userCount=result.count;var listArr=result.list;if(listArr&&listArr.length>0){var count=listArr.length;var rs="";var uid=location.href.substring(location.href.indexOf('-')+1,location.href.indexOf('.html'));var os_src="";for(var i=0;i
'+listArr[i]['name']+'专辑视频数:'+listArr[i]['vcount']+'播放数:'+listArr[i]['ccount']+'';}$("userOtherSpecialList").innerHTML=rs;vv_addEvent($("userOtherSpecialList"),"scroll",function(){performDelayLoad("os");});var moreHTML='';if(count查看播主全部专辑 >>';}$('userOtherSpecialMore').innerHTML=moreHTML;}else{$('userOtherSpecialList').innerHTML='
我还没有创建专辑,一会儿再来看吧...
';$('userOtherSpecialMore').style.display='none';}}DelayedShow["rv"]=new Array();DelayedShow["rv"]["flag"]=false;DelayedShow["rv"]["num"]=4;DelayedShow["rv"]["img"]=Array();function showRelatVideoRes(originalRequest){eval('result='+originalRequest.responseText);if(typeof result=='object'){var rs="";var count=result.length;var rv_src="";for(var i=0;i ';rs+=' ';rs+='
';rs+=' ';rs+='
';rs+=' ';rs+=' ';rs+=' '+result[i].name+'';rs+=' ';rs+=' ';rs+=' 播放:'+result[i].view_count+'';rs+=' 评论:(_COUNT_)';rs+='';}$("videoRelatVideo").innerHTML=rs;vv_addEvent($("videoRelatVideo"),"scroll",function(){performDelayLoad("rv");});var refreshCount=function(){if(typeof(show_comment_count)!="undefined"){show_comment_count(rs,$("videoRelatVideo"));try{playlist.selectPicture({'tag':'a','name':'playlist'},$("videoRelatVideo"));}catch(e){}}else{setTimeout(function(){refreshCount();},100);}};refreshCount();}else{$('videoRelatVideo').innerHTML='
文案没定...
';}}function performDelayLoad(id){if(!DelayedShow[id]["flag"]){DelayedShow[id]["flag"]=true;var rv_idL=DelayedShow[id]["img"].length;for(var i=DelayedShow[id]["num"]-1;i=2){break;}}}strTag=strTag.replace(/(^\s+)|(\s+$)/,'');if(""==strTag){strTag=document.getElementById("strVName").value;}document.forms['relaSearch'].elements["key"].value=strTag;document.forms['relaSearch'].submit();}function showRelatVideoRes2(originalRequest,key){result=[];var tmp=originalRequest[key];for(var i=0;i ';rs+=' ';rs+='
';rs+=' ';rs+='
';rs+=' ';rs+=' ';rs+=' '+result[i].name+'';rs+=' ';rs+=' ';rs+=' 播放:'+result[i].view_count+'';rs+=' 评论:(_COUNT_)';rs+='';}$("videoRelatVideo").innerHTML=rs;vv_addEvent($("videoRelatVideo"),"scroll",function(){performDelayLoad("rv");});var refreshCount=function(){if(typeof(show_comment_count)!="undefined"){show_comment_count(rs,$("videoRelatVideo"));try{playlist.selectPicture({'tag':'a','name':'playlist'},$("videoRelatVideo"));}catch(e){}}else{setTimeout(function(){refreshCount();},100);}};refreshCount();}else{$('videoRelatVideo').innerHTML='
文案没定...
';}}DelayedShow["rs"]=new Array();DelayedShow["rs"]["flag"]=false;DelayedShow["rs"]["num"]=4;DelayedShow["rs"]["img"]=Array();function showRelatTopicRes(originalRequest){eval('result='+originalRequest.responseText);if(typeof result=='object'){var rs="",uid="";count=result.length;for(var i=0;i'+'
'+''+result[i].rela_topic_name+'专辑视频数:'+result[i].rela_topic_vcount+'播放数:'+result[i].rela_topic_ccount+'';}$("iSpecialList").innerHTML=rs;vv_addEvent($("iSpecialList"),"scroll",function(){performDelayLoad("rs");});}else{$('iSpecialList').innerHTML='
文案没定...
';}}function displayRelatTopic(vid,uid){var url='http://you.video.sina.com.cn/pg/play/relat_album.php';var pars='relatId='+parseInt(Math.random()*100);var da=new Ajax.Request(url,{method:'get',parameters:pars,onSuccess:showRelatTopicRes});}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="";}}
//
//#############################//
/**
* 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 = '