﻿var h=window.location.href.toLowerCase();if(h.indexOf('.com')>0){window.location.href=h.replace(".com",".net");}if(h.indexOf('.cc')>0){window.location.href=h.replace(".cc",".net");}var currentIndex=0,hideTimes=0,uin=getParameter("uin",false),PAGE_COMMENT_NUM=10,container_Width=963,image_Width_Max=container_Width;currentIndex=getParameter("page",false);currentIndex=currentIndex.length>0?PAGE_COMMENT_NUM*parseInt(currentIndex):0;var debug=false,IMGCACHE_DOMAIN="imgcache.qq.com",pagedata=false,host=window.location.href;host=host.substr(0,host.lastIndexOf("/")+1);var img_ld="http://mat1.qq.com/gongyi/images/gongyi_icon.gif",Browser={}; Browser.isMozilla=typeof document.implementation!="undefined"&&typeof document.implementation.createDocument!="undefined"&&typeof HTMLDocument!="undefined";Browser.isIE=window.ActiveXObject?true:false;Browser.isIE7=Browser.isIE&&window.XMLHttpRequest;Browser.isFirefox=navigator.userAgent.toLowerCase().indexOf("firefox")!=-1;Browser.isSafari=navigator.userAgent.toLowerCase().indexOf("safari")!=-1;Browser.isOpera=navigator.userAgent.toLowerCase().indexOf("opera")!=-1; Browser.isMobile=window.screen.width<400;if(debug)Browser.isMobile=true;if(Browser.isMobile){if($("mainStyle")!=null)$("mainStyle").href="/style/QQstyle.css"}else if($("mainStyle")!=null)$("mainStyle").href="/style/IEstyle.css";var req=false; function initRequest(){delete req;req=false;if(window.XMLHttpRequest&&!window.ActiveXObject)try{req=new XMLHttpRequest}catch(a){req=false}else if(window.ActiveXObject)try{req=new ActiveXObject("Msxml2.XMLHTTP")}catch(b){try{req=new ActiveXObject("Microsoft.XMLHTTP")}catch(c){req=false}}} function showLoading(a,b){var c=$("loadingBox");if(c==null){c=document.createElement("DIV");c.id="loadingBox";document.body.appendChild(c)}if(a){c.innerHTML=b!=null?b:"Data loading...";c.style.display="block";c.style.top=document.body.scrollTop+1}else c.style.display="none"}function ShowPosting(a){return showLoading(a,"Data posting...")}function loadXMLDoc(a){initRequest();if(req){showLoading(true);req.onreadystatechange=processReqChange;req.open("GET",a,true);req.send("")}} function postXMLDoc(a,b){initRequest();if(req){ShowPosting(true);req.onreadystatechange=processReqPostChange;req.open("POST",a,true);req.send(b)}}function processReqPostChange(){if(req.readyState==4){ShowPosting(false);req.status==200?callbackPost(req.responseText):alert("There was a problem retrieving the XML data:\n"+req.statusText)}} function processReqChange(){if(req.readyState==4){showLoading(false);req.status==200?callback(req.responseText):alert("There was a problem retrieving the XML data:\n"+req.statusText)}}function callbackPost(){}function evalData(data){try{eval(data);return true;}catch(e){reportError(e.message);return false;}}function reportError(msg){try{postXMLDoc("/errorReport.aspx",msg);}catch(e){}}function _Callback(a){pagedata=a}function nextPage(a){if(a<PAGE_COMMENT_NUM/2)alert("It's the last page.....");else{currentIndex+=PAGE_COMMENT_NUM;getData()}} function hideAddressBar(){if(document.body.scrollHeight>window.outerHeight)window.scrollTo(0,1);else if(!(hideTimes>5)){hideTimes++;setTimeout(hideAddressBar,500)}}String.prototype.trim=function(a){return!a?this.replace(/^\s+|\s+$/,""):a=="L"?this.replace(/^\s+/,""):a=="R"?this.replace(/\s+$/,""):this};String.prototype.convCR=function(a){return a?this.replace(/<br \/>/g,"\n"):this.replace(/\n/g,"<br />")};String.prototype.convSP=function(a){return a?this.replace(/&nbsp;/g," "):this.replace(/ /g,"&nbsp;")}; String.prototype.s2n=function(){var a=parseInt(this.replace(/px$/i,""),10);return isNaN(a)?0:a};String.prototype.toInnerHTML=function(){var a=this.replace(/&/g,"&amp;").replace(/\"/g,"&quot;").replace(/\'/g,"&#39;").replace(/</g,"&lt;").replace(/>/g,"&gt;");return Browser.isIE?a.replace(/&apos;/g,"&#39;"):a};String.prototype.toRealStr=function(){return this.replace(/&quot;/g,'"').replace(/(?:&#39;)|(?:&apos;)/g,"'").replace(/&lt;/g,"<").replace(/&gt;/g,">").replace(/&amp;/g,"&")}; String.prototype.getRealLength=function(){return this.replace(/[^\x00-\xff]/g,"aa").length};String.prototype.URLencode=function(){return this.replace(/[\x09\x0A\x0D\x21-\x29\x2B\x2C\x2F\x3A-\x3F\x5B-\x5E\x60\x7B-\x7E]/g,function(a){return"%"+(a.charCodeAt(0)<16?"0"+a.charCodeAt(0).toString(16):a.charCodeAt(0).toString(16))}).replace(/[\x00-\x20 ]/g,"+")};function SetCookie(a,b,c){var d=new Date;d.setTime(d.getTime()+c*24*60*60*1E3);document.cookie=a+"="+escape(b)+";expires="+d.toGMTString()} function getCookie(a){a=document.cookie.match(RegExp("(^| )"+a+"=([^;]*)(;|$)"));if(a!=null)return unescape(a[2]);return null}function delCookie(a){var b=new Date;b.setTime(b.getTime()-1);var c=getCookie(a);if(c!=null)document.cookie=a+"="+c+";expires="+b.toGMTString()}function $(a){return document.getElementById(a)}function _$(a){return document.getElementsByName(a)} function long2time(a){a=new Date(a*1E3);return[a.getFullYear(),"\u5e74",a.getMonth()+1,"\u6708",a.getDate(),"\u65e5",a.getHours(),"\u65f6",a.getMinutes(),"\u5206",a.getSeconds(),"\u79d2"].join("")}function getParameter(a,b){var c=RegExp("(\\?|#|&)"+a+"=([^&#]*)(&|#|$)"),d=location.href.match(c);if((!d||d=="")&&!b)d=top.location.href.match(c);return!d?"":d[2]}function newWindow(a){if(Browser.isMobile)window.open(a,"_blank");else window.location.href=a} function newImageWindow(a){window.open(a,"_blank")}function ShowError(a,b){if(b==null)b="\u670d\u52a1\u5668\u6682\u65e0\u4fe1\u606f\u6216\u4fe1\u606f\u5df2\u88ab\u5220\u9664";var c=document.createElement("div");if (!Browser.isMobile) { var ads = $("ads_cache"); if (ads) { var u = $("list"); if (u) { var len = u.childNodes.length; for (var i = 0; i < len; i++) { u.removeChild(u.childNodes[0]); } var l = document.createElement("li"); l.innerHTML = ads.innerHTML; u.appendChild(l); } } }c.innerHTML="<center><span class='errorMsg'> "+b+"</span></center>";a.appendChild(c);a.style.visibility="visible"}var Class={create:function(){return function(){this.initialize.apply(this,arguments)}}},remoteImgDict=false,remoteBigImgDict=false,remotePlayList=false; function RenderImages(){remoteImgDict=new RImagDict(0);remoteImgDict.render()}function RenderBigImages(){remoteBigImgDict=new RImagDict(1);remoteBigImgDict.render()}function PlayImages(){setTimeout(RenderBigImages,0);remotePlayList=new RImagDict;remotePlayList.play()}function stopRemoteImagesPlay(){remotePlayList&&remotePlayList.stop()}Function.prototype.bind=function(a){var b=this;return function(){return b.apply(a)}};var lastRemoteImageObj=false;RemoteImage=Class.create(); RemoteImage.prototype={initialize:function(a){this.id=a;this.isComplete=false;this.imageOld=$(this.id);this.imageNew=this.iframe=false;this.bigSrc=this.imageOld==null?"":this.imageOld.getAttribute("bdata");this.mouseMoveStep=20;this.endTime=this.startTime=this.mouseMoveNum=0;this.loadTimerSmall=this.loadTimerBig=false;this.loadChangeStep=23},isLoadComplete:function(){if(this.imageOld.getAttribute("lcomplete")=="1")return true;return false},createIframe:function(a,b){var c=$(a);if(c==null){c=document.createElement("IFRAME"); c.src="about:blank";c.id=a;c.height=1;c.width=1;c.scrolling="no";c.style.border="0";if(typeof b!="undefined")b.appendChild(c);else this.imageOld.parentNode&&a.indexOf(this.id)>=0?this.imageOld.parentNode.insertBefore(c,this.imageOld):document.body.appendChild(c)}return c},createImage:function(a,b,c,d){var f=false,e=false,g=false;f=typeof window[a]=="undefined"?$(a).contentDocument:window[a].document;e=f.getElementById(b);if(e==null){g=f.createElement("DIV");if(typeof c!="undefined")g.style.cssText=c;if(typeof d!= "undefined")g.innerHTML=d;e=f.createElement("IMG");e.id=b;e.style.cursor="pointer";e.alt=this.imageOld.alt;e.title=this.imageOld.alt;g.appendChild(e);Browser.isSafari?f.body.appendChild(g):f.appendChild(g)}delete f;return e},restart:function(){this.mouseMoveNum=0;this.renderLoadingImage(false)},render:function(){if(this.imageOld!=null){this.iframe=this.createIframe("iframe_"+this.id);this.iframe.style.position="relative";this.iframe.style.zIndex="8";this.imageNew=this.createImage(this.iframe.id, "img_"+this.iframe.id);this.imageNew.onload=this.renderImage.bind(this);this.imageNew.onerror=this.renderError.bind(this);this.imageNew.src=this.imageOld.getAttribute("data");if(!Browser.isMobile&&this.imageOld.getAttribute("bdata")!=null){this.imageNew.onmouseover=this.onmouseOn.bind(this);this.imageNew.onmouseout=this.restart.bind(this)}if(this.imageNew.width>image_Width_Max){this.imageNew.height=this.imageNew.height*image_Width_Max/this.imageNew.width;this.imageNew.width=image_Width_Max}if(this.imageOld.onclick!= null)this.imageNew.onclick=this.imageOld.onclick}},renderImage:function(){this.imageOld.style.display="none";this.imageNew.style.display="block";if(Browser.isSafari){this.iframe.style.width=this.imageNew.width+16+"px";this.iframe.style.height=this.imageNew.height+16+"px"}else{if(this.imageNew.width>image_Width_Max){this.imageNew.height=this.imageNew.height*image_Width_Max/this.imageNew.width;this.imageNew.width=image_Width_Max}this.iframe.style.width=this.imageNew.width+"px";this.iframe.style.height= this.imageNew.height+"px"}remoteImgDict.renderNext()},renderError:function(){remoteImgDict.renderNext()},onmouseOn:function(){if(!(this.mouseMoveNum>this.mouseMoveStep)){lastRemoteImageObj&&lastRemoteImageObj.renderLoadingImage(false);if(lastRemoteImageObj.id!=this.id){lastRemoteImageObj=this;if(remoteBigImgDict){remoteBigImgDict.stop();remoteBigImgDict=false}this.renderBig()}}},renderBig:function(){if(this.imageOld!=null){this.renderLoadingImage(true);lastRemoteImageObj=this;var a=this.createIframe("iframe_BigImage"), b=this.createImage("iframe_BigImage","BigImage");b.onload=this.renderBigImage.bind(this);b.onmousemove=this.AIChangeImage.bind(this);b.src=this.bigSrc;b.alt=this.imageOld.alt;b.title=this.imageOld.alt;b.style.display="none";a.style.visibility="hidden"}},play:function(){var a=this.createIframe("iframe_BigImageMovie");a.style.display="";var b=this.createImage("iframe_BigImageMovie","BigImageMovie","padding-top:10px;text-align:center;position: absolute;top:0;left:0;height:100%;width:100%;background-color:Black;", '<DIV onclick="parent.stopRemoteImagesPlay();" style="TEXT-INDENT: -2000px;OVERFLOW: hidden;CURSOR: pointer;POSITION: absolute;WIDTH: 17px;HEIGHT: 17px;TOP: 0px;RIGHT: 0px;BACKGROUND-POSITION: -250px -160px;BACKGROUND-REPEAT: no-repeat" >\u5173\u95ed</DIV>');b.src=this.bigSrc;b.alt=this.imageOld.alt;b.title=this.imageOld.alt;a.style.cssText="position: absolute;top:0;left:0;BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: 0px;background-color:Black;padding:0;margin:0;";a.style.width= document.documentElement.clientWidth;a.style.height=document.documentElement.clientHeight},stopPlay:function(){if($("iframe_BigImageMovie")!=null)this.createIframe("iframe_BigImageMovie").style.display="none"},stopRender:function(){if($("iframe_BigImage")!=null)this.createIframe("iframe_BigImage").style.display="none"},renderSmall:function(){this.createIframe("iframe_BigImage").style.visibility="hidden";var a=this.createImage("iframe_BigImage","BigImage");a.onload=null;a.onmouseout=null;a.onmousemove= null;this.restart()},setComplete:function(){this.imageOld.setAttribute("lcomplete",1)},renderBigImage:function(){this.renderLoadingImage(false);this.setComplete();var a=this.createIframe("iframe_BigImage");a.style.border="3";a.style.position="absolute";a.style.zIndex="9";var b=this.createImage("iframe_BigImage","BigImage");b.style.display="";a.style.display="";var c=ie_x(this.iframe),d=ie_y(this.iframe);if(c+b.width>document.documentElement.clientWidth)c=document.documentElement.clientWidth-b.width; if(d+b.height-document.documentElement.scrollTop>document.documentElement.clientHeight-10)if(d-document.documentElement.scrollTop-b.height>10)d-=b.height;else d=Math.ceil((document.documentElement.clientHeight-b.height)/2)+document.documentElement.scrollTop;a.style.top=d+"px";a.style.left=c+"px";a.style.width=b.width+"px";a.style.height=b.height+"px";if(Browser.isSafari){a.style.width=parseInt(a.style.width)+20+"px";a.style.height=parseInt(a.style.height)+20+"px"}a.style.visibility="visible";remoteBigImgDict&& remoteBigImgDict.renderNext()},AIChangeImage:function(){this.mouseMoveNum++;this.mouseMoveNum>this.mouseMoveStep&&this.renderSmall()},renderLoadingImage:function(a){var b=$("loadingImage");if(b==null){b=document.createElement("DIV");b.id="loadingImage";b.innerHTML="<img src='"+img_ld+"' id='img_loading' border='0'>";document.body.appendChild(b)}if(a){b.style.top=ie_y(this.iframe)+"px";b.style.left=ie_x(this.iframe)+"px";b.style.display="block";this.loadTimerBig=setInterval(this.loadingChangeBig.bind(this), 390)}else{b.style.display="none";window.clearInterval(this.loadTimerBig)}},loadingChangeBig:function(){$("img_loading").width=$("img_loading").width+this.loadChangeStep;$("img_loading").height=$("img_loading").height+this.loadChangeStep;this.loadTimerSmall=setTimeout(this.loadingChangeSmall.bind(this),139)},loadingChangeSmall:function(){$("img_loading").width=$("img_loading").width-this.loadChangeStep;$("img_loading").height=$("img_loading").height-this.loadChangeStep}};RImagDict=Class.create(); RImagDict.prototype={initialize:function(a){this.count=this.times=0;this.imges=false;this.renderType=a;this.timerPlay=this.stoped=false;this.timerStep=3E3;this.pos=0},getImages:function(){for(var a=[],b=document.getElementsByTagName("IMG"),c=0;c<b.length;c++)if(b[c].getAttribute("data")!=null){if(b[c].id.length<=0)b[c].id="tempimage"+c;a.push(b[c].id)}return a.reverse()},render:function(){if(!this.imges)this.imges=this.getImages();if(Browser.isFirefox){alert("For your best experience, please use Safair or IE. "); return false}if(this.renderType==0)Browser.isSafari||this.renderNext();this.renderNext()},renderNext:function(){if(!this.stoped){if(this.imges.length==0){(new RemoteImage).stopRender();return false}this.times++;if(this.times==13){this.times=0;setTimeout(this.renderNext.bind(this),0);return false}var a=new RemoteImage(this.imges.pop(),this);if(this.renderType==0)a.render();else{a.render();a.renderBig()}}},stop:function(){this.stoped=true;if(this.imges.length>0){window.clearInterval(this.timerPlay); (new RemoteImage).stopPlay()}},play:function(){if(!this.imges)this.imges=this.getImages();this.count=this.imges.length;this.pos=this.count-1;this.timerPlay=window.setInterval(this.playNext.bind(this),this.timerStep);this.playNext()},playNext:function(){if(!this.stoped){var a=new RemoteImage(this.imges[this.pos],this);if(a.isLoadComplete()){a.play(this);this.pos--;this.pos==-1&&window.setTimeout(this.stop.bind(this),this.timerStep)}}}}; function ie_y(a){for(var b=a.offsetTop;a=a.offsetParent;)b+=a.offsetTop;return b}function ie_x(a){for(var b=a.offsetLeft;a=a.offsetParent;)b+=a.offsetLeft;return b} var urlList = ["index.htm", "journals.htm", "albums.htm", "music.htm", "taotao.htm", "leaveWords.htm", "share.htm", "visitorList.htm", "relatedList.htm", "onLine.htm"];var titleList = ["G首页", "日记", "相册", "音乐", "TaoTao", "留言板", "分享", "访客", "访录", "在线?"];var nameList = ["首", "日", "相", "音", "TT", "留", "享", "访", "录", "线"]; function RenderNavBar(a){var b=$("navBar"),c=false,d=false,f=document.createElement("ul");f.className="tabs-nav";for(var e=0;e<10;e++){c=document.createElement("li");if(e==a)c.className="tabs-selected";c.style.backgroundcolor="#fefefc";d=document.createElement("a");d.href=urlList[e]+"?uin="+uin;d.title=titleList[e];d.innerHTML=Browser.isMobile?nameList[e]:titleList[e];if(d.innerHTML!=""){c.appendChild(d);f.appendChild(c)}}b.appendChild(f);b.style.visibility="visible";return true} function tidyMenu(){var a=$("navBar"),b=a.childNodes[0].childNodes;if(Browser.isMobile)for(a=0;a<b.length;a++)b[a].childNodes[0].innerHTML=nameList[a];else for(a=0;a<b.length;a++)b[a].childNodes[0].innerHTML=titleList[a]} function includeJs(a){var b=document.getElementsByTagName("head").item(0),c=document.createElement("script");c.src=a;c.type="text/javascript";c.charset="utf-8";b.appendChild(c)}function tidyTitle(){document.title=document.title.indexOf("-")>0?uin?uin+"_"+document.title.substr(0,document.title.indexOf("-")):document.title.substr(0,document.title.indexOf("-")):uin?uin+"_"+document.title:document.title}function renderAds(){} window.gbar={qs:function(){},tg:function(a){var b={id:"gbar"};for(i in a)b[i]=a[i];google.x(b,function(){gbar.tg(b)})}}; (function(){function a(c,d){return c!=null?(c-d)/8:0}var b={};b.b={};b.a=function(c,d,f,e,g,k){var h=document.getElementById(c),j=1,l=parseInt(h.style.left,10),m=a(d,l),n=parseInt(h.style.top,10),o=a(f,n),s=a(e,1),p=parseInt(h.style.width,10),t=a(g,p),q=parseInt(h.offsetHeight,10),u=a(k,q);b.b[c]=window.setInterval(function(){if(b.d(c,j,l,m,n,o,1,s,p,t,q,u)){window.clearInterval(b.b[c]);var r=document.getElementsByTagName("body")[0];r.scroll="";r.style.overflow="";document.getElementById("canvas").style.display= "none"}else j++},25)};b.d=function(c,d,f,e,g,k,h,j,l,m,n,o){c=document.getElementById(c);if(d<=8){if(e)c.style.left=f+d*e+"px";if(k)c.style.top=g+d*k+"px";if(j){f=1+d*j;e=c.style;if("opacity"in e)e.opacity=f;else if("MozOpacity"in e)e.MozOpacity=f;else if("filter"in e)e.filter="alpha(opacity="+f*100+")"}if(m)c.style.width=l+d*m+"px";if(o)c.style.height=n+d*o+"px";return false}return true};b.c=function(){var c=document.getElementsByTagName("body")[0];c.scroll="no";c.style.overflow="hidden";c=document.getElementById("biglogo"); c.style.left=c.offsetLeft+"px";c.style.marginLeft="0";window.setTimeout(function(){b.a("biglogo",null,null,0,null,null);b.a("promo",null,null,0,null,null);b.a("bk",null,null,0,null,null)},500)};window.gcnAni=b.c})();
