function writeRow(label, value) {
	document.write("<tr><th>" + label + ":</th><td>" +  value + "</td></tr>\n");
};

function dumpClientVars()
{
	document.write("<table>");

	var theMoment = new Date();
	var theHour = theMoment.getHours();
	var theMinute = theMoment.getMinutes();
	var theDisplacement = (theMoment.getTimezoneOffset() / 60) * -1;
	var sign = "+";
	if (theDisplacement < 0) { sign = ""; }

	var theDate = theMoment.getDate;
	var t = theMoment.toTimeString;
	var d = theMoment.toDateString;

	writeRow("Current Date",theMoment.toDateString());
	writeRow("Current Time",theMoment.toTimeString());
	writeRow("Timezone Offset","GMT " + sign + theDisplacement );
	writeRow("Pages in window.history", window.history.length);
	writeRow("HTTP User Agent",navigator.userAgent);
	writeRow("Browser Name",navigator.appName);
	writeRow("Browser Version",navigator.appVersion);
	writeRow("Browser Minor Version",navigator.appMinorVersion );
	writeRow("Browser Language",navigator.browserLanguage);
	writeRow("Cookies Enabled",navigator.cookieEnabled);
	writeRow("document.cookie",document.cookie);
	writeRow("CPU Class",navigator.cpuClass );
	writeRow("On Line",navigator.onLine );
	writeRow("platform",navigator.platform );
	writeRow("System Language",navigator.systemLanguage     );
	writeRow("User Language",navigator.userLanguage);
	writeRow("Screen Height (avail)",screen.availHeight);
	writeRow("Screen Width (avail)", screen.availWidth);
	writeRow("Buffer Depth", screen.bufferDepth);
	writeRow("Color Depth",screen.colorDepth);
	writeRow("Screen Height",screen.height);
	writeRow("Screen Width",screen.width);
	document.write("</table>\n");
};

function dumpClientVarsToString()
{
	var outstring = "";
	var theMoment = new Date();
	var theHour = theMoment.getHours();
	var theMinute = theMoment.getMinutes();
	var theDisplacement = (theMoment.getTimezoneOffset() / 60) * -1;
	var sign = "+";
	if (theDisplacement < 0) { sign = ""; }

	var theDate = theMoment.getDate;
	var t = theMoment.toTimeString;
	var d = theMoment.toDateString;

	outstring += ( "Current Date:\t\t" +theMoment.toDateString()+ "\n") ;
	outstring += ( "Current Time:\t\t" +theMoment.toTimeString()+ "\n") ;
	outstring += ( "Timezone Offset:\t\t" +"GMT " + sign + theDisplacement + "\n") ;
	outstring += ( "Pages this session:\t\t" + window.history.length+ "\n") ;
	outstring += ( "HTTP User Agent:\t\t" +navigator.userAgent+ "\n") ;
	outstring += ( "Browser Name:\t\t" +navigator.appName+ "\n") ;
	outstring += ( "Browser Version:\t\t" +navigator.appVersion+ "\n") ;
	outstring += ( "Minor Version:\t\t" +navigator.appMinorVersion + "\n") ;
	outstring += ( "Browser Language:\t\t" +navigator.browserLanguage+ "\n") ;
	outstring += ( "Cookies Enabled:\t\t" +navigator.cookieEnabled+ "\n") ;
	outstring += ( "document.cookie:\t\t" +document.cookie+ "\n") ;
	outstring += ( "Machine/CPU Class:\t\t" +navigator.cpuClass + "\n") ;
	outstring += ( "On Line Now:\t\t\t" +navigator.onLine + "\n") ;
	outstring += ( "Machine platform:\t\t" +navigator.platform + "\n") ;
	outstring += ( "System Language:\t\t" +navigator.systemLanguage     + "\n") ;
	outstring += ( "User Language:\t\t" +navigator.userLanguage+ "\n") ;
	outstring += ( "Screen Height (avail)\t"+screen.availHeight+ "\n");
	outstring += ( "Screen Width (avail)\t" + screen.availWidth+ "\n");
	outstring += ( "Buffer Depth\t\t"+ screen.bufferDepth+ "\n");
	outstring += ( "Color Depth\t\t" +screen.colorDepth+ "\n");
	outstring += ( "Screen Height\t\t" +screen.height+ "\n");
	outstring += ( "Screen Width\t\t" +screen.width+ "\n");
	return outstring;
};


