function checklogin() {
 var myCookie = new Cookie(document,"loggedin",0);

 if (myCookie.read()) {
  return true;
 } else {
  return false;
 }
}

function startlogin(destination) {
  var myCookie = new Cookie(document,"loggedin",0);
  var page = "./login.asp" + "?destination=" + destination;
  var winName = "login1win";
  var windowprops = 'status=yes,width=400,height=500,scrollbars=yes,resizable=yes';
  popwin=window.open(page,winName,windowprops);
  return;
}

function login(destination) {
 if (checklogin()) {
         parent.document.location=destination;
 } else {
         startlogin(destination);
 }
 return;
}

function getchoice(choice) {
        document.mainform.FormAction.value=choice;
        document.mainform.submit();
return;
}

function getnonsslchoice(choice) {
        document.nonssl.FormAction.value=choice;
        document.nonssl.submit();
return;
}
