//～宅男在线の网络小窝～ Powered by ZnZx.Org

  function login_form()
  {
      if (document.loginform.username.value==""){
	      alert("请输入您的用户名！")
		  document.loginform.username.focus();
		  return false
		    }
	  if (document.loginform.password.value==""){
	      alert("请输入您的密码！");
		  document.loginform.password.focus();
		  return false
		  }
		  return true
  }
  function reset_form()
  {
   document.loginform.username.value="";
   document.loginform.password.value="";
   document.loginform.username.focus;
  }
function setfocus(){
        document.loginform.username.focus();
        return;
}

//禁止鼠标动作
if (window.Event)
document.captureEvents(Event.MOUSEUP);

function nocontextmenu()
{
 event.cancelBubble = true
 event.returnValue = false;

 return false;
}

function norightclick(e)
{
 if (window.Event)
 {
  if (e.which == 2 || e.which == 3)
   return false;
 }
 else
  if (event.button == 2 || event.button == 3)
  {
   event.cancelBubble = true
   event.returnValue = false;
   return false;
  }

}
//document.onselectstart = new Function("event.returnValue=false;");//禁止全选
document.ondragstart = new Function("return false;");//禁止拖动
document.oncontextmenu = new Function("return false;");//禁止右键
document.oncontextmenu = nocontextmenu;//for IE5+
document.onmousedown = norightclick;//for all others
