document.ns = navigator.appName == "Netscape"
var over=false,down=false,divleft,divtop;
var top
function open_member(typeID,nameID)
{
 window.open("http://forum.0898.net/showmember.php?typeID="+typeID+"&nameID="+nameID, '', '');
 return;
}
function sendmsg(urls,wl,hl){
        var theURL = urls
        var w=wl,h=hl
        var l=(screen.width-w)/2
        var t=(screen.height-h)/2
        if(screen.width < 800){
                l=t=0
        }
        window.open(theURL,"发送信息","fullscreen2=1;toolbar=0,location=0,directories=0,menubar=0,scrollbars=0,resizable=1,status=0,top="+t+",left="+l+",width="+w+",height="+h)
}
function ShowTitle()
{
  if (Fav.st.value == 0){
    return;
  }
  if (Fav.st.value == 1){
    window.location.href="http://forum.0898.net/showmessage.php";
    return;
  }
  if (Fav.st.value == 2){
    window.location.href="http://forum.0898.net/showfriend.php";
    return;
  }
  if (Fav.st.value == 3){
    window.location.href="http://forum.0898.net/changemember.php";
    return;
  }
  if (Fav.st.value == 4){
    window.location.href="http://forum.0898.net/changepasswd.php";
    return;
  }
  if (Fav.st.value == 5){
    sendmsg('http://forum.0898.net/addmessage.php','310','220');
    return;
  }
  if (Fav.st.value == 6){
    window.location.href="http://forum.0898.net/logout.php";
    return;
  }
  if (Fav.st.value == 7){
    window.location.href="http://forum.0898.net/showonline.php";
    return;
  }
  if (Fav.st.value == 8){
    window.location.href="http://forum.0898.net/showadminlog.php";
    return;
  }
}
function move() {
        if(down){
                menu.style.left=event.clientX-divleft;
                menu.style.top=event.clientY-divtop;
        }
}
function menumove()
{
        window.screen.width>800 ? top=160:top=0;
        if(document.ns)        {
                document.menu.top=pageYOffset+top;
                setTimeout("menumove();",1);
        } else {
                menu.style.top=document.body.scrollTop+top;
                setTimeout("menumove();",1);
        }
}
function upimg()
{
    img=window.prompt('贴图片是直接链接网上的图片（右键点击图片然后选属性可查地址）\n请输入图片的地址：','http://');
    if(img){
       if(img != "http://" && img != ""){
            window.restoreForm.maintext.innerText+='[img]'+img+'[/img]';
       }
    }
}
function actionRead(flag)
{
     if(flag == 1){
         document.restoreForm.restore_content.focus();
     }else{
         window.location.href="login.php";
     }
}
function CheckAll()
{
  for (var i=0;i<document.messageForm.elements.length;i++)
    {
    var e = document.messageForm.elements[i];
    if (e.name != 'allbox')
      e.checked = document.messageForm.allbox.checked;
    }
}
