var arrInfo={};var positionTip=-120;function _setMessage(sender,reciver,message_tip,message,type){var obj=swfobject.getObjectById("sc");try{obj._setMessage(sender,reciver,message_tip,message,type);}catch(e){}};function popTipWindow(usr_id,message_tip,message,headpic,type){var msgid="message"+usr_id;var msg="未知消息";switch(type){case 1:msg='<a href="/p/'+usr_id+'" style="color:#A30782;" target="_blank">'+message+'</a>';break;case 2:msg='<a href="/?page=who_winked" style="color:#A30782;" target="_blank">'+message+'</a>';break;case 3:msg='<a href="/?page=webmail_view_message&prof_id='+usr_id+'" style="color:#A30782;" target="_blank">'+message+'</a>';break;case 4:msg='<a href="/p/'+usr_id+' style="color:#A30782;" target="_blank">'+message+'</a>';break;case 5:msg='<a href="/?page=my_cart" style="color:#A30782;" target="_blank">'+message+'</a>';break;case 9:msg='<a href="javascript:void(0);" style="color:#A30782;" onclick="javascript:open_love('+usr_id+')">'+message+'</a>';break;case 12:msg='<a href="/?page=webmail_view_message&prof_id='+usr_id+'" style="color:#A30782;" target="_blank">'+message+'</a>';break;case 6:msg='<span style="color:#A30782;">'+message+'</span>';break;case 11:msg='<span style="color:#A30782;">'+message+'</span>';break;default:msg='ok';}
positionTip=positionTip+120;$.messager.setTip(usr_id,positionTip,headpic);$.messager.showTip(message_tip,msg,0);getStaut();setTimeout(function(){extendClose(msgid);},20000);};function open_love($match_id){window.open("/?page=tn_love&match_id="+$match_id+"&p=0","","width=784,height=756,top=200,left=200,toolbar=no,menubar=no,scrollbars=yes,resizable=no,location=no,status=no");}

