var User={};Entry.extra({$validateComplete:function(o){User={userId:o.userId,nickName:o.nickName,sex:o.sex,account:o.account};},"1402":function(){}}).setVTime(5000*60)(true);if(!(window.attachEvent&&!window.opera)&&navigator.userAgent.indexOf("Opera")<0){var ex;XMLDocument.prototype.__proto__.__defineGetter__("xml",function(){try{return new XMLSerializer().serializeToString(this);}catch(ex){var d=document.createElement("div");d.appendChild(this.cloneNode(true));return d.innerHTML;}});Element.prototype.__proto__.__defineGetter__("xml",function(){try{return new XMLSerializer().serializeToString(this);}catch(ex){var d=document.createElement("div");d.appendChild(this.cloneNode(true));return d.innerHTML;}});XMLDocument.prototype.__proto__.__defineGetter__("text",function(){return this.firstChild.textContent});Element.prototype.__proto__.__defineGetter__("text",function(){return this.textContent});if(document.implementation&&document.implementation.createDocument){XMLDocument.prototype.loadXML=function(xmlString){try{var childNodes=this.childNodes;for(var i=childNodes.length-1;i>=0;i--)this.removeChild(childNodes[i]);var dp=new DOMParser();var newDOM=dp.parseFromString(xmlString,"text/xml");var newElt=this.importNode(newDOM.documentElement,true);this.appendChild(newElt);return true;}catch(ex){return false;}};if(document.implementation.hasFeature("XPath","3.0")){XMLDocument.prototype.selectNodes=function(cXPathString,xNode){if(!xNode){xNode=this;}var oNSResolver=this.createNSResolver(this.documentElement);var aItems=this.evaluate(cXPathString,xNode,oNSResolver,XPathResult.ORDERED_NODE_SNAPSHOT_TYPE,null);var aResult=[];for(var i=0;i<aItems.snapshotLength;i++){aResult[i]=aItems.snapshotItem(i);}return aResult;};Element.prototype.selectNodes=function(cXPathString){if(this.ownerDocument.selectNodes){return this.ownerDocument.selectNodes(cXPathString,this);}else{throw"For XML Elements Only";}};}if(document.implementation.hasFeature("XPath","3.0")){XMLDocument.prototype.selectSingleNode=function(cXPathString,xNode){if(!xNode){xNode=this;}var xItems=this.selectNodes(cXPathString,xNode);if(xItems.length>0){return xItems[0];}else{return null;}};Element.prototype.selectSingleNode=function(cXPathString){if(this.ownerDocument.selectSingleNode){return this.ownerDocument.selectSingleNode(cXPathString,this);}else{throw"For XML Elements Only";}};}}};try{FWK}catch(ex){FWK={}};try{XN}catch(ex){XN={}};FWK.xmlObj=function(xml,q){q=q===undefined?"$":(q||"");if(FWK.isNum(xml.length)){var rV={};for(var i=0;i<xml.length;i+=1){if(FWK.isArr(rV[xml[i].nodeName])){rV[xml[i].nodeName].push(FWK.xmlObj(xml[i],q));}else if(rV[xml[i].nodeName]){rV[xml[i].nodeName]=[rV[xml[i].nodeName],FWK.xmlObj(xml[i],q)];}else{rV[xml[i].nodeName]=FWK.xmlObj(xml[i],q);}}return rV;}else{xml=xml.documentElement||xml;var items=xml.selectNodes("*");var atts=xml.selectNodes("@*");var rV={};for(j=0;j<atts.length;j+=1){rV[q+atts[j].nodeName]=atts[j].nodeValue;}if(items.length==0){if(xml.text){rV[q+"_"]=xml.text;}else{rV[q+"_"]="";}}else{FWK.extend(rV,FWK.xmlObj(items,q));}return rV;}};FWK.addEvent=function(_oTarget,_sEventType,_fnHandler){try{_oTarget.attachEvent("on"+_sEventType,_fnHandler);}catch(ex){_oTarget.addEventListener(_sEventType,_fnHandler,false);}};XN.doMain="woniu.com";XN.checkResponse=function(_xml,noFireLose){if(_xml&&_xml.firstChild){xml=_xml.documentElement||_xml;if(!xml.getAttribute("error")||xml.getAttribute("error")=="0"){return true;}else{var mess=xml.selectSingleNode("./*");if(mess){var code=mess.getAttribute("code");if(code=="1402"&&!noFireLose){try{FWK.loseSession();}catch(ex){}}return{code:code,des:mess.getAttribute("des")||"未知错误，请稍后再试..."}}else{return{code:"",des:""}}}}else{return{code:-1,des:"连接服务器失败"}}};XN.checkJson=function(_obj,noFireLose){if(typeof _obj=="object"&&(_obj.code==0||!_obj.code)){return true;}if(_obj.code=="1402"&&!noFireLose){try{FWK.loseSession();}catch(ex){}}return _obj?{code:_obj.code||0,des:_obj.msg||this.noServing}:{code:-1,des:"连接服务器失败",msg:"连接服务器失败"};};WN_Interactive={$:function(id){return document.getElementById(id);},getInputValue:function(elem){if(typeof(elem)=="string"){elem=document.getElementsByName(elem);}var value="";if(elem&&elem[0]){var type=elem[0].type||elem.type;switch(type){case"radio":var len=elem.length;for(var i=0;i<len;i++){if(elem[i].checked){value=elem[i].value;break;}}break;case"checkbox":var tmp=[];var len=elem.length;for(var i=0;i<len;i++){if(elem[i].checked){tmp.push(elem[i].value);}}value=tmp.join();break;case"select-one":value=elem.value||elem[0].value;break;default:var tmp=[];var len=elem.length;for(var i=0;i<len;i++){tmp.push(elem[i].value);}value=tmp.join();break;}}return value;},getUserFace:function(id,_type){var ret;_type=_type||"_S";ret="http://source.woniu.com/"+XN.PathParse(id,"userfileface")+"/face/face"+_type+".jpg";return ret;},friStr:['<DIV class="optCotT">','<DIV class="optCotTL">','<IMG src="$photo" style="height:110px" />','</DIV>','<DIV class="optCotTR">','$text','<P class="optAddFrdTxt">','写点什么给Ta（选填）','</P>','<TEXTAREA class="txtArea" id="Friend.add.leaveWorld"></TEXTAREA>','<DIV class="optTxtCtr" id="Friend.add.tipInfoCot">','你还可以输入<SPAN>50</SPAN>个字（最多50个字符）','</DIV>','</DIV>','<DIV class="clear">','</DIV>','</DIV>'],_addFriend:function(userId,nickName){FWK.UI.InfoPanel.getInstance().update({w:null,className:"optPay optDef",content:this.friStr.join("").replace("$photo",this.getUserFace(userId,"_B")).replace("$text","通过验证之后，Ta就成为你的好友了！"),title:"加为好友",callBackArr:[{text:"确定",fun:this.beginAddFriend.bind(this,userId)},{text:"取消"}]});XN.remainInputCount(50,"","你还可以输入<SPAN>$1</SPAN>个字（最多50个字符）",this.$("Friend.add.tipInfoCot"),this.$("Friend.add.leaveWorld"))},beginAddFriend:function(userId){var postVars={m:"addFri",oppId:userId,msg:this.$("Friend.add.leaveWorld").value,jsback:"()",fm:"json"};this.$doAddFriend("/community/friend.do",postVars,this.$endAddFriend);},$doAddFriend:function(postUrl,postVars,_callBack){FWK.Util.AjaxList.open(postUrl,"Post",postVars,function(_xml,_json){if(_callBack){var ret=XN.checkJson(_json);if(_json&&ret==true){_callBack("已添加Ta为好友！");}else{_callBack(ret.des||ret.msg);}}})},$endAddFriend:function(result){var str=result||"添加好友失败！";FWK.alert(str);},_showGreet:function(userId,nickName){if(userId==User.userId){FWK.alert("自己不能和自己打招呼哦~");return;}FWK.Util.AjaxList.open("/community/mt.do?m=mtInfo","Post",{oppUserId:userId,jsback:"()",fm:"json"},function(_x,_o){if(_o["code"]=="0"){var str=_o["list"];WN_Interactive.doShow(str,userId);}});},doShow:function(zgStr,userId){FWK.UI.InfoPanel.getInstance().update({id:"greet",w:null,className:" optDef",content:zgStr,title:"打招呼",callBackArr:[{text:"确定",fun:this.beginGreet.bind(this,userId),def:true},{text:"取消"}]});},beginGreet:function(userId){var ipts=document.getElementsByName("greet");var tp="0";for(var i=0;i<ipts.length;i++){var ipt=ipts[i];if(ipt.checked){tp=ipt.value;break;}}var ctt=this.$("write.shortMore").value;for(var i=0;i<ipts.length;i++){var ipt=ipts[i];if(ipt.checked){tp=ipt.value;break;}}var title="打招呼：";var postVars={type:tp,m:"send",oppId:userId,content:ctt,jsback:"()",fm:"json",title:title};var postUrl="/community/mt.do";this.$doGreet(postUrl,postVars,this.$endGreet);},$doGreet:function(postUrl,postVars,_callBack){FWK.Util.AjaxList.open(postUrl,"Post",postVars,function(_xml,_o){if(_callBack){var ret=XN.checkJson(_o);if(_o&&ret==true){_callBack("发送成功！");}else{_callBack(ret.des||"发送失败！");}}});},$endGreet:function(result){FWK.alert(result);},_viewVideoVerify:function(userId){var myId=0;var str=['<iframe src="http://hi.woniu.com/vc/display.html?userId='+myId+'&fromUserId='+userId+'"','width="320px" height="240px" frameborder="no" border="0" marginwidth="0" marginheight="0"',' scrolling="no" allowtransparency="yes"></iframe>'];FWK.alert(str.join(""),"视频照",null,null,{w:383});},_sysTip:function(userId,nickName,url){},beginLvMsg:function(userId,url){var postVars={m:"addSystemTips",toUID:userId,url:url};var postUrl="/newuser/sysmessage.do";this.$doLvMsg(postUrl,postVars,this.$endLvMsg);},$doLvMsg:function(postUrl,postVars,_callBack){FWK.Util.AjaxList.open(postUrl,"Post",postVars,function(_xml){});},$endLvMsg:function(msg){},initComp:function(){this.importSrc("style","http://resimage.woniu.com/comres/common/opt.css");this.importSrc("style","http://resimage.woniu.com/comres/common/p.css");this.importSrc("script","http://resimage.woniu.com/comres/js/FWK/core.js");this.importSrc("script","http://resimage.woniu.com/comres/js/XN/miscInputLogic.js");this.importSrc("script","http://resimage.woniu.com/comres/js/FWK/Misc/Element_Basc.js");this.importSrc("script","http://resimage.woniu.com/comres/js/FWK/Util/AjaxList.js");this.importSrc("script","http://resimage.woniu.com/comres/js/FWK/Util/createElement.js");this.importSrc("script","http://resimage.woniu.com/comres/js/FWK/UI/InfoPanel.js");},importSrc:function(type,src){if(type=="style"){var _tag=document.createElement("link");_tag.rel="stylesheet";_tag.type="text/css";}else{var _tag=document.createElement("script");_tag.type="text/javascript";}var head=document.getElementsByTagName("head")[0];head.lastChild?head.insertBefore(_tag,head.lastChild):head.appendChild(_tag);if(type=="style"){_tag.href=src;}else{_tag.src=src;}delete _tag;}};WN_Interactive.initComp();try{doGreet}catch(e){doGreet={doAddFriend:function(userId,nickName){WN_Interactive._addFriend(userId,nickName);}}};Date.prototype.format=function(_join){var dStr=_join.replace(/YYYY/g,this.getFullYear());dStr=dStr.replace(/YY/g,String(this.getYear()).slice(-2));dStr=dStr.replace(/MM/g,("0"+String(this.getMonth()+1)).slice(-2));dStr=dStr.replace(/M/g,this.getMonth()+1);dStr=dStr.replace(/DD/g,("0"+String(this.getDate())).slice(-2));dStr=dStr.replace(/D/g,this.getDate());dStr=dStr.replace(/hh/g,("0"+String(this.getHours())).slice(-2));dStr=dStr.replace(/h/g,this.getHours());dStr=dStr.replace(/mm/g,("0"+String(this.getMinutes())).slice(-2));dStr=dStr.replace(/m/g,this.getMinutes());dStr=dStr.replace(/ss/g,("0"+String(this.getSeconds())).slice(-2));dStr=dStr.replace(/s/g,this.getSeconds());return dStr;};