// //#############################// var 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='
';strForm+=strFormElement;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;setTimeout(function(){baseObject.isRequestIng=false;},timeoutCallBack);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');var count_text="";var vids=[];var keys="";var obj_show;var commCountList={getCommSpans:function(){var objSpans=obj_show.getElementsByTagName('SPAN');var commSpans=[];var k=0;for(j=0;j0){commSpans[j].style.display="";commSpans[j].innerHTML="0";}}},showCommCount:function(obj){count_text=obj.innerHTML;obj_show=obj;key_pattern=/vblog:([0-9]+):0/g;vids=count_text.match(key_pattern);if(vids!='undefined'&&vids!=null&&vids!=""&&vids.length>0){keys=vids.join(',');if(navigator.userAgent.toLowerCase().indexOf('msie')>=0){document.getElementById("COUNTER_FORIE").src=Q+keys;}else{var js=document.createElement("script");js.setAttribute("type","text/javascript");js.setAttribute("src",Q+keys);document.body.insertBefore(js,null);}}}};function counter_callback(){if(!document.getElementsByTagName){return false};commCountList.filterData(g_clist);commCountList.clearDefault();}function show_comment_count(data,obj){commCountList.showCommCount(obj);} // //#############################// 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'); } } // //#############################// // 功能栏处理 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); }// //#############################// /** * Copyright (C), 2007, Sina * * 最终播放页JS处理 * * 历 史: * <作者> <时间> <版本> <说明> * yannian 2007-03-16 1.0 创建模块 * * $Id$ */ function $(_sID) { return document.getElementById(_sID); } function $$(_sID) { return document.frames ? document.frames[_sID] : $(_sID).contentWindow; } function $$$(objId) { return vDialog.getObj().document.getElementById(objId); } //---控制弹出的IFRAME层的定时隐藏 function htmlCheck(obj) { if(obj.value == "和大家一起写下您对该视频的评论吧!"){ obj.innerHTML = "";} } var ObjTimeOut=""; function hideIframe() { pauseHideIframe(); ObjTimeOut=setTimeout(_hideIframe,2000); } function _hideIframe() { //vDialog.reset(); } 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-150, e.offsetWidth/2-170); } /*** *该用户其他视频 */ 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 }); } function showUserOtherVideoResponse(originalRequest) { eval('result='+originalRequest.responseText); if(result) { var _count=result.length; var uid= location.href.substring(location.href.indexOf('-') + 1,location.href.indexOf('.html')); var rs=""; for(var i=0;i<_count;i++){ rs+='
'+result[i]['name']+'
播放:0
评论:(_COUNT_)
'; } var obj = $("userOtherVideoList"); obj.innerHTML =rs; 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='
1-'+_count+'个视频
'; if(_count>15){moreHTML+='';} $('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 }); } function showUserOtherSpecialResponse(originalRequest) { eval('result='+originalRequest.responseText); if(result){ var count=result.length; var rs=""; var uid= location.href.substring(location.href.indexOf('-') + 1,location.href.indexOf('.html')); for(var i=0;i'+result[i]['name']+'
'+result[i]['name']+'
专辑视频数:'+result[i]['vcount']+'
播放数:'+result[i]['ccount']+'
'; } $("userOtherSpecialList").innerHTML =rs; var moreHTML='
1-'+count+'个专辑
'; if(count>15){moreHTML+='';} $('userOtherSpecialMore').innerHTML=moreHTML; }else{ $('userOtherSpecialList').innerHTML = '
我还没有创建专辑,一会儿再来看吧...
'; $('userOtherSpecialMore').style.display='none'; } } /** * 关联视频 盛冬平 */ function showRelatVideoRes(originalRequest) { eval('result='+originalRequest.responseText); if(typeof result == 'object') { var rs=""; var count = result.length; for(var i = 0; i\ \
\
\ \ ' + result[i].name + '\ \
\
播放:' + result[i].view_count + '
\
评论:(_COUNT_)
\ '; } $("videoRelatVideo").innerHTML =rs; 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 displayRelatVideoA(vid, uid,strVTags,strVName) { var url = 'http://you.video.sina.com.cn/pg/play/relat.php'; var pars = 'video=' + vid + "-" + uid+"&tags="+encodeURIComponent(strVTags)+"&name="+encodeURIComponent(strVName); var da = new Ajax.Request( url, { method: 'get', parameters: pars, onSuccess: showRelatVideoRes }); } /** * 关联专辑 盛冬平 */ 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; } 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;}// //#############################// /** * 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 = ' 0){ swfNode += 'flashvars='+ pairs +'&realfull=1&moz=1"'; } swfNode += '/>'; } else { // PC IE if (this.getAttribute("doExpressInstall")) { this.addVariable("MMplayerType", "ActiveX"); this.setAttribute('swf', this.xiSWFPath); } swfNode = ''; swfNode += ''; var params = this.getParams(); for(var key in params) { swfNode += ''; } var pairs = this.getVariablePairs().join("&"); if(pairs.length > 0) {swfNode += '';} swfNode += ""; } return swfNode; }, write: function(elementId){ if(this.getAttribute('useExpressInstall')) { // check to see if we need to do an express install var expressInstallReqVer = new deconcept.PlayerVersion([6,0,65]); if (this.installedVer.versionIsValid(expressInstallReqVer) && !this.installedVer.versionIsValid(this.getAttribute('version'))) { this.setAttribute('doExpressInstall', true); this.addVariable("MMredirectURL", escape(this.getAttribute('xiRedirectUrl'))); document.title = document.title.slice(0, 47) + " - Flash Player Installation"; this.addVariable("MMdoctitle", document.title); } } if(this.skipDetect || this.getAttribute('doExpressInstall') || this.installedVer.versionIsValid(this.getAttribute('version'))){ }else{ if(this.getAttribute('redirectUrl') != "") { document.location.replace(this.getAttribute('redirectUrl')); } } var n = (typeof elementId == 'string') ? document.getElementById(elementId) : elementId; n.innerHTML = this.getSWFHTML(); return true; } } /* ---- detection functions ---- */ deconcept.SWFObjectUtil.getPlayerVersion = function(){ var PlayerVersion = new deconcept.PlayerVersion([0,0,0]); if(navigator.plugins && navigator.mimeTypes.length){ var x = navigator.plugins["Shockwave Flash"]; if(x && x.description) { PlayerVersion = new deconcept.PlayerVersion(x.description.replace(/([a-zA-Z]|\s)+/, "").replace(/(\s+r|\s+b[0-9]+)/, ".").split(".")); } }else if (navigator.userAgent && navigator.userAgent.indexOf("Windows CE") >= 0){ // if Windows CE var axo = 1; var counter = 3; while(axo) { try { counter++; axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash."+ counter); // document.write("player v: "+ counter); PlayerVersion = new deconcept.PlayerVersion([counter,0,0]); } catch (e) { axo = null; } } } else { // Win IE (non mobile) // do minor version lookup in IE, but avoid fp6 crashing issues // see http://blog.deconcept.com/2006/01/11/getvariable-setvariable-crash-internet-explorer-flash-6/ try{ var axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7"); }catch(e){ try { var axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6"); PlayerVersion = new deconcept.PlayerVersion([6,0,21]); axo.AllowScriptAccess = "always"; // error if player version < 6.0.47 (thanks to Michael Williams @ Adobe for this code) } catch(e) { if (PlayerVersion.major == 6) { return PlayerVersion; } } try { axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash"); } catch(e) {} } if (axo != null) { PlayerVersion = new deconcept.PlayerVersion(axo.GetVariable("$version").split(" ")[1].split(",")); } } return PlayerVersion; } deconcept.PlayerVersion = function(arrVersion){ this.major = arrVersion[0] != null ? parseInt(arrVersion[0]) : 0; this.minor = arrVersion[1] != null ? parseInt(arrVersion[1]) : 0; this.rev = arrVersion[2] != null ? parseInt(arrVersion[2]) : 0; } deconcept.PlayerVersion.prototype.versionIsValid = function(fv){ if(this.major < fv.major) return false; if(this.major > fv.major) return true; if(this.minor < fv.minor) return false; if(this.minor > fv.minor) return true; if(this.rev < fv.rev) return false; return true; } /* ---- get value of query string param ---- */ deconcept.util = { getRequestParameter: function(param) { var q = document.location.search || document.location.hash; if (param == null) { return q; } if(q) { var pairs = q.substring(1).split("&"); for (var i=0; i < pairs.length; i++) { if (pairs[i].substring(0, pairs[i].indexOf("=")) == param) { return pairs[i].substring((pairs[i].indexOf("=")+1)); } } } return ""; } } /* fix for video streaming bug */ deconcept.SWFObjectUtil.cleanupSWFs = function() { var objects = document.getElementsByTagName("OBJECT"); for (var i = objects.length - 1; i >= 0; i--) { objects[i].style.display = 'none'; for (var x in objects[i]) { if (typeof objects[i][x] == 'function') { objects[i][x] = function(){}; } } } } // fixes bug in some fp9 versions see http://blog.deconcept.com/2006/07/28/swfobject-143-released/ if (deconcept.SWFObject.doPrepUnload) { if (!deconcept.unloadSet) { deconcept.SWFObjectUtil.prepUnload = function() { __flash_unloadHandler = function(){}; __flash_savedUnloadHandler = function(){}; window.attachEvent("onunload", deconcept.SWFObjectUtil.cleanupSWFs); } window.attachEvent("onbeforeunload", deconcept.SWFObjectUtil.prepUnload); deconcept.unloadSet = true; } } /* add document.getElementById if needed (mobile IE < 5) */ if (!document.getElementById && document.all) { document.getElementById = function(id) { return document.all[id]; }} /* add some aliases for ease of use/backwards compatibility */ var getQueryParamValue = deconcept.util.getRequestParameter; var FlashObject = deconcept.SWFObject; // for legacy support var SWFObject = deconcept.SWFObject; // //#############################// var Prototype={Version:'1.5.0',BrowserFeatures:{XPath:!!document.evaluate},ScriptFragment:'(?:)((\n|\r|.)*?)(?:<\/script>)',emptyFunction:function(){},K:function(x){return x}} var Class={create:function(){return function(){this.initialize.apply(this,arguments);}}} var Abstract=new Object();Object.extend=function(destination,source){for(var property in source){destination[property]=source[property];} return destination;} Object.extend(Object,{inspect:function(object){try{if(object===undefined)return'undefined';if(object===null)return'null';return object.inspect?object.inspect():object.toString();}catch(e){if(e instanceof RangeError)return'...';throw e;}},keys:function(object){var keys=[];for(var property in object) keys.push(property);return keys;},values:function(object){var values=[];for(var property in object) values.push(object[property]);return values;},clone:function(object){return Object.extend({},object);}});Function.prototype.bind=function(){var __method=this,args=$A(arguments),object=args.shift();return function(){return __method.apply(object,args.concat($A(arguments)));}} var Try={these:function(){var returnValue;for(var i=0,length=arguments.length;i0){if(match=source.match(pattern)){result+=source.slice(0,match.index);result+=String.interpret(replacement(match));source=source.slice(match.index+match[0].length);}else{result+=source,source='';}} return result;},strip:function(){return this.replace(/^\s+/,'').replace(/\s+$/,'');},toQueryParams:function(separator){var match=this.strip().match(/([^?#]*)(#.*)?$/);if(!match)return{};return match[1].split(separator||'&').inject({},function(hash,pair){if((pair=pair.split('='))[0]){var name=decodeURIComponent(pair[0]);var value=pair[1]?decodeURIComponent(pair[1]):undefined;if(hash[name]!==undefined){if(hash[name].constructor!=Array) hash[name]=[hash[name]];if(value)hash[name].push(value);} else hash[name]=value;} return hash;});},camelize:function(){var parts=this.split('-'),len=parts.length;if(len==1)return parts[0];var camelized=this.charAt(0)=='-'?parts[0].charAt(0).toUpperCase()+parts[0].substring(1):parts[0];for(var i=1;i1?this:this[0];},clone:function(){return[].concat(this);},inspect:function(){return'['+this.map(Object.inspect).join(', ')+']';},indexOf:function(object){for(var i=0,length=this.length;i-1?'&':'?')+params;try{Ajax.Responders.dispatch('onCreate',this,this.transport);this.transport.open(this.method.toUpperCase(),this.url,this.options.asynchronous);if(this.options.asynchronous) setTimeout(function(){this.respondToReadyState(1)}.bind(this),10);this.transport.onreadystatechange=this.onStateChange.bind(this);this.setRequestHeaders();var body=this.method=='post'?(this.options.postBody||params):null;this.transport.send(body);if(!this.options.asynchronous&&this.transport.overrideMimeType) this.onStateChange();} catch(e){this.dispatchException(e);}},onStateChange:function(){var readyState=this.transport.readyState;if(readyState>1&&!((readyState==4)&&this._complete)) this.respondToReadyState(this.transport.readyState);},setRequestHeaders:function(){var headers={'X-Requested-With':'XMLHttpRequest','X-Prototype-Version':Prototype.Version,'Accept':'text/javascript, text/html, application/xml, text/xml, */*'};if(this.method=='post'){headers['Content-type']=this.options.contentType+ (this.options.encoding?'; charset='+this.options.encoding:'');if(this.transport.overrideMimeType&&(navigator.userAgent.match(/Gecko\/(\d{4})/)||[0,2005])[1]<2005) headers['Connection']='close';} if(typeof this.options.requestHeaders=='object'){var extras=this.options.requestHeaders;if(typeof extras.push=='function') for(var i=0,length=extras.length;i=200&&this.transport.status<300);},respondToReadyState:function(readyState){var state=Ajax.Request.Events[readyState];var transport=this.transport,json=this.evalJSON();if(state=='Complete'){try{this._complete=true;(this.options['on'+this.transport.status]||this.options['on'+(this.success()?'Success':'Failure')]||Prototype.emptyFunction)(transport,json);}catch(e){this.dispatchException(e);} if((this.getHeader('Content-type')||'text/javascript').strip().match(/^(text|application)\/(x-)?(java|ecma)script(;.*)?$/i)) this.evalResponse();} try{(this.options['on'+state]||Prototype.emptyFunction)(transport,json);Ajax.Responders.dispatch('on'+state,this,transport,json);}catch(e){this.dispatchException(e);} if(state=='Complete'){this.transport.onreadystatechange=Prototype.emptyFunction;}},evalJSON:function(){try{var json=this.getHeader('X-JSON');return json?eval('('+json+')'):null;}catch(e){return null}},evalResponse:function(){try{return eval(this.transport.responseText);}catch(e){this.dispatchException(e);}},getHeader:function(name){try{return this.transport.getResponseHeader(name);}catch(e){return null}},dispatchException:function(exception){(this.options.onException||Prototype.emptyFunction)(this,exception);Ajax.Responders.dispatch('onException',this,exception);}});Ajax.Updater=Class.create();Object.extend(Object.extend(Ajax.Updater.prototype,Ajax.Request.prototype),{initialize:function(container,url,options){this.container={success:(container.success||container),failure:(container.failure||(container.success?null:container))} this.transport=Ajax.getTransport();this.setOptions(options);var onComplete=this.options.onComplete||Prototype.emptyFunction;this.options.onComplete=(function(transport,param){this.updateContent();onComplete(transport,param);}).bind(this);this.request(url);},updateContent:function(){var receiver=this.container[this.success()?'success':'failure'];var response=this.transport.responseText;if(!this.options.evalScripts)response=response.stripScripts();if(receiver=$(receiver)){if(this.options.insertion) new this.options.insertion(receiver,response);else receiver.update(response);} if(this.success()){if(this.onComplete) setTimeout(this.onComplete.bind(this),10);}}});if(!window.Element) var Element=new Object();Element.Methods={visible:function(element){return $(element).style.display!='none';},toggle:function(element){element=$(element);Element[Element.visible(element)?'hide':'show'](element);return element;},hide:function(element){$(element).style.display='none';return element;},show:function(element){$(element).style.display='';return element;}};Object.extend(Element,Element.Methods);function $(element){if(arguments.length>1){for(var i=0,elements=[],length=arguments.length;i