function ajax_add_chat(usr_id,rec_id){$.get("/?page=ajax_add_chat",{usr_id:usr_id,rec_id:rec_id},function(text){if(text!='1')
_window.Alert(text,"警告");});}
function chkemail(str){var patrn=/^[\w-\.]+@[\w-]+(\.[\w-]+)+$/;return patrn.test(str);}
function show_offline(usr_id){var offline_tip=_window.Confirm("啊哦！TA现在不在线，不能聊天，给TA发站内邮件吧~",'提示');offline_tip.OnOK=function(){send_email(usr_id);this.Close();}
offline_tip.OnCANCEL=function(){this.Close();}}
function reloadimg(imgid){var headimg=$("#"+imgid).attr("src");$("#"+imgid).attr("src",headimg+"?t="+Math.random());}
function base64encode(str){var base64EncodeChars="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";var out,i,len;var c1,c2,c3;len=str.length;i=0;out="";while(i<len){c1=str.charCodeAt(i++)&0xff;if(i==len){out+=base64EncodeChars.charAt(c1>>2);out+=base64EncodeChars.charAt((c1&0x3)<<4);out+="==";break;}
c2=str.charCodeAt(i++);if(i==len){out+=base64EncodeChars.charAt(c1>>2);out+=base64EncodeChars.charAt(((c1&0x3)<<4)|((c2&0xF0)>>4));out+=base64EncodeChars.charAt((c2&0xF)<<2);out+="=";break;}
c3=str.charCodeAt(i++);out+=base64EncodeChars.charAt(c1>>2);out+=base64EncodeChars.charAt(((c1&0x3)<<4)|((c2&0xF0)>>4));out+=base64EncodeChars.charAt(((c2&0xF)<<2)|((c3&0xC0)>>6));out+=base64EncodeChars.charAt(c3&0x3F);}
return out;}
function base64decode(str){var base64DecodeChars=new Array(-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,62,-1,-1,-1,63,52,53,54,55,56,57,58,59,60,61,-1,-1,-1,-1,-1,-1,-1,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,-1,-1,-1,-1,-1,-1,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,-1,-1,-1,-1,-1);var c1,c2,c3,c4;var i,len,out;len=str.length;i=0;out="";while(i<len){do{c1=base64DecodeChars[str.charCodeAt(i++)&0xff];}while(i<len&&c1==-1);if(c1==-1)break;do{c2=base64DecodeChars[str.charCodeAt(i++)&0xff];}while(i<len&&c2==-1);if(c2==-1)break;out+=String.fromCharCode((c1<<2)|((c2&0x30)>>4));do{c3=str.charCodeAt(i++)&0xff;if(c3==61)return out;c3=base64DecodeChars[c3];}while(i<len&&c3==-1);if(c3==-1)break;out+=String.fromCharCode(((c2&0XF)<<4)|((c3&0x3C)>>2));do{c4=str.charCodeAt(i++)&0xff;if(c4==61)return out;c4=base64DecodeChars[c4];}while(i<len&&c4==-1);if(c4==-1)break;out+=String.fromCharCode(((c3&0x03)<<6)|c4);}
return out;}
function ajax_stolen_cart(usr_id,profile_id,match_id,id,profile_netname,match_netname){$.get("/?page=ajax_cart_check",{match_id:match_id,profile_id:profile_id,stolen_cart:1},function(txt){if(txt=="low_level"){_window.Open("很遗憾！您的等级比宝贝的等级还低哟，要想淘他就赶快升级吧！","提示",'height=80',[{id:'COMMON-BUTTON',className:'COMMON-BUTTON-ON',value:"我要升级",click:function(e){this.Close();top.location.href='/?page=charm_detail';}},{id:'COMMON-BUTTON',className:'COMMON-BUTTON-ON',value:"放弃",click:function(e){this.Close();}}]);return false;}else if(txt=="full_cart"){_window.Open("很遗憾！购物车已满，要想淘他就赶快升级吧！","提示",'height=80',[{id:'COMMON-BUTTON',className:'COMMON-BUTTON-ON',value:"我要升级",click:function(e){this.Close();top.location.href='/?page=charm_detail';}},{id:'COMMON-BUTTON',className:'COMMON-BUTTON-ON',value:"放弃",click:function(e){this.Close();}}]);return false;}else if(txt=="is_exist"){_window.Alert("该宝贝已经在您的购物车里，淘淘其他宝贝？","提示");return false;}else if(txt=="f_b"){_window.Alert(" 宝贝和您都需要休息，请过十分钟再来吧！","提示");return false;}else if(txt=="stolen_low_level"){var solen_low_window=_window.Alert("啊哦！您的等级小于该淘手，不能抢她的宝贝哦，快去赚取魅力提升等级吧！","提示");solen_low_window.OnOK=function(){solen_low_window.Close();top.location.href="/?page=charm_detail";}
return false;}else{var stolen_cart_window=_window.Confirm("确定要将该宝贝抢入您的购物车？",'提示');stolen_cart_window.OnOK=function(){$.get("/?page=ajax_stolen_cart",{match_id:match_id,profile_id:profile_id,id:id,match_netname:match_netname,profile_netname:profile_netname},function(text){if(text==1){var stolen_cart_suc_window=_window.Alert("恭喜！抢宝贝成功，宝贝现在属于您啦好好爱护吧！","提示");stolen_cart_suc_window.OnOK=function(){stolen_cart_suc_window.Close();top.location.href="/?page=my_cart";}}else if(text==2){_window.Alert("啊哦！抢宝贝失败，被淘手发现啦快跑！","提示");}else if(text=='full_cart'){_window.Open("很遗憾！购物车已满，要想淘他就赶快升级吧！","提示",'height=80',[{id:'COMMON-BUTTON',className:'COMMON-BUTTON-ON',value:"我要升级",click:function(e){this.Close();top.location.href='/?page=charm_detail';}},{id:'COMMON-BUTTON',className:'COMMON-BUTTON-ON',value:"放弃",click:function(e){this.Close();}}]);return false;}else{_window.Alert("抢宝贝失败，请重试！","提示");}});this.Close();}
stolen_cart_window.OnCANCEL=function(){this.Close();}}});}
function ajax_stolen_place(usr_id,gender,place_id){if(usr_id==''){var solen_place_window=_window.Alert("请登录后再抢哦！","提示");solen_place_window.OnOK=function(){solen_place_window.Close();location.href="/?page=login";}
return false;}else if(gender==1){var solen_place_window=_window.Alert("很抱歉，只有宝贝才能抢该位置！","提示");}else{$.get("/?page=ajax_stolen_place",{place_id:place_id},function(txt){if(txt==3){_window.Alert("很抱歉，只有宝贝才能抢该位置","提示");return false;}else if(txt==2){_window.Alert("很抱歉，您还没有形象照或者形象照还在审核中！","提示");return false;}else if(txt==4){_window.Alert("很抱歉，促销宝贝位置已满，明天赶早哦！","提示");return false;}else if(txt==5){_window.Alert("很抱歉，您已经在促销宝贝中了，不能再抢！","提示");return false;}else if(txt==6){_window.Alert("很抱歉，您的资料正在审核中，审核后才能抢！","提示");return false;}else if(txt==1){var solen_place_window=_window.Alert("恭喜您，您成功的抢到该促销宝贝的位置，很多人会关注您的哦！","提示");solen_place_window.OnOK=function(){solen_place_window.Close();location.href="/?page=charm_ranking";}
return true;}else{_window.Alert("很抱歉，操作失败，加把劲再试试！","提示");}});}}
function add_to_blacklist(match_id,netname){var buttons=[{id:'COMMON-BUTTON_BLOCK_YES',className:'COMMON-BUTTON-ON-LENGTH',value:"是，不想TA骚扰我 ",click:function(e){this.Close();$.get("/?page=ajax_add_to_blocklist",{match_id:match_id},function(txt){if(txt=="suc"){_window.Alert("恭喜您！在您将TA移除黑名单之前，TA再也骚扰不到您了。",'提示');window.location.href="/?page=webmail_message&type=black";}else if(txt=="is_exist"){_window.Alert("啊哦！TA已经在您的黑名单里了，正等着您将TA移除呢。","提示");window.location.href="/?page=webmail_message&type=black";}else{_window.Alert("加入失败","提示");}});}},{id:'COMMON-BUTTON_BLOCK_NO',className:'COMMON-BUTTON-ON-LENGTH',value:"否，点错了",click:function(e){this.Close();}}];var title="确定把<font color='#a2077f'>"+netname+"</font>放入您的黑名单吗？";var block_wnd=_window.Confirm(title,'提示','',buttons);}
function wink_simple(){window.location.href="/?page=who_winked_simple";}
(function(){var ua=navigator.userAgent.toLowerCase();var is=(ua.match(/\b(chrome|opera|safari|msie|firefox)\b/)||['','mozilla'])[1];var r='(?:'+is+'|version)[\\/: ]([\\d.]+)';var v=(ua.match(new RegExp(r))||[])[1];jQuery.browser.is=is;jQuery.browser.ver=v;jQuery.browser[is]=true;})();(function(jQuery){this.version='@1.5';this.layer={'width':204,'height':99};this.title='信息提示';this.time=4000;this.anims={'type':'slide','speed':600};this.timer1=null;this.usr_id=0;this.pBottom=0;this.headpic="";this.message_name="message";this.opmessage="#";this.inits=function(title,text){var wnd_html='<div id="'+this.message_name+'" style="z-index:100;width:'
+this.layer.width
+'px;height:'
+this.layer.height
+'px;position:fixed;_position:absolute; bottom:'+this.pBottom+'px; right:0; overflow:hidden;background-image:url(/s/zh_cn/insidepage/market/default/images/alert_bg.gif);" class="alertTip">'
+'<div style="float:left;width:100px;padding-left:10px;padding-top:5px;font-weight:bold;"><a href="/p/'+this.usr_id+'" target="_blank" style="color:#A30782;">'+title+'</a></div>'
+'<div style="float:right;padding-top:5px;padding-right:5px;"><img src="/s/zh_cn/insidepage/market/default/images/alert_close.gif" onclick="extendClose(\''+this.message_name+'\');"></div><div style="clear:both"></div>'
+'<div style="padding-top:10px;padding-left:10px">'
+'<div style="float:left;"><a href="/p/'+this.usr_id+'" target="_blank" ><img src="'+this.headpic+'" border="0" /></a></div>'
+'<div style="padding-right:10px;float:right;width:120px;">'+text+'</div>'
+'</div>'
+'</div>';$(document.body).prepend(wnd_html);$(this.opmessage).hover(function(){clearTimeout(timer1);timer1=null;},function(){if(time>0)
timer1=setTimeout('this.close()',time);});$(window).scroll(function(){var bottomHeight="-"+document.documentElement.scrollTop;});};this.setTip=function(usr_id,tip_bottom,headpic){if(usr_id>0){this.usr_id=usr_id;this.message_name="message"+usr_id;this.opmessage="#message"+usr_id;}
if(tip_bottom>=0)
this.pBottom=tip_bottom;this.headpic=headpic;};this.showTip=function(title,text,time){if(title==0||!title)
title=this.title;this.inits(title,text);if(time>=0)
this.time=time;switch(this.anims.type){case'slide':$(this.opmessage).slideDown(this.anims.speed);break;case'fade':$(this.opmessage).fadeIn(this.anims.speed);break;case'show':$(this.opmessage).show(this.anims.speed);break;default:$(this.opmessage).slideDown(this.anims.speed);break;}
var bottomHeight="-"+document.documentElement.scrollTop;if($.browser.is=='chrome'){setTimeout(function(){$(this.opmessage).remove();this.inits(title,text);$(this.opmessage).css("display","block");},this.anims.speed-(this.anims.speed/5));}
this.rmmessage(this.time);};this.lays=function(width,height){if(width!=0&&width)
this.layer.width=width;if(height!=0&&height)
this.layer.height=height;}
this.anim=function(type,speed){if(type!=0&&type)
this.anims.type=type;if(speed!=0&&speed){switch(speed){case'slow':;break;case'fast':this.anims.speed=200;break;case'normal':this.anims.speed=400;break;default:this.anims.speed=speed;}}}
this.rmmessage=function(time){if(time>0){timer1=setTimeout('this.close()',time);}};this.close=function(){switch(this.anims.type){case'slide':$(this.opmessage).slideUp(this.anims.speed);break;case'fade':$(this.opmessage).fadeOut(this.anims.speed);break;case'show':$(this.opmessage).hide(this.anims.speed);break;default:$(this.opmessage).slideUp(this.anims.speed);break;};var rm='$("#'+this.message_name+'").remove()';setTimeout(rm,this.anims.speed);this.original();}
this.original=function(){this.layer={'width':200,'height':100};this.title='信息提示';this.time=4000;this.anims={'type':'slide','speed':600};};jQuery.messager=this;return jQuery;})(jQuery);function _window(features)
{this.id=this.name="_W_"+(++_window.wIndex);this.string="_window.windows."+this.id;this.zIndex=++_window.zIndex;this.className=_window.getFeature(features,"class")||_window.ClassName;this.bodyWidth=parseInt(_window.getFeature(features,"width"))||_window.Width;this.bodyHeight=parseInt(_window.getFeature(features,"height"))||_window.Height;this.left=_window.getFeature(features,"left");this.top=_window.getFeature(features,"top");this.right=_window.getFeature(features,"right");this.bottom=_window.getFeature(features,"bottom");this.move=_window.getFeature(features,"move").toLowerCase()||"move";this.isModal=true;this.button=_window.getFeature(features,"button").toUpperCase();this.resize=_window.getFeature(features,"resize").toLowerCase()||"resize";this.buttons={};this.objs=[];_window.windows[this.id]=this;}
_window.Version="";_window.ClassName="VISTA";_window.Width=400;_window.Height=-1;_window.Timer=0;_window.windows={};_window.wIndex=1001;_window.zIndex=1002;_window.clientWidth=0;_window.clientHeight=0;_window.onmousemove=null;_window.onmouseup=null;_window.onselectstart=null;_window.getFeature=function(source,name)
{var reg=new RegExp("(^|,|\\s)"+name+"\\s*=\\s*([^,]*)(\\s|,|$)","i");if(reg.test(source))return RegExp.$2;return"";};_window.getMaxNumber=function()
{var num=0;for(var i=0;i<arguments.length;i++)if(arguments[i]>num)num=arguments[i];return num;};_window.Open=function(content,title,features,buttons)
{var obj=new _window(features);obj.Creat(content,title);if(!!buttons&&buttons.constructor===Array){obj.createButton(buttons);}
try{return obj;}finally{obj=null;}};_window.Alert=function(content,title,features,buttons)
{var obj=new _window(features);obj.button="OK";obj.isModal=true;obj.Creat(content,title||"Alert");obj.buttons["OK"].focus();if(!!buttons&&buttons.constructor===Array){obj.createButton(buttons);}
try{return obj;}finally{obj=null;}};_window.Confirm=function(content,title,features,buttons)
{var obj=new _window(features);obj.button="OK|CANCEL";obj.isModal=true;obj.Creat(content,title||"Confirm");obj.buttons["OK"].focus();if(!!buttons&&buttons.constructor===Array){obj.createButton(buttons);}
try{return obj;}finally{obj=null;}};_window.prototype.Creat=function(content,title)
{if(window.jQuery&&(navigator.appName=="Microsoft Internet Explorer"&&navigator.appVersion.split(";")[1].replace(/[ ]/g,"")=="MSIE6.0")){$("select").hide();}
if(this.isModal)
{this.modal=document.createElement("div");this.modal.className="MODAL";this.modal.style.position="absolute";this.modal.style.cursor="wait";this.modal.style.zIndex=this.zIndex;this.modal.style.width=document.documentElement.scrollWidth+"px";this.modal.style.height=document.documentElement.scrollHeight+"px";if(this.modal.style.height<document.documentElement.clientHeight){this.modal.style.height=document.documentElement.clientHeight+"px";}
this.modal.style.left="0px";this.modal.style.top="0px";document.body.appendChild(this.modal);this.zIndex=++_window.zIndex;this.objs.push(this.modal);}
this.board=document.createElement("div");this.board.className=this.className;this.board.style.position="absolute";this.board.style.zIndex=this.zIndex;this.board.style.visibility="hidden";document.body.appendChild(this.board);this.objs.push(this.board);if(!_window.clientHeight)
{this.board.style.left="100%";this.board.style.top="100%";_window.clientWidth=this.board.offsetLeft;_window.clientHeight=this.board.offsetTop;}
var styles=new Array("LEFT_TOP","TOP","RIGHT_TOP","RIGHT","RIGHT_BOTTOM","BOTTOM","LEFT_BOTTOM","LEFT","CONTENT","TITLE");this.sides=new Array();if(this.button)
{styles[4]="RIGHT_BOTTOM_BY_BUTTON";styles[5]="BOTTOM_BY_BUTTON";styles[6]="LEFT_BOTTOM_BY_BUTTON";styles[styles.length]="BUTTON";var is_exist_button=1;}
if(this.resize!="no")styles[styles.length]="RESIZE";styles[styles.length]="CLOSE";var sAttachFocus="obj.onmousedown=function(e){ "+this.string+".Focus();};";var sAttachPreMove=this.move=="no"?sAttachFocus:"obj.onmousedown=function(e){ "+this.string+".PreMove(e?e:window.event);};";for(var i=0;i<styles.length;i++)
{var obj=document.createElement("div");obj.className=styles[i];obj.style.position="absolute";this.board.appendChild(obj);this.objs.push(obj);switch(styles[i])
{case"CONTENT":this.contentCase=obj;obj.style.width=this.bodyWidth+"px";this.SetContent(content);if(is_exist_button)obj.style.height=this.bodyHeight+48+"px";else
obj.style.height=this.bodyHeight+"px";obj.style.left=(this.sides[7].width+obj.offsetLeft)+"px";obj.style.top=(this.sides[1].height+obj.offsetTop)+"px";eval(sAttachFocus);this.width=this.bodyWidth+this.sides[3].width+this.sides[7].width;this.height=this.bodyHeight+this.sides[1].height+this.sides[5].height;this.board.style.height=this.height+"px";this.board.style.width=this.width+"px";this.minWidth=_window.getMaxNumber(this.sides[0].width+this.sides[2].width,this.sides[3].width+this.sides[7].width,this.sides[4].width+this.sides[6].width)+20;this.minHeight=_window.getMaxNumber(this.sides[0].height+this.sides[6].height,this.sides[1].height+this.sides[5].height,this.sides[2].height+this.sides[4].height)+2;break;case"TITLE":this.titleCase=obj;obj.style.width=this.width+"px";this.titleCase.dx=obj.offsetWidth-this.width;if(this.minWidth<this.titleCase.dx)this.minWidth=this.titleCase.dx;if(this.width>this.titleCase.dx)obj.style.width=(this.width-this.titleCase.dx)+"px";this.SetTitle(title);eval(sAttachPreMove);break;case"BUTTON":this.buttonCase=obj;obj.style.width=this.width+"px";obj.style.bottom="0px";this.buttonCase.dx=obj.offsetWidth-this.width;if(this.minWidth<this.buttonCase.dx)this.minWidth=this.buttonCase.dx;if(this.width>this.buttonCase.dx)obj.style.width=(this.width-this.buttonCase.dx)+"px";var buttons=this.button.split("|");for(var j=0;j<buttons.length;j++)
{var o=document.createElement("button");o.className=buttons[j];o.title=buttons[j];obj.appendChild(o);eval("o.onclick=function(e){ "+this.string+".On"+buttons[j]+"();};");this.buttons[buttons[j]]=o;}
break;case"RESIZE":obj.style.cursor="se-resize";eval("obj.onmousedown=function(e){ "+this.string+".PreResize(e?e:window.event);};");break;case"CLOSE":eval("obj.onclick=function(e){ "+this.string+".Close();};");obj.innerHTML='X';obj.title='关闭';break;default:this.sides[i]=obj;this.sides[i].width=obj.offsetWidth;this.sides[i].height=obj.offsetHeight;eval(sAttachPreMove);break;}}
this.sides[1].dx=this.sides[0].width+this.sides[2].width;if(this.width>this.sides[1].dx)this.sides[1].style.width=(this.width-this.sides[1].dx)+"px";this.sides[3].dy=this.sides[2].height+this.sides[4].height;if(this.height>this.sides[3].dy)this.sides[3].style.height=(this.height-this.sides[3].dy)+"px";this.sides[5].dx=this.sides[4].width+this.sides[6].width;if(this.width>this.sides[5].dx)this.sides[5].style.width=(this.width-this.sides[5].dx)+"px";this.sides[7].dy=this.sides[6].height+this.sides[0].height;if(this.height>this.sides[7].dy)this.sides[7].style.height=(this.height-this.sides[7].dy)+"px";this.sides[0].style.left="0px";this.sides[0].style.top="0px";this.sides[1].style.left=this.sides[0].width+"px";this.sides[1].style.top="0px";this.sides[2].style.right="0px";this.sides[2].style.top="0px";this.sides[3].style.right="0px";this.sides[3].style.top=this.sides[2].height+"px";this.sides[4].style.right="0px";this.sides[4].style.bottom="0px";this.sides[5].style.left=this.sides[6].width+"px";this.sides[5].style.bottom="0px";this.sides[6].style.left="0px";this.sides[6].style.bottom="0px";this.sides[7].style.left="0px";this.sides[7].style.top=this.sides[0].height+"px";this.left=this.left?parseInt(this.left):(this.right?_window.clientWidth-this.width-parseInt(this.right):parseInt((_window.clientWidth-this.width)/2));this.top=this.top?parseInt(this.top):(this.bottom?_window.clientHeight-this.height-parseInt(this.bottom):parseInt((_window.clientHeight-this.height)/2));if(this.left<0)this.left=0;if(this.top<0)this.top=0;this.left+=document.documentElement.scrollLeft;this.top+=document.documentElement.scrollTop;this.board.style.left=this.left+"px";this.board.style.top=this.top+"px";this.board.style.visibility="visible";this.status=1;};_window.prototype.SetContent=function(content)
{var type=content.slice(0,5),tent=content.slice(5);if(this.oldcase)
{this.oldcase.appendChild(this.oldcontent);this.oldcase=null;}
if(type=="[url]")
{if(this.iframe)
{if(this.contentCase.firstChild!=this.iframe)this.contentCase.replaceChild(this.iframe,this.contentCase.firstChild);this.iframe.src=tent;}
else
{var str=(this.bodyHeight<0)?"onload=\"if("+this.string+".bh<2)"+this.string+".ResizeBy(0,frames[frames.length-1].document.documentElement.scrollHeight);\"":"";var id="_F"+this.id;this.contentCase.innerHTML="<iframe id=\""+id+"\" name=\""+id+"\" "+str+" onfocus=\""+this.string+".Focus()\" src=\""+tent+"\" frameBorder='0' marginHeight='0' marginWidth='0' width='100%' height='100%'></iframe>";if(this.bodyHeight<0)this.bodyHeight=1;this.iframe=document.getElementById(id);this.frame=eval(id);}}
else
{if(this.form)
{if(this.contentCase.firstChild!=this.form)this.contentCase.replaceChild(this.form,this.contentCase.firstChild);}
else
{this.form=document.createElement("form");this.form.className="FORM";this.form.method="post";eval("this.form.onsubmit=function(e){ return false;}");if(this.contentCase.hasChildNodes())this.contentCase.replaceChild(this.form,this.contentCase.firstChild);else this.contentCase.appendChild(this.form);}
if(type=="[obj]"||content.slice(0,4)=="[id]")
{if(type=="[obj]")this.oldcontent=eval(tent);else this.oldcontent=document.getElementById(content.slice(4));this.oldcase=this.oldcontent.parentNode;this.form.appendChild(this.oldcontent);}
else
{this.form.innerHTML=content;}
if(this.bodyHeight<0)this.bodyHeight=this.contentCase.offsetHeight+1;this.contentCase.style.overflow="auto";}
this.content=content;};_window.prototype.SetTitle=function(title)
{title=title||"Fonshen JS Window";if(this.title==title)return false;this.titleCase.innerHTML=title;this.title=title;};_window.prototype.Focus=function()
{if(this.zIndex<_window.zIndex)this.board.style.zIndex=this.zIndex=++_window.zIndex;};_window.prototype.Close=function()
{this.Hidden();if(window.jQuery&&(navigator.appName=="Microsoft Internet Explorer"&&navigator.appVersion.split(";")[1].replace(/[ ]/g,"")=="MSIE6.0")){$("select").show();}
delete _window.windows[this.id];for(var key in this)delete this[key];};_window.prototype.Hidden=function()
{if(typeof(this.MoveTimer)!="undefined")clearTimeout(this.MoveTimer);if(typeof(this.ResizeTimer)!="undefined")clearTimeout(this.ResizeTimer);if(this.isModal)document.body.removeChild(this.modal);if(this.oldcase)this.oldcase.appendChild(this.oldcontent);var len=this.objs.length;for(var i=0;i<len;i++){discardElement(this.objs[i]);}
this.objs=null;this.status=0;};_window.prototype.Show=function()
{if(this.oldcase)this.form.appendChild(this.oldcontent);if(this.isModal)document.body.appendChild(this.modal);document.body.appendChild(this.board);this.status=1;};_window.prototype.Duplicate=function()
{this.copy=document.createElement("DIV");document.body.appendChild(this.copy);this.copy.style.cssText="position:absolute;left:"+(this.left-2)+"px;top:"+(this.top-2)+"px;width:"+this.width+"px;height:"+this.height+"px;border:2px dotted #000000;";this.copy.style.zIndex=this.zIndex+1;};_window.prototype.DetachEvent=function(e)
{document.body.style.cursor="default";document.onmousemove=_window.onmousemove;document.onmouseup=_window.onmouseup;document.onselectstart=_window.onselectstart;if(this.board.releaseCapture)this.board.releaseCapture();};_window.prototype.AttachEvent=function(e)
{_window.onmousemove=document.onmousemove;_window.onmouseup=document.onmouseup;_window.onselectstart=document.onselectstart;if(e.preventDefault)e.preventDefault();else
{document.onselectstart=function(){return false;};if(this.board.setCapture)this.board.setCapture();}};_window.prototype.PreResize=function(e)
{if(typeof(this.ResizeTimer)!="undefined")clearTimeout(this.ResizeTimer);this.Focus();this.Duplicate();this.resizeX=e.clientX-this.width-4;this.resizeY=e.clientY-this.height-4;document.body.style.cursor="se-resize";this.AttachEvent(e);eval("document.onmousemove=function(e){"+this.string+".Resize(e?e:window.event);};");eval("document.onmouseup=function(e){"+this.string+".Resized(e?e:window.event);};");};_window.prototype.Resize=function(e)
{if(this.resize!="resize-y")
{var w=e.clientX-this.resizeX;if(w>=this.minWidth)this.copy.style.width=w+"px";}
if(this.resize!="resize-x")
{var h=e.clientY-this.resizeY;if(h>=this.minHeight)this.copy.style.height=h+"px";}};_window.prototype.Resized=function(e)
{this.DetachEvent(e);var dx=0,dy=0;if(this.resize!="resize-y")
{var w=e.clientX-this.resizeX-4;w=(w>this.minWidth)?w:this.minWidth;dx=w-this.width;}
if(this.resize!="resize-x")
{var h=e.clientY-this.resizeY-4;var h=(h>this.minHeight)?h:this.minHeight;dy=h-this.height;}
if(_window.Timer>0&&this.width>=this.minWidth&&this.height>=this.minHeight)this.ActResizeBy(dx,dy);else this.ResizeBy(dx,dy);document.body.removeChild(this.copy);this.copy=null;};_window.prototype.ResizeBy=function(dx,dy)
{if(dx)
{this.width+=dx;this.board.style.width=this.width+"px";this.sides[1].style.width=(this.width-this.sides[1].dx)+"px";this.sides[5].style.width=(this.width-this.sides[5].dx)+"px";this.titleCase.style.width=(this.width-this.titleCase.dx)+"px";if(this.buttonCase)this.buttonCase.style.width=(this.width-this.buttonCase.dx)+"px";this.bodyWidth+=dx;this.contentCase.style.width=this.bodyWidth+"px";}
if(dy){this.height+=dy;this.board.style.height=this.height+"px";this.sides[3].style.height=(this.height-this.sides[3].dy)+"px";this.sides[7].style.height=(this.height-this.sides[7].dy)+"px";this.bodyHeight+=dy;this.contentCase.style.height=this.bodyHeight+"px";}};_window.prototype.ActResizeBy=function(dx,dy)
{if(dx||dy)
{var x=dx/10;x=(x>0)?Math.ceil(x):Math.floor(x);var y=dy/10;y=(y>0)?Math.ceil(y):Math.floor(y);this.ResizeBy(x,y);dx-=x;dy-=y;this.ResizeTimer=window.setTimeout(this.string+".ActResizeBy("+dx+","+dy+")",_window.Timer);}};_window.prototype.PreMove=function(e)
{if(typeof(this.MoveTimer)!="undefined")clearTimeout(this.MoveTimer);this.Focus();this.Duplicate();this.moveX=e.clientX-this.left+2;this.moveY=e.clientY-this.top+2;document.body.style.cursor="move";this.AttachEvent(e);eval("document.onmousemove=function(e){"+this.string+".Move(e?e:window.event);};");eval("document.onmouseup=function(e){"+this.string+".Moved(e?e:window.event);};");};_window.prototype.Move=function(e)
{if(this.move!="move-y")this.copy.style.left=(e.clientX-this.moveX)+"px";if(this.move!="move-x")this.copy.style.top=(e.clientY-this.moveY)+"px";};_window.prototype.Moved=function(e)
{this.DetachEvent(e);var tx=(this.move=="move-y")?null:(e.clientX-this.moveX+2);var ty=(this.move=="move-x")?null:(e.clientY-this.moveY+2);if(_window.Timer>0)this.ActMoveTo(tx,ty);else this.MoveTo(tx,ty);document.body.removeChild(this.copy);this.copy=null;};_window.prototype.MoveTo=function(tx,ty)
{if(tx!=null)
{this.left=tx;this.board.style.left=tx+"px";}
if(ty!=null)
{this.top=ty;this.board.style.top=ty+"px";}};_window.prototype.ActMoveTo=function(tx,ty)
{if((tx==null||tx==this.left)&&(ty==null||ty==this.top))return;if(tx!=null)
{var dx=(tx-this.left)/10;dx=(dx>0)?Math.ceil(dx):Math.floor(dx);this.left+=dx;}if(ty!=null){var dy=(ty-this.top)/10;dy=(dy>0)?Math.ceil(dy):Math.floor(dy);this.top+=dy;}
this.MoveTo(this.left,this.top);this.MoveTimer=window.setTimeout(this.string+".ActMoveTo("+tx+","+ty+")",_window.Timer);};_window.prototype.DisableButton=function(name,style)
{if(this.buttonAdded)return;name=name.toUpperCase();this.buttons[name].disabled=true;this.buttons[name].className=(style?style:"DISABLED")+" "+name;};_window.prototype.EnableButton=function(name)
{if(this.buttonAdded)return;name=name.toUpperCase();this.buttons[name].disabled=false;this.buttons[name].className=name;};_window.prototype.OnBACK=function()
{if(!this.step)this.step=0;if(this.OnBACKS){if(this.step>0)this.OnBACKS[--this.step]();}};_window.prototype.OnNEXT=function()
{if(!this.step)this.step=0;if(this.OnNEXTS){if(this.step<this.OnNEXTS.length)this.OnNEXTS[this.step++]();}};_window.prototype.OnOK=function()
{this.Close();};_window.prototype.OnCANCEL=function()
{this.Close();};_window.prototype.createButton=function(buttonList){if(!this.buttonCase){var obj=document.createElement("div");obj.className="BUTTON";obj.style.position="absolute";this.board.appendChild(obj);this.buttonCase=obj;obj.style.width=this.width+"px";obj.style.bottom="0px";this.buttonCase.dx=obj.offsetWidth-this.width;if(this.minWidth<this.buttonCase.dx)this.minWidth=this.buttonCase.dx;if(this.width>this.buttonCase.dx)obj.style.width=(this.width-this.buttonCase.dx)+"px";this.objs.push(obj);}else{if(!this.buttonAdded){this.buttonCase.innerHTML="";}}
if(!this.buttonAdded){var oThis=this;_window.each(buttonList,function(opt){var o;if(!opt.type)opt.type="input";o=document.createElement(opt.type);if(opt.type=="input"){o.type="button";if(!!opt.value)o.value=opt.value;}else{if(!!opt.value)o.innerHTML=opt.value;}
if(!!opt.id)o.id=opt.id;if(!!opt.className)o.className=opt.className;if(!!opt.click&&typeof(opt.click)=="function"){o.onclick=function(e){var e=e||window.event;opt.click.call(oThis,e);};}
oThis.buttonCase.appendChild(o);});this.buttonAdded=true;}};_window.each=function(list,callback){var c=typeof(callback)=='function'?1:0;if(c==1)c=callback.length>=2?2:1;for(var i=0;i<list.length;i++){if(c>=1){if(c>=2)callback.call(this,i,list[i]);else callback.call(this,list[i]);}}};function discardElement(el){var garbageBin=document.getElementById('IELeakGarbageBin');if(!garbageBin){garbageBin=document.createElement('DIV');garbageBin.id='IELeakGarbageBin';garbageBin.style.display='none';document.body.appendChild(garbageBin);}
garbageBin.appendChild(el);garbageBin.innerHTML='';}
function report_err_img(obj){var window_url=window.location;var img_url=obj.src;obj.src="/static/public/images/img_error.gif";$.post("/?page=report_err_img",{'img_url':img_url},function(txt){});}
function clickOnceForm(f){f.value='请等待...';f.disabled=true;}
function checkMessages(theBox,theArray){if(theBox.checked){for(i=0;i<theArray.elements.length;i++){try{theArray.elements[i].checked=true;}catch(e){}}
theBox.form.checkall.checked=true;}else{for(i=0;i<theArray.elements.length;i++){try{theArray.elements[i].checked=false;}catch(e){}}
theBox.form.checkall.checked=false;}}
function fixForm(c)
{var i;var n=c.name;var l=c.form.elements.length;if(!c.checked)return;if(c.value==''||c.value==0){for(i=0;i<l;i++){var e=c.form.elements[i];if(e.name==n&&e.value!=c.value)e.checked=false;}}else{for(i=0;i<l;i++){var e=c.form.elements[i];if(e.name==n&&(e.value=='0'||e.value==""))e.checked=false;}}
return;}
function rand(n){return(Math.floor(Math.random()*n+1));}
function DrawImage(ImgD,iwidth,iheight){var image=new Image();var flag=false;image.src=ImgD.src;if(image.width>0&&image.height>0){flag=true;if(image.width/image.height>=iwidth/iheight){if(image.width>iwidth){ImgD.width=iwidth;ImgD.height=(image.height*iwidth)/image.width;}else{ImgD.width=image.width;ImgD.height=image.height;}
ImgD.alt=image.width+"×"+image.height;}else{if(image.height>iheight){ImgD.height=iheight;ImgD.width=(image.width*iheight)/image.height;}else{ImgD.width=image.width;ImgD.height=image.height;}
ImgD.alt=image.width+"×"+image.height;}}}
function DrawImage_nt(ImgD,iwidth,iheight){var image=new Image();var flag=false;image.src=ImgD.src;if(image.width>0&&image.height>0){flag=true;if(image.width/image.height>=iwidth/iheight){if(image.width>iwidth){ImgD.width=iwidth;ImgD.height=(image.height*iwidth)/image.width;}else{ImgD.width=image.width;ImgD.height=image.height;}}else{if(image.height>iheight){ImgD.height=iheight;ImgD.width=(image.width*iheight)/image.height;}else{ImgD.width=image.width;ImgD.height=image.height;}}}}
function SetCookie(name,value,times)
{var exp=new Date();exp.setTime(exp.getTime()+times);document.cookie=name+"="+escape(value)+";expires="+exp.toGMTString();}
function getCookie(name)
{var arr=document.cookie.match(new RegExp("(^| )"+name+"=([^;]*)(;|$)"));if(arr!=null)return unescape(arr[2]);return null;}
function updatestring(str1,str2,clear){str2='_'+str2+'_';return clear?str1.replace(str2,''):(str1.indexOf(str2)==-1?str1+str2:str1);}
var Utils=new Object();Utils.trim=function(text)
{if(typeof(text)=="string")
{return text.replace(/^\s*|\s*$/g,"");}
else
{return text;}};Utils.fixEvent=function(e)
{var evt=(typeof e=="undefined")?window.event:e;return evt;};Utils.srcElement=function(e)
{if(typeof e=="undefined")e=window.event;var src=document.all?e.srcElement:e.target;return src;};Utils.isTel=function(tel)
{var reg=/^[\d|\-|\s|\_]+$/;return reg.test(tel);};function AddFavorite(sURL,sTitle){sURL=window.location.href;sTitle=document.title;if((typeof window.sidebar=='object')&&(typeof window.sidebar.addPanel=='function')){window.sidebar.addPanel(sTitle,sURL,'');}else{window.external.AddFavorite(sURL,sTitle);}}
function SetHome(obj,vrl){try{obj.style.behavior='url(#default#homepage)';obj.setHomePage(vrl);}
catch(e){if(window.netscape){try{netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");}
catch(e){alert("此操作被浏览器拒绝！\n请在浏览器地址栏输入“about:config”并回车\n然后将[signed.applets.codebase_principal_support]设置为’true’");}
var prefs=Components.classes['@mozilla.org/preferences-service;1'].getService(Components.interfaces.nsIPrefBranch);prefs.setCharPref('browser.startup.homepage',vrl);}}}
function copyText(txt,desc,not_close_up){if(not_close_up!='1'){$('.VISTA .CLOSE').click();}
if(window.$){if($.browser.msie){var isSuc=clipboardData.setData("Text",txt);if(isSuc){_window.Alert(desc,'提示');}}else{if(prompt('请按 Ctrl+C 复制到粘贴板！',txt))_window.Alert(desc,'提示');}}}
function clear_cookie(){var cookie_str=document.cookie;var cookie_arr=cookie_str.split(";");for(i in cookie_arr){_arr=cookie_arr[i].split("=");document.cookie=_arr[0]+"=''";}
alert("清除完毕");window.location.reload();}
window["MzBrowser"]={};(function(){if(MzBrowser.platform)return;var ua=window.navigator.userAgent;MzBrowser.platform=window.navigator.platform;MzBrowser.firefox=ua.indexOf("Firefox")>0;MzBrowser.opera=typeof(window.opera)=="object";MzBrowser.ie=!MzBrowser.opera&&ua.indexOf("MSIE")>0;MzBrowser.mozilla=window.navigator.product=="Gecko";MzBrowser.netscape=window.navigator.vendor=="Netscape";MzBrowser.safari=ua.indexOf("Safari")>-1;if(MzBrowser.firefox)var re=/Firefox(\s|\/)(\d+(\.\d+)?)/;else if(MzBrowser.ie)var re=/MSIE( )(\d+(\.\d+)?)/;else if(MzBrowser.opera)var re=/Opera(\s|\/)(\d+(\.\d+)?)/;else if(MzBrowser.netscape)var re=/Netscape(\s|\/)(\d+(\.\d+)?)/;else if(MzBrowser.safari)var re=/Version(\/)(\d+(\.\d+)?)/;else if(MzBrowser.mozilla)var re=/rv(\:)(\d+(\.\d+)?)/;if("undefined"!=typeof(re)&&re.test(ua))
MzBrowser.version=parseFloat(RegExp.$2);})();
