function Login(){
  // passcode security 1
  var dcode = new Date();  // passcode is based on today's date
  var testdate = dcode;
  var yr = dcode.getFullYear();
  var dy = dcode.getDay()
  var mo = dcode.getMonth()
  var passcode = ((dy + mo + yr) * yr) + dy

  // Login variables
  var done=0;
  var username=document.login.studentID.value;
  username=username.toLowerCase();
  var password=document.login.pass.value;
  password=password.toLowerCase();

// /////// STUDENT NAMES BEGIN HERE /////////// //
// *********************************************//
if (username=="guest" && password=="guest") { window.location="students/guest/01200.html?" + passcode; done=1; }

// Student Template 00000001
if (username=="000" && password=="student") { window.location="students/00000001/00200.html?" + passcode; done=1; }

// Student Logins
if (username=="prophetess10" && password=="zrc017gp") { window.location="students/1201130329/00200.html?" + passcode; done=1; }
if (username=="mdingram" && password=="miah4life") { window.location="students/1201030808/00200.html?" + passcode; done=1; }
if (username=="tomschulte" && password=="tsmacademy") { window.location="students/1111112516/00200.html?" + passcode; done=1; }
if (username=="reviewing" && password=="carefoot") { window.location="students/1111061137/00200.html?" + passcode; done=1; }
if (username=="paul1956" && password=="paul1956") { window.location="students/1110201830/00200.html?" + passcode; done=1; }
if (username=="lindamacdonald" && password=="biblestudy") { window.location="students/1110081553/00200.html?" + passcode; done=1; }
if (username=="moodle" && password=="g3s8coca") { window.location="students/1107090123/00200.html?" + passcode; done=1; }
if (username=="dms1230" && password=="2blessed") { window.location="students/1106301225/00200.html?" + passcode; done=1; }
if (username=="jason" && password=="hamlet1") { window.location="students/1106151756/00200.html?" + passcode; done=1; }
if (username=="nannoots" && password=="beckford") { window.location="students/1106131546/00200.html?" + passcode; done=1; }
if (username=="ablessin07" && password=="proverbs31") { window.location="students/1105251646/00200.html?" + passcode; done=1; }
if (username=="gingermegsjj" && password=="jeanie11july") { window.location="students/1105130330/00200.html?" + passcode; done=1; }
if (username=="kkearney" && password=="bizymama75") { window.location="students/1104190101/00200.html?" + passcode; done=1; }
if (username=="dshafer" && password=="dcsmkh0420") { window.location="students/1104070252/00200.html?" + passcode; done=1; }
if (username=="mlw911" && password=="monica78") { window.location="students/1103260341/00200.html?" + passcode; done=1; }
if (username=="chaplain" && password=="mjedgn32") { window.location="students/1103241323/00200.html?" + passcode; done=1; }
if (username=="maggiemoney" && password=="spirit") { window.location="students/1103221545/00200.html?" + passcode; done=1; }
if (username=="pastorernie" && password=="freedom") { window.location="students/1103221503/00200.html?" + passcode; done=1; }
if (username=="sunofkemet" && password=="godisncontrol") { window.location="students/1103140304/00200.html?" + passcode; done=1; }
if (username=="obakeng" && password=="77billion") { window.location="students/1103121311/00200.html?" + passcode; done=1; }
if (username=="ruth5858" && password=="prince1958") { window.location="students/1103070131/00200.html?" + passcode; done=1; }
if (username=="cmathis5" && password=="coffee101") { window.location="students/1102231655/00200.html?" + passcode; done=1; }
if (username=="skyelinnshaw" && password=="azzureblue") { window.location="students/1102142247/00200.html?" + passcode; done=1; }
if (username=="kathy123" && password=="featured2") { window.location="students/1102142233/00200.html?" + passcode; done=1; }
if (username=="prempeh" && password=="3836812") { window.location="students/1101271402/00200.html?" + passcode; done=1; }
if (username=="aj6050" && password=="1949aj") { window.location="students/1101271312/00200.html?" + passcode; done=1; }
if (username=="j730917" && password=="phiwa") { window.location="students/1011031036/00200.html?" + passcode; done=1; }
if (username=="j681006" && password=="xolij") { window.location="students/1011031021/00200.html?" + passcode; done=1; }
if (username=="thecorfiot" && password=="kerkyra") { window.location="students/1009292435/00200.html?" + passcode; done=1; }
if (username=="revjay" && password=="spirit1958") { window.location="students/1009161511/00200.html?" + passcode; done=1; }
if (username=="wayspeaker" && password=="hca9erp") { window.location="students/1009140200/00200.html?" + passcode; done=1; }
if (username=="gloria" && password=="studyz") { window.location="students/1008150242/00200.html?" + passcode; done=1; }
if (username=="04mka54" && password=="045400") { window.location="students/1008092057/00200.html?" + passcode; done=1; }
if (username=="rostuco49" && password=="sophia") { window.location="students/1007060057/00200.html?" + passcode; done=1; }
if (username=="acooper" && password=="morgan11") { window.location="students/0902270714/00200.html?" + passcode; done=1; }
if (username=="moons" && password=="witchie") { window.location="students/1005152341/00200.html?" + passcode; done=1; }
if (username=="brian" && password=="kaylah") { window.location="students/1005151446/00200.html?" + passcode; done=1; }
if (username=="dbutler" && password=="wildcat76") { window.location="students/1004252439/00200.html?" + passcode; done=1; }
if (username=="revjim" && password=="j1my3aw") { window.location="students/1002102352/00200.html?" + passcode; done=1; }
if (username=="marcia" && password=="catlover") { window.location="students/1002102252/00200.html?" + passcode; done=1; }
if (username=="tracdee" && password=="stacey13") { window.location="students/1001061629/00200.html?" + passcode; done=1; }
if (username=="acmmore423" && password=="john316") { window.location="students/1001050241/00200.html?" + passcode; done=1; }
if (username=="luisylolin" && password=="parents1") { window.location="students/1001050210/00200.html?" + passcode; done=1; }
if (username=="bickleton5656" && password=="instow5656") { window.location="students/0912222214/00200.html?" + passcode; done=1; }
if (username=="saskdog" && password=="arenkay") { window.location="students/0912211202/00200.html?" + passcode; done=1; }
if (username=="moe" && password=="5943kenilwood") { window.location="students/0912090341/00200.html?" + passcode; done=1; }
if (username=="05509" && password=="joebobduck") { window.location="students/0911162329/00200.html?" + passcode; done=1; }
if (username=="evarts" && password=="little") { window.location="students/0911169145/00200.html?" + passcode; done=1; }
if (username=="js7523" && password=="manoffaith01") { window.location="students/0910289125/00200.html?" + passcode; done=1; }
if (username=="maragachui" && password=="kag281x") { window.location="students/0910141460/00200.html?" + passcode; done=1; }
if (username=="walkell" && password=="kaylah") { window.location="students/0910131134/00200.html?" + passcode; done=1; }
if (username=="arice59" && password=="iamradiant59") { window.location="students/0909280416/00200.html?" + passcode; done=1; }
if (username=="yvonne757" && password=="truth1") { window.location="students/0909222013/00200.html?" + passcode; done=1; }
if (username=="sneekapooh" && password=="sanders") { window.location="students/0909132141/00200.html?" + passcode; done=1; }
if (username=="moose" && password=="mjedgn32") { window.location="students/0909121428/00200.html?" + passcode; done=1; }
if (username=="mlfrazi" && password=="divalynn40") { window.location="students/0908030253/00200.html?" + passcode; done=1; }
if (username=="ekklektia1" && password=="just4jay") { window.location="students/0907240843/00200.html?" + passcode; done=1; }
if (username=="dklenski" && password=="christine") { window.location="students/0907161349/00200.html?" + passcode; done=1; }
if (username=="thiamarie" && password=="loving45") { window.location="students/0907091820/00200.html?" + passcode; done=1; }
if (username=="tleales" && password=="caracas") { window.location="students/0907051957/00200.html?" + passcode; done=1; }
if (username=="baba2000" && password=="56833") { window.location="students/0906230206/00200.html?" + passcode; done=1; }
if (username=="3538" && password=="5205075") { window.location="students/0905200452/00200.html?" + passcode; done=1; }
if (username=="p951753" && password=="m753951") { window.location="students/0905190742/00200.html?" + passcode; done=1; }
if (username=="barryvennard" && password=="char485myr") { window.location="students/0904130810/00200.html?" + passcode; done=1; }

//                    older login folders below
if (username=="zande123" && password=="faithful111") { window.location="students/0904100832/00200.html?" + passcode; done=1; }
if (username=="pass16" && password=="pass16") { window.location="students/0903240140/00200.html?" + passcode; done=1; }
// if (username=="alvinx91" && password=="dominick") { window.location="students/0903211552/00200.html?" + passcode; done=1; }
if (username=="jooker" && password=="time4luv") { window.location="students/0903191145/00200.html?" + passcode; done=1; }
if (username=="jlehman" && password=="metabible") { window.location="students/0903141508/00200.html?" + passcode; done=1; }
if (username=="708257" && password=="hanane11") { window.location="students/0903120853/00200.html?" + passcode; done=1; }
if (username=="lrenee40fly" && password=="hisfavor") { window.location="students/0903111925/00200.html?" + passcode; done=1; }
if (username=="kclark" && password=="charley123") { window.location="students/0903050518/00200.html?" + passcode; done=1; }
if (username=="emily921" && password=="havana53") { window.location="students/0903031741/00200.html?" + passcode; done=1; }
if (username=="acooper" && password=="morgan11") { window.location="students/0902270714/00200.html?" + passcode; done=1; }
if (username=="angela" && password=="savvvy") { window.location="students/0902261218/00200.html?" + passcode; done=1; }
if (username=="amt4848" && password=="annamarie") { window.location="students/0902051546/00200.html?" + passcode; done=1; }
if (username=="monikah" && password=="sarah1media") { window.location="students/0902051201/00200.html?" + passcode; done=1; }
if (username=="rose2" && password=="buddy") { window.location="students/0901281654/00200.html?" + passcode; done=1; }
if (username=="yr2012" && password=="preach") { window.location="students/0901272144/00200.html?" + passcode; done=1; }
if (username=="pamperedsoul" && password=="snuggles") { window.location="students/0901222203/00200.html?" + passcode; done=1; }
if (username=="gwilliams" && password=="gospel11") { window.location="students/0901161148/00200.html?" + passcode; done=1; }
if (username=="epinge1" && password=="messiah") { window.location="students/0901071354/00200.html?" + passcode; done=1; }
if (username=="000" && password=="student") { window.location="students/00000001/00200.html?" + passcode; done=1; }
if (username=="evrol" && password=="224600") { window.location="students/0901061514/00200.html?" + passcode; done=1; }
if (username=="bcollins185" && password=="tmc1100") { window.location="students/0812270209/00200.html?" + passcode; done=1; }
if (username=="marie1102" && password=="hamradio") { window.location="students/0812230919/00200.html?" + passcode; done=1; }
if (username=="william407" && password=="36911799") { window.location="students/0812161800/00200.html?" + passcode; done=1; }
if (username=="erikasays" && password=="onlyiknow") { window.location="students/0812061443/00200.html?" + passcode; done=1; }
if (username=="lcapps" && password=="lgc6686") { window.location="students/0812060700/00200.html?" + passcode; done=1; }
if (username=="michael59" && password=="kansas78") { window.location="students/0812031824/00200.html?" + passcode; done=1; }
if (username=="benjamkd" && password=="scooter") { window.location="students/0812031005/00200.html?" + passcode; done=1; }
if (username=="biteme8" && password=="biteme8") { window.location="students/08120201/00200.html?" + passcode; done=1; }
if (username=="mcosentino" && password=="july19") { window.location="students/08120101/00200.html?" + passcode; done=1; }
if (username=="rental1957" && password=="rental1957") { window.location="students/08112102/00200.html?" + passcode; done=1; }
if (username=="pearlgirl" && password=="4jesus") { window.location="students/08112101/00200.html?" + passcode; done=1; }
if (username=="carmine" && password=="jaycee") { window.location="students/08111901/00200.html?" + passcode; done=1; }
if (username=="lhicks" && password=="suddenly") { window.location="students/08111101/00200.html?" + passcode; done=1; }
if (username=="renyanc" && password=="yancy") { window.location="students/08110901/00200.html?" + passcode; done=1; }
if (username=="vonzel" && password=="silver13") { window.location="students/08103001/00200.html?" + passcode; done=1; }
if (username=="jayceemix" && password=="wawacaca") { window.location="students/08102701/00200.html?" + passcode; done=1; }
if (username=="deewee" && password=="lordwee") { window.location="students/08101801/00200.html?" + passcode; done=1; }
if (username=="jbc1958" && password=="spirit") { window.location="students/08101501/00200.html?" + passcode; done=1; }
if (username=="nae4him" && password=="jesus") { window.location="students/08100901/00200.html?" + passcode; done=1; }
if (username=="carolo" && password=="zn5999") { window.location="students/08092601/00200.html?" + passcode; done=1; }
if (username=="wtl08" && password=="a23808") { window.location="students/08092401/00200.html?" + passcode; done=1; }
if (username=="dstjohn" && password=="deemark1") { window.location="students/08092301/00200.html?" + passcode; done=1; }
if (username=="evangelistdonna" && password=="praisegod") { window.location="students/08091802/00200.html?" + passcode; done=1; }
if (username=="dabray" && password=="11113333") { window.location="students/08091801/00200.html?" + passcode; done=1; }
if (username=="midnyt" && password=="46545456") { window.location="students/08091701/00200.html?" + passcode; done=1; }
if (username=="willingness" && password=="carefoot") { window.location="students/08083101/00200.html?" + passcode; done=1; }
if (username=="123456" && password=="ginger") { window.location="students/08081903/00200.html?" + passcode; done=1; }
if (username=="barbnca" && password=="spirit") { window.location="students/08081501/00200.html?" + passcode; done=1; }
if (username=="normairis" && password=="parents1") { window.location="students/08081301/00200.html?" + passcode; done=1; }
if (username=="query4life" && password=="livelife") { window.location="students/08081202/00200.html?" + passcode; done=1; }
if (username=="teri2306" && password=="teri3631") { window.location="students/08081201/00200.html?" + passcode; done=1; }
if (username=="mostrev" && password=="ceecee5709") { window.location="students/08081001/00200.html?" + passcode; done=1; }
if (username=="kennedd1" && password=="passion") { window.location="students/08073102/00200.html?" + passcode; done=1; }
if (username=="dennymathai" && password=="refresh") { window.location="students/08073101/00200.html?" + passcode; done=1; }
if (username=="chinaza23" && password=="chinaza23") { window.location="students/08072401/00200.html?" + passcode; done=1; }
if (username=="crg2084" && password=="beau1958") { window.location="students/08072001/00200.html?" + passcode; done=1; }
if (username=="christjesus" && password=="master") { window.location="students/08070101/00200.html?" + passcode; done=1; }
if (username=="75re35da" && password=="tissue") { window.location="students/08042401/00200.html?" + passcode; done=1; }
if (username=="04071965" && password=="ianbro77") { window.location="students/08040101/00200.html?" + passcode; done=1; }
if (username=="ced1957" && password=="psy2807") { window.location="students/08030101/00200.html?" + passcode; done=1; }
if (username=="134451001" && password=="momnet") { window.location="students/08020701/00200.html?" + passcode; done=1; }
if (username=="1198417" && password=="0657pi") { window.location="students/08020501/00200.html?" + passcode; done=1; }
if (username=="emmanuelchua82" && password=="l76028") { window.location="students/08011601/00200.html?" + passcode; done=1; }
if (username=="lonewolf" && password=="cosmokitty") { window.location="students/07111301/00200.html?" + passcode; done=1; }
if (username=="54420" && password=="latee") { window.location="students/07110801/00200.html?" + passcode; done=1; }
if (username=="woobie" && password=="woobie") { window.location="students/07102701/00200.html?" + passcode; done=1; }
if (username=="revron" && password=="elohim") { window.location="students/07102501/00200.html?" + passcode; done=1; }
if (username=="kacolecpa" && password=="delta14") { window.location="students/07082201/00200.html?" + passcode; done=1; }
if (username=="15289" && password=="bluefish") { window.location="students/07082101/00200.html?" + passcode; done=1; }
if (username=="acomari" && password=="bible") { window.location="students/07071701/00200.html?" + passcode; done=1; }
if (username=="prince" && password=="7ahyc") { window.location="students/07071401/00200.html?" + passcode; done=1; }
if (username=="sharbo" && password=="buffys") { window.location="students/07061601/00200.html?" + passcode; done=1; }
if (username=="vbgold" && password=="famford") { window.location="students/07061301/00200.html?" + passcode; done=1; }
if (username=="thrive4more" && password=="kyla0107") { window.location="students/07061001/00200.html?" + passcode; done=1; }
if (username=="abu999" && password=="4996882") { window.location="students/07060401/00200.html?" + passcode; done=1; }
if (username=="chazman" && password=="plates") { window.location="students/07052901/00200.html?" + passcode; done=1; }
if (username=="buonoro" && password=="biblestudy") { window.location="students/07051701/00200.html?" + passcode; done=1; }
if (username=="flowerfunk" && password=="freedom34") { window.location="students/07011401/00200.html?" + passcode; done=1; }
if (username=="songsparrow" && password=="crow2hawk") { window.location="students/06112802/00200.html?" + passcode; done=1; }
if (username=="jabberwocky" && password=="brillig") { window.location="students/06112801/00200.html?" + passcode; done=1; }
if (username=="153777" && password=="unique") { window.location="students/06111201/00200.html?" + passcode; done=1; }
if (username=="caroleromig" && password=="redroses") { window.location="students/06090201/00200.html?" + passcode; done=1; }
if (username=="odessa" && password=="123456") { window.location="students/06083001/00200.html?" + passcode; done=1; }
if (username=="onsummersend" && password=="liveandletlive") { window.location="students/06081901/00200.html?" + passcode; done=1; }
if (username=="rev456" && password=="pastor") { window.location="students/06060401/00200.html?" + passcode; done=1; }
if (username=="gap12" && password=="quinton") { window.location="students/06051801/00200.html?" + passcode; done=1; }
if (username=="sasimmons" && password=="janesays") { window.location="students/06032701/00200.html?" + passcode; done=1; }
if (username=="ileshak" && password=="issam1") { window.location="students/06031201/00200.html?" + passcode; done=1; }
if (username=="pastormorris" && password=="simon1") { window.location="students/06030301/00200.html?" + passcode; done=1; }
if (username=="spurgeon" && password=="pedro") { window.location="students/06022701/00200.html?" + passcode; done=1; }
if (username=="icvc4748" && password=="truth") { window.location="students/06022401/00200.html?" + passcode; done=1; }
if (username=="summerky" && password=="5731324") { window.location="students/06012601/00200.html?" + passcode; done=1; }
if (username=="rdnywiggins" && password=="alisea") { window.location="students/05123001/00200.html?" + passcode; done=1; }
if (username=="khazimla" && password=="khazimla") { window.location="students/05122401/00200.html?" + passcode; done=1; }
if (username=="bickleton56" && password=="ilfracombe5656") { window.location="students/04122601/00200.html?" + passcode; done=1; }
if (username=="bajangirl1" && password=="beauty") { window.location="students/04090801/00200.html" + "?Master__Pages?" + passcode; done=1; }
if (username=="gaillee" && password=="password") { window.location="students/04081501/00200.html?" + passcode; done=1; }
if (username=="dabrias1" && password=="madam") { window.location="students/04072501/00200.html?" + passcode; done=1; }
if (username=="kerceykent" && password=="100angels") { window.location="students/04030401/00200.html?" + passcode; done=1; }
if (username=="danielmott" && password=="ilovem") { window.location="students/03121601/00200.html?" + passcode; done=1; }
if (username=="tsmacademy" && password=="password") { window.location="students/03101902/00200.html?" + passcode; done=1; }
if (username=="jlf181811" && password=="mom1706") { window.location="students/03090501/00200.html" + "?Joann_Lynn_Ostern?" + passcode; done=1; }
if (username=="driley2346" && password=="amanda") { window.location="students/03082302/00200.html" + "?Daryl_Christopher_Riley?" + passcode; done=1; }
if (username=="bee247days" && password=="tp7ha") { window.location="students/03060701/00200.html?" + passcode; done=1; }
if (username=="byrdcage" && password=="kap7t3") { window.location="students/03050303/00200.html?" + passcode; done=1; }
if (username=="tommye" && password=="p7ak3") { window.location="students/03050301/00200.html?" + passcode; done=1; }
if (username=="cfcarson" && password=="kp7ath") { window.location="students/03041101/00200.html" + "?Carl_F_Carson?" + passcode; done=1; }
if (username=="ahines" && password=="th7pk") { window.location="students/03010201/00200.html?" + passcode; done=1; }
if (username=="72ta3k" && password=="space") { window.location="students/02070102/00200.html?" + passcode; done=1; }
if (username=="janine" && password=="tp8c5") { window.location="students/02031001/00200.html?" + passcode; done=1; }

//// END OF STUDENT LOGIN //////////

// Master Pages 00000000
if (username=="000" && password=="master") { window.location="students/00000000/00200.html?" + passcode; done=1; }
if (username=="002" && password=="template") { window.location="students/00000002/00200.html?" + passcode; done=1; }

// Test Study
if (username=="test" && password=="test") { window.location="students/test/00200.html?" + passcode; done=1; }

  if (done==0) { 
    alert("Invalid login!");
    //deleteCookie('username');
    //deleteCookie('password');
    document.login.studentID.select();
    //document.login.pass.value = "";
  }
}

