//document.domain="huichi.cn"z-index:65534;
document.write("<style>#shadowDiv{display:none;width:100%;height:100%;position:absolute;top:0px:left:0px;background-color:#000;filter: alpha(opacity=60);opacity:0.6;z-index:100}#popDiv{display:none;position:absolute;width:450px;height:300px;z-index:101;background-color:#fff;}a.tLink{color:#000;text-decoration: none;}#webimmsg{cursor:pointer;position:relative;}#im_count{position:absolute;height:17px;top:-4px;left:26px;}#im_count{background-color:#00CA65}#im_count b{background-color:#00CA65;padding:0 2px 4px 4px;margin-right:2px;display:block;color:#fff;line-height:12px;}</style>");
if(!(typeof (Fe)=="object"&&Fe&&Fe.version)){
  var Fe={
    version:"20080809",emptyFn:function(){
    }
  }
}
Fe.body=function(){
  var A=0,J=0,E=0,C=0,B=0,K=0;
  var F=window,D=document,I=D.documentElement;
  A=I.clientWidth||D.body.clientWidth;
  J=F.innerHeight||I.clientHeight||D.body.clientHeight;
  C=D.body.scrollTop||I.scrollTop;
  E=D.body.scrollLeft||I.scrollLeft;
  B=Math.max(D.body.scrollWidth||0,I.scrollWidth||0);
  if(Fe.isIE){
    B-=22
  }
  K=Math.max(D.body.scrollHeight||0,I.scrollHeight||0,J);
  return{
    scrollTop:C,scrollLeft:E,documentWidth:B,documentHeight:K,viewWidth:A,viewHeight:J
  }
}
;
Fe.each=function(E,A){
  if(E){
    if(E.length==undefined){
      for(var B in E){
        A.call(E[B],E[B],B)
      }
    }
    else{
      for(var C=0,D=E.length;C<D;C++){
        A.call(E[C],E[C],C)
      }
    }
  }
  return E
}
;
Fe.G=function(){
  for(var A=[],B=arguments.length-1;B>-1;B--){
    var C=arguments[B];
    A[B]=null;
    if(typeof (C)=="object"&&C&&C.dom){
      A[B]=C.dom
    }
    else{
      if((typeof (C)=="object"&&C&&C.tagName)||C==window||C==document){
        A[B]=C
      }
      else{
        if(typeof (C)=="string"&&(C=document.getElementById(C))){
          A[B]=C
        }
      }
    }
  }
  return A.length<2?A[0]:A
}
;
Fe.extend=function(D,A,C){
  if(C){
    Fe.extend(D,C)
  }
  if(D&&A&&typeof (A)=="object"){
    for(var B in A){
      D[B]=A[B]
    }
  }
  return D
}
;
Fe.extend(Fe,(function(){
  var D=navigator.userAgent;
  var E=0,C=0,A=0,F=0,H=0,B=0;
  if(D.indexOf("Safari")>-1&&/Version\/(\d+(\.\d+)?)/.test(D)){
    E=RegExp.$1
  }
  if(window.opera&&/Opera(\s|\/)(\d+(\.\d+)?)/.test(D)){
    A=RegExp.$2
  }
  if(D.indexOf("Gecko")>-1&&D.indexOf("KHTML")==-1&&/rv\:(\d+(\.\d+)?)/.test(D)){
    H=RegExp.$1
  }
  if(/MSIE (\d+(\.\d+)?)/.test(D)){
    F=RegExp.$1
  }
  if(/Firefox(\s|\/)(\d+(\.\d+)?)/.test(D)){
    B=RegExp.$2
  }
  if(D.indexOf("KHTML")>-1&&/AppleWebKit\/([^\s]*)/.test(D)){
    C=RegExp.$1
  }
  return({
    isStrict:document.compatMode=="CSS1Compat",isSafari:E,isWebkit:C,isOpera:A,isGecko:H,isIE:F,isFF:B
  }
  )
}
)());
Fe.hide=function(){
  Fe.each(arguments,function(A){
    if(A=Fe.G(A)){
      A.style.display="none"
    }
  }
  )
}
;
Fe.show=function(){
  Fe.each(arguments,function(A){
    if(A=Fe.G(A)){
      A.style.display=""
    }
  }
  )
}

