// Copyright (c) 1997 Mecklermedia Corporation.
// http://www.webreference.com/js/
// License is granted if and only if this entire
// copyright notice is included. By Tomer Shiran.
// Modified for Y2K multi browser compatibility by Mike Weber

// Copylefted (c <--) 2001 Monkey Farts Incorporated.
// http://www.monkeyfartsstink.com/
// Modified again by Eric Nakagawa back into numerical dates
//          added 24-hour time...
// Modied for IE 6.0 (getMonth() gave (month - 1) much like C's time function)

function makeArray() {
  var args = makeArray.arguments;
  for (var i = 0; i < args.length; i++) {
    this[i] = args[i];
  }
  this.length = args.length;
}
function fixDate(date) {
  var base = new Date(0);
  var skew = base.getTime();
  if (skew > 0)
    date.setTime(date.getTime() - skew);
}
function getString(date) {
	var day="";
	var month="";
	var ampm="";
	var ampmhour="";
	var myweekday="";
	var year="";

	myhours = date.getHours();
	ampmhour  =  (myhours > 12) ? myhours - 12 : myhours;
	ampm =  (myhours >= 12) ? ' PM' : ' AM';
	mytime = date.getMinutes();
	myminutes =  ((mytime < 10) ? ':0' : ':') + mytime;


  var an = navigator.appName;
  var av = navigator.appVersion;
  av = parseInt(av);
  var no = "4";
  var no5 = "5";
  var no6 = "6";
  var anmsie = "Microsoft Internet Explorer";
  var tmpstr = "";

// Look mah no hands! In fact, it's IE 6.0!
if(navigator.appVersion.indexOf("MSIE 6.0") != -1) av = no6;

if (an == anmsie) {
	if (av == no) {
         return ((date.getMonth() > 10) ? date.getMonth():"0" + date.getMonth()) + "/" +
         ((date.getDate() > 10) ? date.getDate(): "0" + date.getDate()) +
         "/" + date.getYear() + " " + myhours + myminutes;
	} else if (av == no5) {
         return ((date.getMonth() > 10) ? date.getMonth():"0" + date.getMonth()) + "/" +
         ((date.getDate() > 10) ? date.getDate() : "0" + date.getDate()) +
         "/" + date.getYear() + " " + myhours + myminutes;
	} else if (av == no6) {
         return ((date.getMonth() + 1 > 10) ? date.getMonth() + 1:"0" + date.getMonth()) + "/" +
         ((date.getDate() > 10) ? date.getDate() : "0" + date.getDate()) +
         "/" + date.getYear() + " " + myhours + myminutes;
	} else {
         return ((date.getMonth() > 10) ? date.getMonth():"0" + date.getMonth()) + "/" +
         ((date.getDate() > 10) ? date.getDate() : "0" + date.getDate()) +
         (1900 + date.getYear()) +
         " " + myhours + myminutes;
	}

} else {
         return ((date.getMonth() > 10) ? date.getMonth():"0" + date.getMonth()) + "/" +
         ((date.getDate() > 10) ? date.getDate() : "0" + date.getDate()) +
         (1900 + date.getYear()) +
         " " + myhours + myminutes;
}

}