// *********************************************//
// ////////// END OF STUDENT NAMES //////////// //
// *********************************************//



function enterStudentID() {
  //studenID field is blank
  if (document.login.studentID.value == '') {
    alert('Enter Student ID.');
    document.login.studentID.focus();
  }
}

function enterPassword() {
  //studenID field is blank
  alert('Enter Password.');
  document.login.pass.focus();
}

function getCount() {
  // count user visits
  // get Date object
  var now = new Date();

  // fix the bug in Navigator 2.0, Macintosh
  fixDate(now);

  // set cookie to expire in one year
  now.setTime(now.getTime() + 365 * 24 * 60 * 60 * 1000);
  var visits = getCookie("counter");

  // if no cookie found, this is first visit
  if (!visits) {
    visits = 1; // the value for the new cookie
    }
  else {
  // increment the counter
    visits = parseInt(visits) + 1;
  }
  // save the changed data to the counter cookie
  setCookie("counter", visits, now);
  return visits;
}
function setCookie(name, value, expires, path, domain, secure) {
  var curCookie = name + "=" + escape(value) +
      ((expires) ? "; expires=" + expires.toGMTString() : "") +
      ((path) ? "; path=" + path : "") +
      ((domain) ? "; domain=" + domain : "") +
      ((secure) ? "; secure" : "");
  document.cookie = curCookie;
}

