<!--Copyright (C) 2000 MJ Demarco
//this script notes the time the page opens and closes
//and simply subtracts one from the other

startime = new Date() 

function timelapsed()
{
endtime = new Date();
minutes = (endtime.getMinutes() - startime.getMinutes());
seconds = (endtime.getSeconds() - startime.getSeconds());
time = (seconds + (minutes * 60));
if (time == 1)
{
return (time + " second")
}
return (time + " seconds")
} 


//This script allows Netscape to post the "Thank you" alert
//as the user leaves via the exit button, and excludes
//Internet Explorer from this alert as it will also run it at
//the onUnload event at exit whereas netscape doesn't! (therefore
//IE would have run it twice (in succession))
//(It has to be in the onUnload event to cater for exiting in other ways)

function byebye()
{
if (navigator.appName == "Netscape")
{
alert('Thanks for playing, ' + u_name + '\n\nYou wasted ' + timelapsed() 	+ ' on this silly game.\nYou had ' + goodguess + ' correct guesses and ' + badguess + ' incorrect guesses.\nHope you enjoyed yourself!\n\nMortimer');location.href='../tafe.htm';
}

else

{
location.href='../tafe.htm';
}
}		

//-->
