// Date functions and various other useful javascript functions
function MakeArraya(size)   {
  this.length = size;
  for(var i = 1; i <= size; i++)  {
    this[i] = "";
  }
  return this;
}

function MakeArrayb(size)   {
  this.length = size;
  for(var i = 1; i <= size; i++)  {
  this[i] = "";
  }
  return this;
}

function showtime () {
  var now = new Date();
  var year = now.getYear();
  if(year <= 1900) {
    year = year + 1900;
  }
  var month = now.getMonth() + 1;
  var date = now.getDate();
  var day = now.getDay();

  Day = new MakeArraya(7);
  Day[0]="";
  Day[1]="";
  Day[2]="";
  Day[3]="";
  Day[4]="";
  Day[5]="";
  Day[6]="";

  Month = new MakeArrayb(12);
  Month[1]="January";
  Month[2]="February";
  Month[3]="March";
  Month[4]="April";
  Month[5]="May";
  Month[6]="June";
  Month[7]="July";
  Month[8]="August";
  Month[9]="September";
  Month[10]="October";
  Month[11]="November";
  Month[12]="December";

  var timeValue = "";
  timeValue += (Day[day]) + "";
  timeValue += (Month[month]) + " ";
  timeValue += date + " " + year + "    ";
  document.write("<B>" + timeValue + "</B>");
}

function confirmSubmit() {
  var agree=confirm("Are you sure you wish to empty your basket?");
  if (agree)
    return true;
  else
    return false;
}


// Browser sniffing 
bName = navigator.appName;
bVer = parseInt(navigator.appVersion);
if((bName == "Netscape" && bVer >= 3) || (bName == "Microsoft Internet Explorer" && bVer >= 4)) br = "n3";
else br = "n2";