function getCookie(name) {
  var dc = document.cookie;
  var prefix = name + "=";
  var begin = dc.indexOf("; " + prefix);
  if (begin == -1) {
    begin = dc.indexOf(prefix);
    if (begin != 0) return null;
  } else
    begin += 2;
  var end = document.cookie.indexOf(";", begin);
  if (end == -1)
    end = dc.length;
  return unescape(dc.substring(begin + prefix.length, end));
}

/*
   name - name of the cookie
   [path] - path of the cookie (must be same as path used to create cookie)
   [domain] - domain of the cookie (must be same as domain used to
     create cookie)
   path and domain default if assigned null or omitted if no explicit
     argument proceeds
*/

function deleteCookie(name, path, domain) {
  if (getCookie(name)) {
    document.cookie = name + "=" +
    ((path) ? "; path=" + path : "") +
    ((domain) ? "; domain=" + domain : "") +
    "; expires=Thu, 01-Jan-70 00:00:01 GMT";
    document.login.studentID.value = "";
    document.login.pass.value = "";
  }
  document.login.studentID.focus();
}

// date - any instance of the Date object
// * hand all instances of the Date object to this function for "repairs"

function fixDate(date) {
  var base = new Date(0);
  var skew = base.getTime();
  if (skew > 0)
    date.setTime(date.getTime() - skew);
}

