
QZFL.dialog={items:[],lastFocus:null,tween:true,create:function(title,content,config){var width=300,height=400,tween=false,noborder=false;if((config!=null)&&(typeof(config)=="object")){width=config.width||300;height=config.height||400;tween=config.tween||false;noborder=config.noborder||false;}else{width=arguments[2]||300;height=arguments[3]||400;tween=arguments[4]||false;noborder=arguments[5]||false;}var _i=this.items;_i.push(new QZFL.DialogHandler(_i.length,noborder,tween));var dialog=_i[_i.length-1];dialog.init(width,height);dialog.fillTitle(title||"无标题");dialog.fillContent(content||"");return dialog;},createBorderNone:function(content,width,height){var _i=this.items;var dialog;_i.push(dialog=(new QZFL.DialogHandler(_i.length,true)));dialog.init(width||300,height||200,true);dialog.fillContent(content||"");return dialog;}};QZFL.DialogHandler=function(id,isNoBorder,useTween){this._id=id;this.isNoBorder=!!isNoBorder;this._isIE6=(QZFL.userAgent.ie&&QZFL.userAgent.ie<7);this.id="dialog_"+id;this.mainId="dialog_main_"+id;this.headId="dialog_head_"+id;this.titleId="dialog_title_"+id;this.closeId="dialog_button_"+id;this.contentId="dialog_content_"+id;this.frameId="dialog_frame_"+id;this.useTween=(typeof(useTween)!="boolean")?QZFL.dialog.tween:useTween;this.zIndex=6000+this._id;this.iconClass="none";this.onBeforeUnload=function(){return true;};this.onUnload=QZFL.emptyFn;this.isFocus=false;var _t=['<div id="',this.mainId,'" class="',(isNoBorder?"":"layer_opensns_main"),'">','<div id=',this.headId,' class="',(isNoBorder?"none":"layer_opensns_title"),'">','<a class="ms_c" href="javascript:void(0);" id="',this.closeId,'" title="关闭"><span class="none">&#9587;</span></a>','<span id=',this.titleId,' ></span>','</div>','<div id="',this.contentId,'"></div>','</div>'];if(this._isIE6&&!isNoBorder){_t.push('<iframe allowtransparency="yes" id="'+this.frameId+'" frameBorder="no" style="position:absolute;top:0;left:0;z-index:-1;" width="100%" height="100%"></iframe>');}this.temlate=_t.join("");};QZFL.DialogHandler.prototype.init=function(width,height,isNoneBerder){this.dialog=document.createElement("div");this.dialog.id=this.id;var _l=(QZFL.dom.getClientWidth()-width)/2+QZFL.dom.getScrollLeft();var _t=Math.max((QZFL.dom.getClientHeight()-height)/2+QZFL.dom.getScrollTop(),0);with(this.dialog){if(!isNoneBerder){className="layer_global";}style.position="absolute";style.left=_l+"px";style.top=_t+"px";style.zIndex=this.zIndex;innerHTML=this.temlate;}document.body.appendChild(this.dialog);this.dialogClose=QZFL.dom.get(this.closeId);var o=this;QZFL.event.addEvent(this.dialog,"mousedown",QZFL.event.bind(o,o.focus));QZFL.event.addEvent(this.dialogClose,"click",function(){var t=QZFL.dialog.items[o._id];if(t){t.unload();}});if(QZFL.dragdrop){QZFL.dragdrop.registerDragdropHandler(QZFL.dom.get(this.headId),QZFL.dom.get(this.id),{range:[0,null,null,null],ghost:0});}this.focus();this.setSize(width,height);if(this.useTween&&QZFL.Tween){QZFL.dom.setStyle(this.dialog,"opacity",0);var tween1=new QZFL.Tween(this.dialog,"top",QZFL.transitions.regularEaseIn,_t-30+"px",_t+"px",0.3);tween1.onMotionChange=function(){QZFL.dom.setStyle(o.dialog,"opacity",this.getPercent()/100);};tween1.onMotionStop=function(){QZFL.dom.setStyle(o.dialog,"opacity",1);tween1=null;};tween1.start();}else{}};QZFL.DialogHandler.prototype.focus=function(){if(this.isFocus){return;}this.dialog.style.zIndex=this.zIndex+3000;if(QZFL.dialog.lastFocus){QZFL.dialog.lastFocus.blur();};this.isFocus=true;QZFL.dialog.lastFocus=this;};QZFL.DialogHandler.prototype.blur=function(){this.isFocus=false;this.dialog.style.zIndex=this.zIndex;};QZFL.DialogHandler.prototype.getZIndex=function(){return this.dialog.style.zIndex;};QZFL.DialogHandler.prototype.fillTitle=function(title){var _t=QZFL.dom.get(this.titleId);_t.innerHTML=title;};QZFL.DialogHandler.prototype.fillContent=function(html){var _c=QZFL.dom.get(this.contentId);_c.innerHTML=html;};QZFL.DialogHandler.prototype.setSize=function(width,height){var _m=QZFL.dom.get(this.id);_m.style.width=(parseInt(width)+8)+"px";var _c=QZFL.dom.get(this.contentId);if(!this.isNoBorder){height=height-30<0?50:height-30;}_c.style[QZFL.userAgent.ie<7?"height":"minHeight"]=height+"px";if(this._isIE6){var _s=QZFL.dom.getSize(QZFL.dom.get(this.id)),_f=QZFL.dom.get(this.frameId);if(_f){QZFL.dom.setSize(_f,_s[0],_s[1]);}}};QZFL.DialogHandler.prototype.unload=function(){if(!this.onBeforeUnload()){return;};var o=this;if(this.useTween&&QZFL.Tween){var tween1=new QZFL.Tween(this.dialog,"opacity",QZFL.transitions.regularEaseIn,1,0,0.2);tween1.onMotionStop=function(){o._unload();tween1=null;};tween1.start();}else{this._unload();};};QZFL.DialogHandler.prototype._unload=function(){this.onUnload();if(QZFL.dragdrop){QZFL.dragdrop.unRegisterDragdropHandler(QZFL.dom.get(this.headId));}if(QZFL.userAgent.ie){this.dialog.innerHTML="";}QZFL.dom.removeElement(this.dialog);delete QZFL.dialog.items[this._id];};QZFL.maskLayout={count:0,items:{},create:function(zindex,_doc){this.count++;zindex=zindex||5000;_doc=_doc||document;var _m=QZFL.dom.createElementIn("div",_doc.body,false,{className:"qz_mask_layout"}),_h,_ua=QZFL.userAgent;_h=(_ua.ie&&_ua.ie<7)?Math.max(_doc.documentElement.scrollHeight,_doc.body.scrollHeight):QZFL.dom.getClientHeight(_doc);_m.style.zIndex=zindex;_m.style.height=_h+"px";_m.unselectable="on";this.items[this.count]=_m;return this.count;},remove:function(countId){QZFL.dom.removeElement(this.items[countId]);delete this.items[countId];}};QZFL.dragdrop={dragdropPool:{},dragTempId:0,_scrollRange:0,dragGhostStyle:"cursor:move;position:absolute;border:1px solid #06c;background:#6cf;z-index:1000;color:#003;overflow:hidden",registerDragdropHandler:function(handler,target,options){var _e=QZFL.event;var _hDom=QZFL.dom.get(handler);var _tDom=QZFL.dom.get(target);options=options||{range:[null,null,null,null],ghost:0};if(!_hDom){return null}var targetObject=_tDom||_hDom;if(!_hDom.id){_hDom.id="dragdrop_"+this.dragTempId;QZFL.dragdrop.dragTempId++;}_hDom.style.cursor=options.cursor||"move";this.dragdropPool[_hDom.id]=new this.eventController();_e.on(_hDom,"mousedown",_e.bind(this,this.startDrag),[_hDom.id,targetObject,options]);return this.dragdropPool[_hDom.id];},unRegisterDragdropHandler:function(handler){var _hDom=QZFL.dom.get(handler);var _e=QZFL.event;if(!_hDom){return null}_hDom.style.cursor="default";delete this.dragdropPool[_hDom.id];_e.removeEvent(_hDom,"mousedown");},startDrag:function(e,handlerId,target,options){var _d=QZFL.dom;var _e=QZFL.event;if(_e.getButton()!=0||_e.getTarget().noDrag){return;}if(options.ignoreTagName==_e.getTarget().tagName||_e.getTarget().noDragdrop){return;}var size=_d.getSize(target);var stylePosition=_d.getStyle(target,"position");var isAbsolute=stylePosition=="absolute"||stylePosition=="fixed";var ghost=null,hasGhost=false;var xy=null;if(options.rangeElement){var _re=options.rangeElement;var _el=QZFL.dom.get(_re[0]);var _elSize=QZFL.dom.getSize(_el);var _r=_re[1];if(!_re[2]){options.range=[_r[0]?0:null,_r[1]?0:null,_r[2]?_elSize[1]:null,_r[3]?_elSize[0]:null];}else{var _elXY=QZFL.dom.getXY(_el);options.range=[_r[0]?_elXY[1]:null,_r[1]?_elXY[0]:null,_r[2]?_elXY[1]+_elSize[1]:null,_r[3]?_elXY[0]+_elSize[0]:null];}}if(!isAbsolute||options.ghost){xy=isAbsolute?[parseInt(target.style.left),parseInt(target.style.top)]:_d.getXY(target);ghost=_d.createElementIn("div",isAbsolute?target.parentNode:document.body,false,{style:options.ghostStyle||this.dragGhostStyle});ghost.id="dragGhost";_d.setStyle(ghost,"opacity","0.8");setTimeout(function(){_d.setStyle(target,"opacity","0.5");},0);if(options.ghostSize){_d.setSize(ghost,options.ghostSize[0],options.ghostSize[1]);xy=[e.clientX+QZFL.dom.getScrollLeft()-30,e.clientY+QZFL.dom.getScrollTop()-20];}else{_d.setSize(ghost,size[0]-2,size[1]-2);}_d.setXY(ghost,xy[0],xy[1]);hasGhost=true;}else{xy=[parseInt(_d.getStyle(target,"left")),parseInt(_d.getStyle(target,"top"))];}var dragTarget=ghost||target;this.currentDragCache={size:size,xy:xy,mXY:xy,dragTarget:dragTarget,target:target,x:e.clientX-parseInt(xy[0]),y:e.clientY-parseInt(xy[1]),ghost:ghost,hasGhost:hasGhost,isAbsolute:isAbsolute,options:options,scrollRangeTop:QZFL.dragdrop._scrollRange,scrollRangeBottom:QZFL.dom.getClientHeight()-QZFL.dragdrop._scrollRange,maxScrollRange:Math.max(QZFL.dom.getScrollHeight()-QZFL.dom.getClientHeight(),0)};_e.on(document,"mousemove",_e.bind(this,this.doDrag),[handlerId,this.currentDragCache,options]);_e.on(document,"mouseup",_e.bind(this,this.endDrag),[handlerId,this.currentDragCache,options]);this.dragdropPool[handlerId].onStartDrag.apply(null,[e,handlerId,this.currentDragCache,options]);_e.preventDefault();},doDrag:function(e,handlerId,dragCache,options){var pos={};if(options.autoScroll){if(e.clientY<dragCache.scrollRangeTop){if(!QZFL.dragdrop._scrollTop){QZFL.dragdrop._stopScroll();QZFL.dragdrop._scrollTimer=setTimeout(function(){QZFL.dragdrop._doScroll(true,dragCache)},200);}}else if(e.clientY>dragCache.scrollRangeBottom){if(!QZFL.dragdrop._scrollBottom){QZFL.dragdrop._stopScroll();QZFL.dragdrop._scrollTimer=setTimeout(function(){QZFL.dragdrop._doScroll(false,dragCache)},200);}}else{QZFL.dragdrop._stopScroll();}}var mX=e.clientX-dragCache.x;var mY=e.clientY-dragCache.y;var xy=this._countXY(mX,mY,dragCache.size,options);mX=xy.x;mY=xy.y;QZFL.dom.setXY(dragCache.dragTarget,mX,mY);dragCache.mXY=[mX,mY];this.dragdropPool[handlerId].onDoDrag.apply(null,[e,handlerId,dragCache,options]);if(QZFL.userAgent.ie){document.body.setCapture();}else if(window.captureEvents){window.captureEvents(Event.MOUSEMOVE|Event.MOUSEUP);}QZFL.event.preventDefault();},endDrag:function(e,handlerId,dragCache,options){var _d=QZFL.dom;if(dragCache.hasGhost){QZFL.dom.removeElement(dragCache.dragTarget);var _t=dragCache.target;setTimeout(function(){QZFL.dom.setStyle(_t,"opacity","1");_t=null;},0);if(dragCache.isAbsolute){var x=parseInt(_d.getStyle(dragCache.target,"left"))+(dragCache.mXY[0]-dragCache.xy[0]);var y=parseInt(_d.getStyle(dragCache.target,"top"))+(dragCache.mXY[1]-dragCache.xy[1]);var xy=this._countXY(x,y,dragCache.size,options);QZFL.dom.setXY(dragCache.target,xy.x,xy.y);}}QZFL.event.removeEvent(document,"mousemove");QZFL.event.removeEvent(document,"mouseup");this.dragdropPool[handlerId].onEndDrag.apply(null,[e,handlerId,dragCache,options]);dragCache=null;QZFL.dragdrop._stopScroll();if(QZFL.userAgent.ie){document.body.releaseCapture();}else if(window.releaseEvents){window.releaseEvents(Event.MOUSEMOVE|Event.MOUSEUP);}},_doScroll:function(isUp,dc){step=isUp?-15:15;var _st=QZFL.dom.getScrollTop();if(isUp&&_st+step<0){step=0;}if(!isUp&&_st+step>dc.maxScrollRange){step=0;}QZFL.dom.setScrollTop(_st+step);dc.y=dc.y-step;QZFL.dragdrop._scrollTop=isUp;QZFL.dragdrop._scrollBottom=!isUp;QZFL.dragdrop._scrollTimer=setTimeout(function(){QZFL.dragdrop._doScroll(isUp,dc)},16);},_stopScroll:function(){QZFL.dragdrop._scrollTop=QZFL.dragdrop._scrollBottom=false;clearTimeout(QZFL.dragdrop._scrollTimer);},_countXY:function(x,y,size,options){var pos={x:x,y:y};if(options.x){pos["x"]=parseInt(pos["x"]/options.x,10)*options.x+(pos["x"]%options.x<options.x/2?0:options.x);}if(options.y){pos["y"]=parseInt(pos["y"]/options.y,10)*options.y+(pos["y"]%options.y<options.y/2?0:options.y);}if(options.range){var _r=options.range;var i=0,j=0;while(i<_r.length&&j<2){if(typeof _r[i]!="number"){i++;continue;};var k=i%2?"x":"y";var v=pos[k];pos[k]=i<2?Math.max(pos[k],_r[i]):Math.min(pos[k],_r[i]-size[(i+1)%2]);if(pos[k]!=v){j++;};i++;}}return pos;}};QZFL.dragdrop.eventController=function(){this.onStartDrag=QZFL.emptyFn;this.onDoDrag=QZFL.emptyFn;this.onEndDrag=QZFL.emptyFn;};QZFL.element.extendFn({dragdrop:function(target,options){var _arr=[];this.each(function(){_arr.push(QZFL.dragdrop.registerDragdropHandler(this,target,options));});return _arr;},unDragdrop:function(target,options){this.each(function(){_arr.push(QZFL.dragdrop.unRegisterDragdropHandler(this));});}});QZFL.widget.Confirm=function(title,content,config){this.buttonLayout="confirm_button_"+QZFL.widget.Confirm.count;this.title=title||"这里是标题";this.hasTitle=true;this.content='<div style="__CONTENT_STYLE__"><div class="layer_opensns_confirm_cont">'+(content||"这里是内容")+'</div></div><div id="'+this.buttonLayout+'" class="layer_opensns_confirm_bt"></div>';var isNewInterface=false;if((config!=null)&&(typeof(config)=="object")){var iconHash={"warn":"icon_hint_warn","error":"icon_hint_error","succ":"icon_hint_succeed","help":"icon_hint_help"};isNewInterface=true;this.hasTitle=(typeof(config.hastitle)=='undefined')?true:config.hastitle;this.focusBtn=(typeof(config.focusBtn)=='undefined')?0:config.focusBtn;if(!this.hasTitle){this.content='<div style="background-color:white;height:160px;width:350px;border:2px #6B97C1 solid"><div style="height:89px;padding:18px;"><img style="position:absolute; top:40px; left:40px;" class="'+iconHash[config.icontype]+'" alt="" src="http://imgcache.qq.com/ac/b.gif"/><h1 style="font-size: 14px; position: absolute; top: 40px; left: 76px; color:#424242;">'+(content||"test")+'</h1></div><div id="'+this.buttonLayout+'" class="global_tip_button tx_r" style="text-align:right !important"></div></div>';}}this.type=(isNewInterface?config.type:config)||1;var _tips=isNewInterface?config.tips:arguments[3];this.tips=_tips?[_tips[0]?_tips[0]:"是",_tips[1]?_tips[1]:"否",_tips[2]?_tips[2]:"取消"]:["是","否","取消"];this.showMask=(typeof(config.showMask)=="undefined")?true:config.showMask;this.onConfirm=QZFL.emptyFn;this.onNo=QZFL.emptyFn;this.onCancel=QZFL.emptyFn;QZFL.widget.Confirm.count++;};QZFL.widget.Confirm.count=0;QZFL.widget.Confirm.TYPE={OK:1,NO:2,OK_NO:3,CANCEL:4,OK_CANCEL:5,NO_CANCEL:6,OK_NO_CANCEL:7};QZFL.widget.Confirm.prototype.show=function(width,height,cssText){var _lastTween=QZFL.dialog.tween;QZFL.dialog.tween=false;if(!this.hasTitle){this.dialog=QZFL.dialog.createBorderNone(this.content,width||"352",height||"160");}else{this.content=this.content.replace(/__CONTENT_STYLE__/,'width:100%;height:'+(parseInt(height||"140")-58)+'px;'+cssText);this.dialog=QZFL.dialog.create(this.title,this.content,width||"300",height||"140");}if(this.type&1){var _d=this._createButton(this.onConfirm,0);(this.focusBtn&1)&&_d.focus();}if(this.type&2){var _d=this._createButton(this.onNo,1);(this.focusBtn&2)&&_d.focus();}if(this.type&4){var _d=this._createButton(this.onCancel,2);(this.focusBtn&4)&&_d.focus();}this.dialog.onUnload=QZFL.event.bind(this,function(){this.hide();if(this.type==1){this.onConfirm();}else{this.onCancel();}});this._keyEvent=QZFL.event.bind(this,this.keyPress);QZFL.event.addEvent(document,"keydown",this._keyEvent);QZFL.dialog.tween=_lastTween;if(QZFL.maskLayout&&this.showMask){setTimeout((function(me,zi){return function(){if(me.dialog){me.maskId=QZFL.maskLayout.create(--zi);}};})(this,this.dialog.getZIndex()),0);}};QZFL.widget.Confirm.prototype.keyPress=function(e){e=QZFL.event.getEvent(e);if(e.keyCode==27){this.hide();}};QZFL.widget.Confirm.prototype._createButton=function(e,tipsId,style){var el=QZFL.dom.get(this.buttonLayout),_d=QZFL.dom.createElementIn("button",el,false);style&&(_d.className=style);_d.innerHTML=this.tips[tipsId];QZFL.event.addEvent(_d,"click",QZFL.event.bind(this,function(){e();this.hide();}));return _d;};QZFL.widget.Confirm.prototype.hide=function(){this.dialog.onUnload=QZFL.emptyFn;this.dialog.unload();this.dialog=null;QZFL.event.removeEvent(document,"keydown",this._keyEvent);this._keyEvent=null;if(this.maskId){QZFL.maskLayout.remove(this.maskId);}};QZFL.widget.msgbox={_timer:null,cssPath:"http://"+(window.g_ImgCacheDomain||'qzonestyle.gtimg.cn')+"/ac/qzone/qzfl/css/msgbox.css",_cssLoad:false,useTween:true,_loadCss:function(){var th=QZFL.widget.msgbox;if(!th._cssLoad){QZFL.css.insertCSSLink(th.cssPath);th._cssLoad=true;}},show:function(msgHtml,type,timeout,topPosition){QZFL.widget.msgbox._loadCss();var template='<div id="mode_tips_v2" class="gb_tip_layer" style="display:none;z-index:10000;"><div class="gtl_ico_{type}"></div>{loadIcon}{msgHtml}<div class="gtl_end"></div></div>',loading='<img src="http://'+(window.g_ImgCacheDomain||'qzonestyle.gtimg.cn')+'/qzonestyle/qzone_client_v5/img/loading.gif" alt="" />',typeClass={0:"hits",1:"hits",2:"hits",3:"hits",4:"succ",5:"fail",6:"clear"},mBox,tips;mBox=QZFL.dom.get("q_Msgbox")||QZFL.dom.createElementIn("div",document.body,false,{style:"height:0px;"});mBox.id="q_Msgbox";mBox.style.display="";mBox.innerHTML=QZFL.string.format(template,{type:typeof(type)=="number"?(type>6?typeClass[0]:typeClass[type]):typeClass[0],msgHtml:msgHtml,loadIcon:type==6?loading:""});QZFL.widget.msgbox._setPosition(mBox.firstChild,timeout,topPosition);},_setPosition:function(tips,timeout,topPosition){if(QZFL.userAgent.ie&&QZFL.userAgent.ie<7){if(typeof topPosition!="number"){QZFL.dom.setStyle(tips,"top",(QZFL.dom.getClientHeight()/2+QZFL.dom.getScrollTop()-40)+"px");}}else{QZFL.dom.setStyle(tips,"position","fixed");}if(typeof(topPosition)=='number'){QZFL.dom.setStyle(tips,"top",topPosition+"px");}clearTimeout(QZFL.widget.msgbox._timer);if(QZFL.widget.msgbox.useTween&&QZFL.Tween){var tween=new QZFL.Tween(tips,"opacity",QZFL.transitions.regularEaseIn,0,1,0.25);tween.onMotionStart=function(){tips.style.display="";if(timeout){QZFL.widget.msgbox._timer=setTimeout(QZFL.widget.msgbox.hide,timeout);}};tween.onMotionStop=function(){tween=null;};tween.start();}else{tips.style.display="";timeout&&(QZFL.widget.msgbox._timer=setTimeout(QZFL.widget.msgbox.hide,timeout));}},hide:function(timeout){if(timeout){clearTimeout(QZFL.widget.msgbox._timer);QZFL.widget.msgbox._timer=setTimeout(QZFL.widget.msgbox._hide,timeout);}else{QZFL.widget.msgbox._hide();}},_hide:function(){var _mBox=QZFL.dom.get("q_Msgbox");clearTimeout(QZFL.widget.msgbox._timer);if(_mBox){var _tips=_mBox.firstChild;if(QZFL.widget.msgbox.useTween&&QZFL.Tween){var tween=new QZFL.Tween(_tips,"opacity",QZFL.transitions.regularEaseOut,1,0,0.75);tween.onMotionStop=function(){QZFL.dom.setStyle(_mBox,"display","none");tween=null;};tween.start();}else{QZFL.dom.setStyle(_mBox,"display","none");}}}};window.V=window.V||{};V.dialog=V.dialog||(function(){function show(title,content,width,height,opt){opt=opt||{};var useTween=opt.useTween,noBorder=opt.noBorder,callback=opt.callback;var _dialog=QZFL.dialog.create(title,content,width,height,useTween,noBorder);var _maskID=QZFL.maskLayout.create();_dialog.onUnload=function(){if(typeof callback=='function'){callback();}QZFL.maskLayout.remove(_maskID);};return _dialog;};return{show:show};})();V.login=V.login||(function(){var _RET_HASH={'SUCCESS':0,'FAIL':1,'CANCEL':2};var _dialog=null;var _targetWindow=null;var _sUrl='';var _appCallback=null;function _callback(ret){if(_appCallback){_appCallback(ret);if(ret===_RET_HASH['SUCCESS']){_appCallback=null;hide();}}else{if(ret===_RET_HASH['SUCCESS']){_targetWindow.location.href=_sUrl;}else if(ret===_RET_HASH['FAIL']){hide();alert('登录失败');}}};function _dialogCallback(){if(_appCallback){_appCallback(_RET_HASH['CANCEL']);}};function show(opt){opt=opt||{};var _html='<iframe scrolling="no" style="width: 370px; height: 278px;" frameborder="0" allowtransparency="yes" src="http://qzs.qq.com/qzone/vas/login/jump.html"></iframe>';_targetWindow=opt.targetWindow||window;_sUrl=opt.sUrl||location.href;_appCallback=typeof opt.callback=='function'?opt.callback:null;_dialog=V.dialog.show('登录',_html,372,280,{callback:QZFL.event.bind(this,_dialogCallback)});};function hide(){_dialog.unload();};function exit(target){QZFL.object.each(['uin','skey','zzpaneluin','zzpanelkey'],function(value){QZFL.cookie.set(value,'');});target?window.location.href=target:window.location.reload();};function resize(w,h){if(_dialog){_dialog.setSize(w,h);}};function getUin(){var uin=QZFL.cookie.get('uin')||QZFL.cookie.get('zzpaneluin');if(uin.length>4){return+uin.replace(/o(\d+)/g,'$1');}return 0;};function getUinsInfo(uins,callback){var _url='http://r.qzone.qq.com/fcg-bin/cgi_get_score.fcg?mask=4&uins=';var g=new QZFL.JSONGetter(_url+uins.join(','),Math.random().toString(),null);g.onSuccess=function(o){callback(o);};g.onError=function(){return;};g.send('portraitCallBack');};function call(opt){var callback;opt=opt||{};if(getUin()){opt.callback&&opt.callback();return;}if(opt.callback){callback=opt.callback;opt.callback=function(ret){if(ret==_RET_HASH['SUCCESS']){callback();opt.onLoginSuccess&&opt.onLoginSuccess();}else if(ret==_RET_HASH['CANCEL']){opt.onLoginCancel&&opt.onLoginCancel();}else{opt.onLoginFail&&opt.onLoginFail();}};}show(opt);};return{_callback:_callback,RET_HASH:_RET_HASH,show:show,hide:hide,exit:exit,resize:resize,getUin:getUin,getUinsInfo:getUinsInfo,call:call};})();window.O=window.O||{};O.onDomReady=function(fn){if(typeof fn==='function'){O.onDomReady._fn.push(fn);}};O.onDomReady._fn=[];QZFL.event.onDomReady(function(){while(O.onDomReady._fn.length>0){O.onDomReady._fn.pop()();}});O.util={getUrlParam:function(name){var r=new RegExp('(\\?|#|&)'+name+'=([^&]*)(&|$)');var m=location.href.match(r);return(m?m[2]:'');},toUrlParam:function(obj){var res=[];if(!obj){return'';}for(var p in obj){if(typeof obj[p]=='string'||typeof obj[p]=='number'){res.push(p+'='+obj[p]);}}return res.join('&');},appendUrlParam:function(url,param,isHashMode){var op=isHashMode?'#':'?';if(typeof param=='string'){param=param.replace(/^&/,'');}else{param=O.util.toUrlParam(param);}if(!param){return url;}if(url.indexOf(op)==-1){url+=op;}if(url.charAt(url.split('').length-1)==op){url+=param;}else{url+='&'+param;}return url;},tmpl:(function(){var cache={};function _getTmplStr(rawStr,mixinTmpl){if(mixinTmpl){for(var p in mixinTmpl){var r=new RegExp('<%#'+p+'%>','g');rawStr=rawStr.replace(r,mixinTmpl[p]);}}return rawStr;};return function tmpl(str,data,opt){opt=opt||{};var key=opt.key,mixinTmpl=opt.mixinTmpl,strIsKey=!/\W/.test(str);key=key||(strIsKey?str:null);var fn=key?cache[key]=cache[key]||tmpl(_getTmplStr(strIsKey?document.getElementById(str).innerHTML:str,mixinTmpl)):new Function("obj","var _p_=[],print=function(){_p_.push.apply(_p_,arguments);};with(obj){_p_.push('"+str.replace(/[\r\t\n]/g," ").split("\\'").join("\\\\'").split("'").join("\\'").split("<%").join("\t").replace(/\t=(.*?)%>/g,"',$1,'").split("\t").join("');").split("%>").join("_p_.push('")+"');}return _p_.join('');");return data?fn(data):fn;};})(),getToken:function(){var hash=5381,str=QZFL.cookie.get('skey');if(!str){return 0;}for(var i=0,len=str.length;i<len;++i){hash+=(hash<<5)+str.charAt(i).charCodeAt();}return hash&0x7fffffff;},adjustHeight:function(frame,minHeight){var cw,doc,bdy,docEl,isBC,height=0;if(!frame){return;}try{cw=frame.contentWindow;doc=cw.document;var head=doc.getElementsByTagName('head')[0];}catch(e){setTimeout(function(){O.util.adjustHeight(frame,minHeight);},1000);return;}try{if((bdy=doc.body)&&(docEl=doc.documentElement)){isBC=doc.compatMode=="BackCompat";height=ua.ie?(isBC?bdy.scrollHeight:docEl.scrollHeight):(isBC?bdy.offsetHeight:docEl.offsetHeight);(frame.height!=height)&&(frame.height=Math.max(minHeight,height));if(!cw._frameHack){docEl.style.overflowY=bdy.style.overflowY="hidden";cw._frameHack=true;}}}catch(ignore){}finally{setTimeout(function(){O.util.adjustHeight(frame,minHeight);},1000);}},formatDate:function(date){if(typeof date==='number'){date=new Date(date*1000);}var year=date.getFullYear(),month=date.getMonth()+1,date=date.getDate();return[year,'-',month<10?'0':'',month,'-',date<10?'0':'',date].join('');}};O.validation=function(id,validateFn,errMsg){var ctrl=$(id);if(ctrl){var _fn=function(needRet,cancel){var res=true;if(cancel!==true&&typeof validateFn==='function'){res=!!validateFn.call(this);}var ctrlRes;if(!(ctrlRes=O.validation._ctrlMap[id])){ctrlRes=O.validation._ctrlMap[id]=document.createElement('span');ctrl.nextSibling?ctrl.parentNode.insertBefore(ctrlRes,ctrl.nextSibling):ctrl.parentNode.appendChild(ctrlRes);}ctrl.className=((ctrl.tagName.toLowerCase()=='textarea')?(res?'txtarea':'txtarea ipt_red'):(res?'ipt':'ipt ipt_red'));ctrlRes.className=((cancel===true)?'':(res?'ok':'ts'));ctrlRes.innerHTML=(res?'':(typeof errMsg==='function'?errMsg.call(ctrl):errMsg));if(needRet===true){return res;}};O.validation._fnMap[id]=_fn;QZFL.event.on(ctrl,'blur',_fn);QZFL.event.on(ctrl,'focus',function(){this.style.color='#333';});}};O.validation._ctrlMap={};O.validation._fnMap={};O.validation.bindForm=function(form,cancel,fn){var _self=O.validation.bindForm;_self._form=(form||document.forms[0]);_self._fn=[O.validation.validate];if(fn){if(typeof fn==='function'){_self._fn.push(fn);}else{_self._fn=_self._fn.concat(fn);}}_self._form.onsubmit=function(){for(var i=0,len=_self._fn.length;i<len;i++){var res=_self._fn[i].apply(_self._form);if(!res){return false;}}return true;};$e('input',_self._form).each(_self._modifyNotify);$e('select',_self._form).each(_self._modifyNotify);$e('textarea',_self._form).each(_self._modifyNotify);_self._form.onreset=_self._onReset;_self._cancel=$(cancel||'needConfirm');if(_self._cancel&&_self._cancel.tagName.toLowerCase()=='a'){_self._cancel.onclick=_self._onReset;}};O.validation.bindForm._modifyNotify=function(){var _self=O.validation.bindForm;_self._oriValData=(_self._oriValData||{});if(this.type=='submit'||this.type=='button'||this.type=='reset'||this.type=='image'||this.type=='file'||this.type=='hidden'){return;}if(this.type=='radio'||this.type=='checkbox'){_self._oriValData[this.id]=this.checked;}else{_self._oriValData[this.id]=this.value;}};O.validation.bindForm._showConfirm=function(){var _self=O.validation.bindForm;var c=new QZFL.widget.Confirm('取消','<div style="height:40;">是否要取消该表单？您所作的更改将会丢失。</div>',{type:3,hastitle:true,focusBtn:2});c.onConfirm=function(){_self._confirmed=true;if(_self._cancel&&_self._cancel.href){location.href=_self._cancel.href;}else{_self._form.reset();}};c.show(350,150);};O.validation.bindForm._onReset=function(){var _self=O.validation.bindForm;if(!_self._oriValData||_self._confirmed){_self._confirmed=false;return true;}for(var id in _self._oriValData){var oriVal=_self._oriValData[id];if(typeof oriVal==='undefined'){continue;}var ctrl=$(id);if(ctrl.type=='submit'||ctrl.type=='button'||ctrl.type=='reset'||ctrl.type=='image'||ctrl.type=='file'||ctrl.type=='hidden'){continue;}var res;if(ctrl.type=='radio'||ctrl.type=='checkbox'){res=(oriVal==ctrl.checked);}else{res=(oriVal==ctrl.value);}if(!res){_self._showConfirm();return false;}}return true;};O.validation.validate=function(){var res=true;for(var id in O.validation._fnMap){var ctrl=$(id);O.validation._fnMap[id].call(ctrl,true)||(res=false);}return res;};O.validation.cancelValidate=function(){for(var id in O.validation._fnMap){var ctrl=$(id);O.validation._fnMap[id].call(ctrl,false,true);}};O.validation.requiredFieldValidation=function(){return O.validation.requiredFieldValidation._regExp.test(QZFL.string.trim(this.value));};O.validation.requiredFieldValidation._regExp=/^.+$/;O.validation.strictFieldValidation=function(){return O.validation.strictFieldValidation._regExp.test(this.value);};O.validation.strictFieldValidation._regExp=/^[0-9A-Za-z\u4E00-\u9FA5\uF900-\uFA2D](([0-9A-Za-z\s\u4E00-\u9FA5\uF900-\uFA2D]*[0-9A-Za-z\u4E00-\u9FA5\uF900-\uFA2D]$)|$)/;O.validation.emailFieldValidation=function(){return O.validation.emailFieldValidation._regExp.test(this.value);};O.validation.emailFieldValidation._regExp=/^[0-9A-Za-z\-\_\.]+\@[0-9A-Za-z\-\_]+(\.[0-9A-Za-z\-\_]+)+$/;O.validation.urlFieldValidation=function(){return O.validation.urlFieldValidation._regExp.test(this.value);};O.validation.urlFieldValidation._regExp=/^http(s)*:\/\/[0-9A-Za-z\-\_]+(\.[0-9A-Za-z\-\_]+)+(\/[0-9A-Za-z\-\_\.\%]+)*\/?$/;O.validation.phoneNumberFieldValidation=function(){return O.validation.phoneNumberFieldValidation._regExp.test(this.value);};O.validation.phoneNumberFieldValidation._regExp=/^([0-9]+\-)*[0-9]+$/;O.validation.uinFieldValidation=function(){if(!O.validation.uinFieldValidation._regExp.test(this.value)){return false;}var uin=parseInt(this.value);return(uin>10000);};O.validation.uinFieldValidation._regExp=/^[1-9][0-9]{4,9}$/;O.onDomReady(function(){window.TCISD&&TCISD.pv&&TCISD.pv();});O.onDomReady(function(){var returnTop=$('returnTop');if(window.g_CurrentPage&&g_CurrentPage>=0&&g_CurrentPage!=1&&returnTop){returnTop.className='to_top';returnTop.style.position='absolute';returnTop.style.top='auto';returnTop.style.left='auto';returnTop.style.bottom='0px';returnTop.style.right='0px';QZFL.event.on(returnTop,'click',function(){var _doc=document;_doc[(_doc.compatMode=="CSS1Compat"&&!QZFL.userAgent.webkit)?"documentElement":"body"].scrollTop=0;});if(QZFL.userAgent.chrome){QZFL.event.on(window,'scroll',function(){if(returnTop){returnTop.style.bottom='-'+Math.max(document.body.scrollTop,document.documentElement.scrollTop)+'px';}});}else if(QZFL.userAgent.ie<7){QZFL.event.on(window,'scroll',function(){if(returnTop){returnTop.style.bottom='auto';returnTop.style.top=(document.documentElement.scrollTop+document.documentElement.clientHeight-41)+'px';}});}else{returnTop.style.position='fixed';}}});O.onDomReady(function(){var forms=document.forms;for(var i=0,len=forms.length;i<len;i++){QZFL.dom.createElementIn('input',forms[i],true,{type:'hidden',name:'token',value:O.util.getToken()});}});O.onDomReady(function(){var uin=V.login.getUin();var userInfo={login:uin>=10000,uin:uin,nick:''};var postInit=function(){var loginInfo='loginInfo';loginInfo=$(loginInfo);if(loginInfo){if(userInfo.login){loginInfo.innerHTML=userInfo.nick+' <a href="javascript:void(0);" onclick="V.login.exit();return false">退出</a>';}else{loginInfo.innerHTML='<a href="javascript:void(0);" onclick="V.login.show();return false">登录</a>';}}};if(userInfo.login){V.login.getUinsInfo([uin],function(obj){if(obj&&obj[uin]){var info=obj[uin];userInfo.nick=info[6];}postInit();});}else{postInit();}});/*  |xGv00|ea68b4bf18c8d0d6a7368e1c15d260e1 */
