function designBy() {
document.writeln('<b>Web Site Design by <A HREF="http://www.beartoothtechnologies.com" target=_top >Beartooth Technologies</A></b>')
}

function designedBy() {
document.writeln('<b>Web Site Design by <A HREF="http://www.beartoothtechnologies.com" target=_top >Beartooth Technologies</A></b>')
}

function lastAccess() {
document.writeln('<br><TABLE CELLSPACING=0 BORDER=0 WIDTH=500><tr><td><I><FONT SIZE=2><P width="500" align="center"><BR>');
var dayNames = new
Array("Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday");
var monthNames = new
Array("January","February","March","April","May","June","July","August","September","October","November","December");
today = new Date();
lastmod = new Date(document.lastModified);
diffdays = Math.ceil( (today.getTime()-lastmod.getTime())/(24*60*60*1000) );
var then = new Date(document.lastModified);
var adjYear = then.getYear();
if (adjYear < 100) { adjYear = adjYear+2000 };
if (adjYear < 1090) { adjYear = adjYear+1900 };
document.writeln("Last updated on "+ dayNames[then.getDay()] + ", " + monthNames[then.getMonth()] + " " + then.getDate() + ", " + adjYear + " at " + then.getHours() + ":" + then.getMinutes() + ":" + then.getSeconds() + ".");
document.writeln('</P></TD></TR></TABLE></I></FONT><br><TABLE CELLSPACING=0 BORDER=0 WIDTH=500><tr><td><P ALIGN="CENTER"><FONT FACE="Arial" SIZE=1><b>');
document.writeln('<b>Web Site Design by <A HREF="http://www.beartoothtechnologies.com" target=_top >Beartooth Technologies</A></b>')
document.writeln('</b></p></TD></TR></TABLE><br><br><br><br>');
}

function lastModified() {
document.writeln('<br><TABLE CELLSPACING=0 BORDER=0 WIDTH=500><tr><td><I><FONT SIZE=2><P width="500" align="center"><BR>');
var dayNames = new
Array("Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday");
var monthNames = new
Array("January","February","March","April","May","June","July","August","September","October","November","December");
today = new Date();
lastmod = new Date(document.lastModified);
diffdays = Math.ceil( (today.getTime()-lastmod.getTime())/(24*60*60*1000) );
var then = new Date(document.lastModified);
var adjYear = then.getYear();
if (adjYear < 100) { adjYear = adjYear+2000 };
if (adjYear < 1090) { adjYear = adjYear+1900 };
document.writeln("Last updated on "+ dayNames[then.getDay()] + ", " + monthNames[then.getMonth()] + " " + then.getDate() + ", " + adjYear + " at " + then.getHours() + ":" + then.getMinutes() + ":" + then.getSeconds() + ".");
document.writeln('</P></TD></TR></TABLE></I></FONT><br><TABLE CELLSPACING=0 BORDER=0 WIDTH=500><tr><td><P ALIGN="CENTER"><FONT FACE="Arial" SIZE=1><b>');
document.writeln('<b>Web Site Design by <A HREF="http://www.beartoothtechnologies.com" target=_top >Beartooth Technologies</A></b>')
document.writeln('</b></p></TD></TR></TABLE><br><br><br><br>');
}



function initDates() {
	now = new Date
	expireDate = new Date
	expireDate.setMonth(expireDate.getMonth()+6);

	realName=""
	screenName=""
	emailAddress=""
	lastVisit=""

   thisCookie = document.cookie.split("; ")

	for (i=0; i<thisCookie.length; i++) {
		cookie_name=thisCookie[i].split("=")[0]
		cookie_value=thisCookie[i].split("=")[1]
		if (cookie_name == "realName") { realName = thisCookie[i].split("=")[1] }
		if (cookie_name == "screenName") { screenName = thisCookie[i].split("=")[1] }
		if (cookie_name == "emailAddress") { emailAddress = thisCookie[i].split("=")[1] }
		if (cookie_name == "lastVisit") { lastVisit = thisCookie[i].split("=")[1] }
		}
	}

function computeElapsed() {
   priorVisit = lastVisit;
   currentVisit = now;
   var priorVisitA = new Date(priorVisit)
   priorTime = priorVisitA.getTime()
   var currentVisitA = new Date(currentVisit)
   currentTime = currentVisitA.getTime()
   elapsedTime = (currentTime - priorTime)
   elapsedSeconds = (currentTime - priorTime) / 1000
   elapsedMinutes = (currentTime - priorTime) / 60000

   document.cookie = "lastVisit="+now+";expires=" + expireDate.toGMTString() 
}