function changeName() {
  var now = new Date();
  var old = now;
  fixDate(now);
  now.setTime(now.getTime() + 365 * 24 * 60 * 60 * 1000);
  username = prompt("Please enter your name:", "");
  setCookie("username", username, now);
}

function checkFields() {
  //check fields for blanks
  if (document.login.studentID.value == '') {
    alert('Enter Studet ID');
    document.login.studentID.focus();
    return
  }
  if (document.login.pass.value == '') {
    alert('Enter Password');
    document.login.pass.focus();
    return
  }
}

function goSubmit() {
  //set a new cookie
  var GuestID = document.login.studentID.value.toLowerCase();
  var GuestPass = document.login.pass.value.toLowerCase();
  //GuestID = GuestID.toLowerCase();
  //GuestID = GuestPass.toLiwerCase();
  if (GuestID == 'guest' && GuestPass == 'guest') {
    Login();
  }
  else {
    var now = new Date();
    var old = now;
    fixDate(now);
    now.setTime(now.getTime() + 365 * 24 * 60 * 60 * 1000);
    username = document.login.studentID.value;
    password = document.login.pass.value;
    setCookie("username", username, now);
    setCookie("password", password, now);
    Login()
  }
}

function clickStudentID() {
  document.login.studentID.select();
}

function clickPassword() {
  document.login.pass.select();
}

// Check for StudentID and Password in page address
//address = window.location;	// URL address of login page
//txt = address.toString();	// Convert address object to string
//len = text.length;		// Get length of address
//qloc = txt.lastIndexOf("?");	// Locate StudentID separator position
  
// If ID < 0 then there is no login paased
//if (ID > 0) {
//  Login = text.substring(ID+1,len);   // Extract passed Login parameters
//  len = Login.length;
//  p = Login.lastIndexOf("+");
//  Student = Login.substring(0,p-1);
//  Password = Login.substring(p+1,len);
//  document.login.studentID.value = Student;
//  document.login.pass.value = Password;
//  goSubmit();
//}

