var d = document;var f = d.forms[0];///////////////////////////////////////////////////////////////////////////////////////function getRequestViaHTTP(url, parameters, listName){	var request_via_http = false;     if (window.ActiveXObject)	{	// IE6 and previous.		try		{	request_via_http = new ActiveXObject("Msxml2.XMLHTTP");		}		catch (e)		{	try			{	request_via_http = new ActiveXObject("Microsoft.XMLHTTP");			}			catch (e) {}		}	} else if (window.XMLHttpRequest)	{	// IE7, Firefox, Opera, Safari, etc.		request_via_http = new XMLHttpRequest();		if (request_via_http.overrideMimeType)		{	request_via_http.overrideMimeType('text/plain');		}	}	if (! request_via_http)	{	alert('This XMLHTTP request has failed. IE (PC only), Firefox (Mac and PC), Safari (Mac only), & Opera (PC Only) have successfully tested this code.');		return false;	}		request_via_http.onreadystatechange = function()	{	if (request_via_http.readyState == 4)		{	if (request_via_http.status == 200)			{	populateList(listName, request_via_http.responseText);			} else			{	alert('This XMLHTTP request has failed upon return. (readyState: ' + request_via_http.readyState + ')');			}		}	}	request_via_http.open('GET', url + parameters, true);	request_via_http.send(null);}///////////////////////////////////////////////////////////////////////////////////////function formatNumber(amount, places, showLeftZeroes){	var totalLength = 0;	var formatAmount = "";		if(isNaN(amount))	{	return amount;	}		amount = "" + round(amount, places);		if(places != 0)	{	totalLength = showLeftZeroes + 1 + places;	} else	{	totalLength = showLeftZeroes;	}		if(amount.length < totalLength)	{	totalLength = totalLength - amount.length;		for( var i =0; i<(totalLength); i++ )		{	formatAmount += "0";		}		amount = formatAmount + amount;	}		return amount;}///////////////////////////////////////////////////////////////////////////////////////function round(amount, places){	if( isNaN(amount))	{	return amount;	}		var power = Math.pow(10, places);		amount = Math.round(amount * power);	amount = "" + amount;		if(amount.substr(amount.length - 1, 1)=='0')	{	amount = Math.abs(amount) + 1;		amount = (amount / power)		amount = "" + amount	;		amount = amount.substr(0, amount.length - 1) + '0';	}	else	{	amount = amount / power;	}		return amount;}///////////////////////////////////////////////////////////////////////////////////////function trim(stringText){	if(stringText.length < 1)	{	return"";	}		stringText = rtrim(stringText);	stringText = ltrim(stringText);	if(stringText=="")	{	return "";	}	else	{	return stringText;	}}///////////////////////////////////////////////////////////////////////////////////////function rtrim(stringText){	var w_space = String.fromCharCode(32);	var w_tab = String.fromCharCode(9);	var w_lineFeed = String.fromCharCode(10);	var v_length = stringText.length;	var strTemp = "";	if(v_length < 0)	{	return"";	}	var iTemp = v_length -1;		while(iTemp > -1)	{	if(stringText.charAt(iTemp) == w_space || stringText.charAt(iTemp) == w_lineFeed || stringText.charAt(iTemp) == w_tab)		{		}		else		{	strTemp = stringText.substring(0,iTemp +1);			break;		}				iTemp = iTemp-1;	}	return strTemp;}///////////////////////////////////////////////////////////////////////////////////////function ltrim(stringText){	var w_space = String.fromCharCode(32);	var w_tab = String.fromCharCode(9);	var w_lineFeed = String.fromCharCode(10);	if(v_length < 1)	{	return"";	}		var v_length = stringText.length;	var strTemp = "";		var iTemp = 0;	while(iTemp < v_length)	{	if(stringText.charAt(iTemp) == w_space || stringText.charAt(iTemp) == w_lineFeed || stringText.charAt(iTemp) == w_tab)		{		}		else		{	strTemp = stringText.substring(iTemp,v_length);			break;		}		iTemp = iTemp + 1;	}	return strTemp;}///////////////////////////////////////////////////////////////////////////////////////function submit(){	f.submit();}//////////////////////////////////////////////////////////////////////////////////////function menuHighlight(obj, isOn){	switch (isOn)	{	case true:			d.getElementById('menu' + obj).style['color'] = '#000000';			d.getElementById('menu' + obj).style['background'] = '#DADCBA';			break;		case false:				d.getElementById('menu' + obj).style['color'] = '#FFFFFF';			d.getElementById('menu' + obj).style['background'] = '#006633';			break;	}}///////////////////////////////////////////////////////////////////////////////////////function showLoadingTable(){	// Remove the data from the table.	eTable = d.getElementById('displayTable');	eTBody = d.getElementById('displayTBody');	eTable.removeChild(eTBody);		eTBody = d.createElement('tbody');	eTBody.id = 'displayTBody';	eTBody.name = 'displayTBody';	eTable.appendChild(eTBody);		eRow = d.createElement('tr');	eRow.width ='600';	eTBody.appendChild(eRow);		eCell = d.createElement('td');	eCell.style['color'] = 'red'	eCell.appendChild(d.createTextNode('loading...'));	eRow.appendChild(eCell);}///////////////////////////////////////////////////////////////////////////////////////function help(){	window.open (d.getElementById('URLHelp').value,'name', 'scrollbars=yes,left=10,top=75,status=no,width=750,height=500');	//  return false so the browser will not change pages.	return false;}///////////////////////////////////////////////////////////////////////////////////////function home(){	location.href = d.getElementById('URLHome').value;	return;}