;
Fe.on=function(C,B,A){
  if(!(C=Fe.G(C))){
    return false
  }
  B=B.replace(/^on/,"").toLowerCase();
  if(C.attachEvent){
    C[B+A]=function(){
      A.call(C,window.event)
    }
    ;
    C.attachEvent("on"+B,C[B+A])
  }
  else{
    C.addEventListener(B,A,false)
  }
}
;
Fe.un=function(C,B,A){
  if(!(C=Fe.G(C))){
    return C
  }
  B=B.replace(/^on/,"").toLowerCase();
  if(C.detachEvent){
    C.detachEvent("on"+B,C[B+A]);
    C[B+A]=null
  }
  else{
    C.removeEventListener(B,A,false)
  }
  return C
}
;
Fe.ready=function(){
  var C=false,E=false,D=[];
  function A(){
    if(!C){
      C=true;
      Fe.each(D,function(H,F){
        H()
      }
      )
    }
  }
  function B(){
    if(E){
      return 
    }
    E=true;
    if(document.addEventListener&&!Fe.isOpera){
      document.addEventListener("DOMContentLoaded",A,false)
    }
    if(Fe.isIE&&window==top){
      (function(){
        if(C){
          return 
        }
        try{
          document.documentElement.doScroll("left")
        }
        catch(H){
          setTimeout(arguments.callee,0);
          return 
        }
        A()
      }
      )()
    }
    if(Fe.isOpera){
      document.addEventListener("DOMContentLoaded",function(){
        if(C){
          return 
        }
        for(var H=0;H<document.styleSheets.length;
        H++){
          if(document.styleSheets[H].disabled){
            setTimeout(arguments.callee,0);
            return 
          }
        }
        A()
      }
      ,false)
    }
    if(Fe.isSafari){
      var F;
      (function(){
        if(C){
          return 
        }
        if(document.readyState!="loaded"&&document.readyState!="complete"){
          setTimeout(arguments.callee,0);
          return 
        }
        if(F===undefined){
          F=0;
          var K=document.getElementsByTagName("style");
          var I=document.getElementsByTagName("link");
          if(K){
            F+=K.length
          }
          if(I){
            for(var J=0,H=I.length;J<H;J++){
              if(I[J].getAttribute("rel")=="stylesheet"){
                F++
              }
            }
          }
        }
        if(document.styleSheets.length!=F){
          setTimeout(arguments.callee,0);
          return 
        }
        A()
      }
      )()
    }
    Fe.on(window,"load",A)
  }
  return function(F){
    if(typeof F!="function"){
      return false
    }
    B();
    if(C){
      F()
    }
    else{
      D[D.length]=F
    }
  }
}
();
String.prototype.trim=function(){
  return this.replace(/(^[\s\t\xa0\u3000]+)|([\u3000\xa0\s\t]+$)/g,"")
}
;
String.prototype.byteLength=function(){
  return this.replace(/[^\u0000-\u007f]/g,"\u0061\u0061").length
}
;
String.prototype.format=function(){
  if(arguments.length==0){
    return this
  }
  for(var B=this,A=0;A<arguments.length;A++){
    B=B.replace(new RegExp("\\$"+A+"\\$","g"),arguments[A])
  }
  return B
}
;
if(![].push){
  Array.prototype.push=function(){
    for(var A=0;A<arguments.length;A++){
      this[this.length]=arguments[A]
    }
    return this.length
  }
}
if(![].pop){
  Array.prototype.pop=function(){
    var A=this[this.length-1];
    this.length--;
    return A
  }
}
if(typeof (HTMLElement)!="undefined"&&!window.opera){
  HTMLElement.prototype.__defineGetter__("innerText",function(){
    return this.textContent
  }
  );
  HTMLElement.prototype.__defineSetter__("innerText",function(A){
    this.textContent=A
  }
  )
}
function bind(C,B){
  if(arguments<=1){
    return C
  }
  var A=Array.prototype.slice.call(arguments,2);
  if(A.length>0){
    return function(){
      C.apply(B,A.concat(Array.prototype.slice.call(arguments)))
    }
  }
  return function(){
    C.apply(B,arguments)
  }
}
function G(A){
  return Fe.G(A)
}
function lockButton(A){
  A=G(A);
  A.disabled=true;
  setTimeout(function(){
    A.disabled=false
  }
  ,3000)
}
function insertWbr(D,A){
  if(D.length<=A){
    return D
  }
  var B=document.createElement("textarea");
  try{
    B.innerHTML=D
  }
  catch(E){
    B.value=D
  }
  var C=B.value;
  C=C.replace(new RegExp("(\\S{"+A+"})","img"),"$1<wbr>");
  C=C.replace(/<wbr>/img,"\u0001").replace(/<br>/img,"\u0002").replace(/</img,"&lt;").replace(/>/img,"&gt;").replace(/\u0002/img,"<br>").replace(/\u0001/img,"<wbr>");
  if(Fe.isOpera){
    C.replace(/<wbr>/img,"<i style='margin-left:-4px;opacity: 0'> </i>")
  }
  return C
}
function addEvent(C,B,A){
  Fe.on(C,B,A)
}
function proxy(){
  var C=[];
  for(var B=0,A=arguments.length;B<A;B++){C[B]=arguments[B]}
  var D=C[0];
  C.shift();
  return function(){D.apply(null,C)}
}
function changeClassName(F,C,A){
  var D=G(F);
  var B=new RegExp("\\b"+C+"\\b","g");
  var E=D.className.replace(C,"");
  D.className=(A?E+" "+C:E);
  return true
}
function addClassName(B,A){
  changeClassName(B,A,true)
}
function removeClassName(B,A){
  changeClassName(B,A,false)
}
function getCookie(C){
  var B="(?:; )?"+C+"=([^;]*);?";
  var A=new RegExp(B);
  if(A.test(document.cookie)){
    return decodeURIComponent(RegExp["$1"])
  }
  else{
    return null
  }
}
function setCookie(F,H,B,C,A,E){
  var D=F+"="+encodeURIComponent(H);
  if(B){
    D+="; expires="+B.toGMTString()
  }
  if(C){
    D+="; path="+C
  }
  if(A){
    D+="; domain="+A
  }
  if(E){
    D+="; secure"
  }
  document.cookie=D
}
function FactoryXMLHttpRequest(){
  if(window.ActiveXObject){
    return new ActiveXObject("Microsoft.XMLHTTP")
  }
  else{
    if(window.XMLHttpRequest){
      return new XMLHttpRequest()
    }
    else{
      return null
    }
  }
}
function request(B,A,D){
  var C=FactoryXMLHttpRequest();
  C.open("GET",B,true);
  C.onreadystatechange=proxy(function(H,E,F){
    if(H.readyState==4){
      if(H.status==200){
        E(H)
      }
      else{
        F(H)
      }
    }
  }
  ,C,A,D);
  C.send(null)
}//?===
function stat(A){
  if(document.images){
    (new Image()).src="/stat?"+A+"&t="+(new Date()).getTime()
  }
}
Array.prototype.clone=function(){
  var A=[];
  for(var B=0;B<this.length;B++){
    if("object"==typeof (this[B])&&"undefined"!=typeof (this[B].length)){
      A[B]=this[B].clone()
    }
    else{
      A[B]=this[B]
    }
  }
  return A
}
;
String.prototype.jsdecode=function(){
  return this.replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\t/g,"\\t")
}
;
String.prototype.htmldecode=function(){
  return this.replace(/&lt;/g,"<").replace(/&quot;/g,'"').replace(/&gt;/g,">").replace(/&#39;/g,"'").replace(/&nbsp;/g," ")
}
;
function userLogin(B,C,A){
  onLoginSuccess=B||defalutLoginSuccess;
  onLoginFailed=C||defaultLoginFail;
   A=(A?"&"+A:"");
  Pop.show("登录",{url:"/?wy=73"+A,width:400,height:300})

}
var defalutLoginSuccess=function(){window.location.reload()};
var onLoginSuccess=defalutLoginSuccess;
var loginSuccess=function(){
  Pop.hide();
  onLoginSuccess()
}
;
var defaultLoginFail=function(){ window.location="/";}
;
var onLoginFailed=defaultLoginFail;
var loginFailed=function(){
  Pop.hide();
  onLoginFailed()
}
;
function checkLogin(hasLogin,notLogin,p){
  function onOk(req,hasLogin,notLogin){    
    if(!!eval("("+req.responseText+")")){
      hasLogin();
      return true
    }
    userLogin(hasLogin,notLogin,p);
    return false
  }
  request("/?wy=72&t="+(new Date()).getTime(),function(req){
    onOk(req,hasLogin,notLogin)
  }
  ,hasLogin)
}
function checkLoginF(A,B){
  checkLogin(A,A,B)
}
var Pop={
  onOk:function(){
  }
  ,onclosed:function(){
  }
  ,create:function(){
    if(!G("popDiv")){
      var B=document.createElement("div");
      B.id="shadowDiv";
      var C=document.createElement("div");
      C.id="popDiv";
      var A=document.createElement("iframe");
      A.id="shadowIframe";
      A.style.filter="alpha(opacity=0)";
      A.style.opacity="0";
      A.style.position="absolute";
      C.style.width=C.style.height="500px";
      C.style.border="1px solid green";
      C.innerHTML='<table style="background-color:#00CA65;width:100%"><tr><td style="height:20px;text-align:left;font-size:14px;color:white;font-weight:bold;padding-left:10px;vertical-align:middle"><span id="dialogBoxTitle"></span></td><td style="vertical-align:middle"><input type="button" id="dialogBoxClose" onclick="Pop.hide();return false" title="关闭" style="border:1px gray solid;cursor:hand;display:block;width:16px;height:16px;float:right;background:url(/tp.asp?lb=30) no-repeat 0 0;border:0;margin:0;padding:0;" onmouseover="this.style.backgroundPosition=\'-16px 0\'" onmouseout="this.style.backgroundPosition=\'0 0\'" /></td></tr></table><div style="clear:both"></div></div><div id="popBody" style="display:none;text-align:center;padding:20px;font-size:14px;"></div><div id="ifrDiv"><iframe id="popIframe" name="popIframe" width="100%" frameborder="0" height="100%" scrolling="no" src="about:blank"></iframe></div>';
      document.body.insertBefore(A,document.body.firstChild);
      document.body.insertBefore(C,document.body.firstChild);
      document.body.insertBefore(B,document.body.firstChild)
    }
  }
  ,resize:function(B,A,K){
    Pop.create();
    var C=Fe.body();
    var O=C.scrollTop;
    var L=C.documentWidth||500;
    var D=C.documentHeight||500;
    var N=G("shadowDiv");
    var I=G("popDiv");
    var H=G("shadowIframe");
    var M=A||parseInt(I.style.width,10)||500;
    var E=K||parseInt(I.style.height,10)||500;
    N.style.width=(L+20)+"px";
    N.style.height=D+"px";
    H.style.width=(L-20)+"px";
    H.style.height=(D-20)+"px";
    N.style.left=N.style.top="0px";
    H.style.top=H.style.left="5px";
    var J=(C.viewWidth-M)/2;
    var F=(C.viewHeight-E)/2+O;
    if(J<1){J=O}
    if(F<1){F="20"}
    if(E<20){ E="20"}
    I.style.left=J+"px";
    I.style.top=F+"px";
    I.style.width=M+"px";
    I.style.height=E+"px";
    G("ifrDiv").style.height=(E-26)+"px";//此处与dialogBoxTitle所占据的高度有关
  }
  ,hide:function(){
    Pop.onclosed();
    try{
       if(G("shadowDivCover1")){G("shadowDivCover1").style.display="block";}
    if(G("shadowDivCover2")){G("shadowDivCover2").style.display="none";}
      G("popDiv").style.display="none";
      G("shadowDiv").style.display="none";
      G("shadowIframe").style.width="0px";
      G("shadowIframe").style.height="0px";
      G("shadowIframe").style.display="none";
      
    }
    catch(B){
    }
    try{
      G("popIframe").src="about:blank"
    }
    catch(A){
      try{
        document.frames.popIframe.location="about:blank"
      }
      catch(A){
      }
    }
    Fe.un(window,"resize",Pop.resize);
    Fe.un(document,"onkeydown",Pop.keyListener)
  }
  ,keyListener:function(B){
    B=window.event||B;
    var A=B.which||B.keyCode;
    if(27==A){
      Pop.hide()
    }
  }
  ,config:function(F,A){
    if(F){G("dialogBoxTitle").innerHTML=F;}
    Pop.onclosed=A.onclosed||function(){
    }
    ;
    if(A.url){
      if(A.url!=true){
        try{
          G("popIframe").src=A.url+"&t="+(new Date()).getTime();
        }
        catch(D){
          try{
            document.frames.popIframe.location=A.url+"&t="+(new Date()).getTime();
          }
          catch(D){
          }
        }
      }
      G("ifrDiv").style.display="block";
      G("popBody").style.display="none"
    }
    else{
      if(A.info){
        G("ifrDiv").style.display="none";
        G("popBody").style.display="block";
        G("popBody").innerHTML=A.info
      }
    }  
    
    var B=A.width||450;
    var E=A.height||400;
    var C=G("popDiv");
    C.style.width=B+"px";
    C.style.height=E+"px"
  }
  ,show:function(B,A){
    Pop.create();
    Pop.config(B,A);
    Pop.resize();
    if(G("shadowDivCover1")){G("shadowDivCover1").style.display="none";}
    if(G("shadowDivCover2")){G("shadowDivCover2").style.display="block";}
    
    G("popDiv").style.display="block";
    G("shadowDiv").style.display="block";
    G("shadowIframe").style.display="";
   
	
    Fe.on(window,"resize",Pop.resize);
    Fe.on(document,"onkeydown",Pop.keyListener)
  }
  ,confirm:function(C,B){
    Pop.onOk=proxy(function(D){
      Pop.onclosed=function(){
      }
      ;
      Pop.hide();
      D()
    }
    ,B.ok||Pop.hide);
    var A="<span class='f14'>$2$</span><br><br><p align='center'><input type='button'value='$0$' onclick='Pop.onOk();'>&nbsp;&nbsp;&nbsp;&nbsp;<input type='button'value='$1$' onclick='Pop.hide()'></p>";
    A=A.format(B.okInfo||"确定",B.cancelInfo||"取消",C);
    Pop.show(B.title||"信息确认",{
      info:A,width:(B.width||300),height:(B.height||150),onclosed:B.cancel
    }
    )
  }
}
;
function TopLoginSuccess(){
  window.location.reload()
}
function TopLoginFail(){
  window.location="/";
}