function setCookie1() {
   screenName = document.cookieForm.screenName.value
   document.cookie = "screenName="+screenName+";expires=" + expireDate.toGMTString() 
   }

function setCookie2() {
   realName = document.cookieForm.realName.value
   document.cookie = "realName="+realName+";expires=" + expireDate.toGMTString() 
   }

function setCookie3() {
   emailAddress = document.cookieForm.emailAddress.value
   document.cookie = "emailAddress="+emailAddress+";expires=" + expireDate.toGMTString() 
   }

function modifyCookie() {
   setCookie1()
   setCookie2()
   setCookie3()
   document.cookie = "lastVisit="+now+";expires=" + expireDate.toGMTString() 
}

function goHome() {
   if (document.layers)
      window.home()
   else if (document.all)
      window.location="about:home"
   else
      alert("You need NS 4+ or IE 4+ to go back home!")
   }

function validProfile() {
   if (document.cookie == "") {
      window.location="index2.html"
   }	
   if (realName == "") {
      window.location="index2.html"
   }	
   if (screenName == "") {
      window.location="index2.html"
   }	
   if (emailAddress == "") {
      window.location="index2.html"
   }	
}

function testPost() {
   if (elapsedMinutes > 5) {
      writeIt = true }
         else {
      writeIt = false 
   }
}

function postForm() {
   document.cookieForm.subject.value = realName;
   document.cookieForm.name.value = screenName;
   document.cookieForm.email.value = emailAddress;
   document.cookieForm.url.value = document.location.href;
   document.cookieForm.url_title.value = document.location.href;
   document.cookieForm.body.value = "realName = "+realName+" <br>screenName = "+screenName+" <br>emailAddress = "+emailAddress+" <br>lastVisit = "+lastVisit+" <br>document.URL = "+document.location.href+" <br>";
   if (realName != "") {
      if (writeIt == true) {
         document.cookieForm.submit()
      }
   }
}

function getTime() {
   now = new Date();
   y2k = new Date(travelTime);
   if (now > y2k) {
       y2k = now
   }
   days = (y2k - now) / 1000 / 60 / 60 / 24;
   daysRound = Math.floor(days);
   hours = (y2k - now) / 1000 / 60 / 60 - (24 * daysRound);
   hoursRound = Math.floor(hours);
   minutes = (y2k - now) / 1000 /60 - (24 * 60 * daysRound) - (60 * hoursRound);
   minutesRound = Math.floor(minutes);
   seconds = (y2k - now) / 1000 - (24 * 60 * 60 * daysRound) - (60 * 60 * hoursRound) - (60 * minutesRound);
   secondsRound = Math.round(seconds);
   sec = (secondsRound == 1) ? " second" : " seconds";
   min = (minutesRound == 1) ? " minute, " : " minutes, ";
   hr = (hoursRound == 1) ? " hour, " : " hours, ";
   dy = (daysRound == 1)  ? " day, " : " days, ";
   document.timeForm.input1.value = daysRound  + dy + hoursRound + hr + minutesRound + min + secondsRound + sec;
   newtime = window.setTimeout("getTime();", 1000);
   nowAlt = new Date();
   y2kAlt = new Date(travelTimeAlt);
   if (nowAlt > y2kAlt) {
       y2kAlt = nowAlt
   }
   daysAlt = (y2kAlt - nowAlt) / 1000 / 60 / 60 / 24;
   daysRoundAlt = Math.floor(daysAlt);
   hoursAlt = (y2kAlt - nowAlt) / 1000 / 60 / 60 - (24 * daysRoundAlt);
   hoursRoundAlt = Math.floor(hoursAlt);
   minutesAlt = (y2kAlt - nowAlt) / 1000 /60 - (24 * 60 * daysRoundAlt) - (60 * hoursRoundAlt);
   minutesRoundAlt = Math.floor(minutesAlt);
   secondsAlt = (y2kAlt - nowAlt) / 1000 - (24 * 60 * 60 * daysRoundAlt) - (60 * 60 * hoursRoundAlt) - (60 * minutesRoundAlt);
   secondsRoundAlt = Math.round(secondsAlt);
   secAlt = (secondsRoundAlt == 1) ? " second" : " seconds";
   minAlt = (minutesRoundAlt == 1) ? " minute, " : " minutes, ";
   hrAlt = (hoursRoundAlt == 1) ? " hour, " : " hours, ";
   dyAlt = (daysRoundAlt == 1)  ? " day, " : " days, ";
   document.timeFormAlt.input1Alt.value = daysRoundAlt  + dyAlt + hoursRoundAlt + hrAlt + minutesRoundAlt + minAlt + secondsRoundAlt + secAlt;
   newtimeAlt = window.setTimeout("getTimeAlt();", 1000);
}
