function clock() {
if (!document.layers && !document.all) return;
var digital = new Date();
var hours = digital.getHours();
var minutes = digital.getMinutes();
var seconds = digital.getSeconds();
var amOrPm = "AM";
if (hours > 11) amOrPm = "PM";
if (hours > 12) hours = hours - 12;
if (hours == 0) hours = 12;
if (minutes <= 9) minutes = "0" + minutes;
if (seconds <= 9) seconds = "0" + seconds;
dispTime = " | " + hours + ":" + minutes + ":" + seconds + " " + amOrPm;
if (document.layers) {
document.layers.pendule.document.write(dispTime);
document.layers.pendule.document.close();
}
else
if (document.all)
pendule.innerhtml = dispTime;
setTimeout("clock()", 1000);
}

function showTerms() { //v2.0

  newWindow = window.open("Terms.asp", "terms", "scrollbars,height=500,width=570,top=75,left=75");
  newWindow.focus();
}

function ShowExchange() {
  newWindow = window.open("ExchangeHelpScreen.asp", "exchange", "scrollbars,height=600,width=920,top=75,left=75");
  newWindow.focus();

}

function dateGenerator(){

var today = new Date();

//Date
var todaysDate = today.getDate();

//Day
var day = today.getDay();

var day_of_week = new Array();

day_of_week[0] = "Sun";
day_of_week[1] = "Mon";
day_of_week[2] = "Tues";
day_of_week[3] = "Wed";
day_of_week[4] = "Thurs";
day_of_week[5] = "Fri";
day_of_week[6] = "Sat";

var myDay = day_of_week[day];

//Month
var month = today.getMonth();

var month_of_year = new Array();

month_of_year[0] = "Jan";
month_of_year[1] = "Feb";
month_of_year[2] = "Mar";
month_of_year[3] = "Apr";
month_of_year[4] = "May";
month_of_year[5] = "June";
month_of_year[6] = "July";
month_of_year[7] = "Aug";
month_of_year[8] = "Sept";
month_of_year[9] = "Oct";
month_of_year[10] = "Nov";
month_of_year[11] = "Dec";

var myMonth = month_of_year[month];

//Year
//var myYear = "2002";
var myYear = today.getYear();
if (myYear < 1000) myYear += 1900;

document.write(myDay + ", " + myMonth + " " + todaysDate + ", " + myYear);

}

//Event driven function that highlights background of row
function highlight_row(myRow) {
myRow.style.backgroundColor = "#CFCFCF";
myRow.style.weight = "bold";
}

//Event driven function that restores background color of row
function resetrow(myRow, javacol) {
if (myRow != selectedrow){
myRow.style.backgroundColor = javacol;
}
}

function updateLocations(){
var locval = document.forms.AdminForm.locationMulti.value;
document.forms.AdminForm.locationIDhidden.value = "multi";
//document.forms.AdminForm.location.disabled = true;
MM_showHideLayers('Layer1','','hide');
document.all.locSelector.innerHTML = "<div align='center' class='data'><a href='#' onClick='singleLocation()'>Single</a></div>";
document.forms.AdminForm.locationMulti.value = "";
return false;
}

function singleLocation(){
alert();
document.forms.AdminForm.locationIDhidden.value = "single";
document.forms.AdminForm.location.disabled = false;
document.forms.AdminForm.location.value = "";
document.all.locSelector.innerHTML = "";
}

function locationSwap(){

var loc = document.forms.AdminForm.location.value;
if (loc == "multi"){
MM_showHideLayers('Layer1','','show');
}
if (loc == "ALL"){
document.forms.AdminForm.locationIDhidden.value = "all";
}
}
