function LogOut() {
  if(confirm("真的要退出系统吗？")) {
    clo.Click();
  }
}

function ReLogin() {
  if(confirm("真的要重新登录系统吗？")) {
    location.replace("login.htm");
  }
}

function showsub(num,num1,num2) {

  var objmenu = eval("document.all.main" + num);
  var objsubmenu = eval("document.all.sub" + num);

  for (var i = num1; i <= num2; i++) {
    if (i != num) {
      eval("document.all.main" + i).className = "nosel";
      eval("document.all.sub" + i).style.display = "none";
    }
  }

  objmenu.className = "sel";
  objsubmenu.style.display = "block";
  document.all.subtop.style.display = "block";
  document.all.subbottom.style.display = "block";
}

function unshowsub(num1,num2) {
  for (var i = num1; i <= num2; i++) {
    eval("document.all.main" + i).className = "nosel";
    eval("document.all.sub" + i).style.display = "none";
  }
  document.all.subtop.style.display = "none";
  document.all.subbottom.style.display = "none";
}

function showcal() {
  showModalDialog('cal.asp','','resizable:0;center:1;status:0;dialogWidth:550px;dialogHeight:515px' );
}

function openwin(strURL) {
  var ToW=screen.availWidth-10;
  var ToH=screen.availHeight-35;
  window.open(strURL,'','menubar=0,status=0,toolbar=0,resizable=1,scrollbars=1,top=0,left=0,width='+ToW+',height='+ToH);
}

function openwin1(strURL) {
  window.open(strURL,'','menubar=0,status=0,toolbar=1,resizable=1,scrollbars=1,top=0,left=0');
}

function openwinhy(strURL) {
  window.open(strURL,'','menubar=0,status=0,toolbar=1,resizable=1,scrollbars=1,top=0,left=0');
}

function openwindow(url,winName,resize,scrollbar,width,height) {
  var xposition=0;
  var yposition=0;

  if ((parseInt(navigator.appVersion) >= 4 )) {
    xposition = (screen.availWidth - width) / 2;
    yposition = (screen.availHeight - height) / 2;
  }

  theproperty= "width=" + width + ","
  + "height=" + height + ","
  + "location=0,"
  + "menubar=0,"
  //+ "fullscreen=1,"
  + "resizable=" + resize + ","
  + "scrollbars=" + scrollbar + ","
  + "status=0,"
  + "titlebar=no,"
  + "toolbar=0,"
  + "hotkeys=0,"
  + "left=" + xposition + ","
  + "top=" + yposition;

  window.open( url,winName,theproperty );
  //window.showModalDialog(url,"","dialogWidth:355px;dialogHeight:340px;center:1;scroll:0;help:0;status:0")
}
