$ = function (strID) {
	return document.getElementById(strID);
}

/* Enable & Disable Scripts */	
function QTL_TBEnable(objText, boolClear) {
	if (boolClear == true) {
		objText.value = "";
	}
	objText.disabled = false;
}

function QTL_TBDisable(objText, boolClear) {
	if (boolClear == true) {
		objText.value = "";
	}
	objText.disabled = true;
}

function QTL_ButtonEnable(objButton) {
	objButton.disabled = false;
}

function QTL_ButtonDisable(objButton) {
  objButton.className = objButton.IdleCSS;
	objButton.disabled = true;
}

function SetYesNoRads(objRadYes, objRadNo, intValue) {
	if (intValue == 1) {
		objRadNo.checked = false;
		objRadYes.checked = true;
	}
	else {
		objRadYes.checked = false;
		objRadNo.checked = true;
	}
}

/*METHOD************************** --- © QTLogic 2006 - All Right Reserved --- *************************METHOD*/
/* Class       : None                                                                                         */
/* Method      : CalcYesNoRads                                                                                */
/* Created By  : RadiateLogic                                                                                 */
/* Copyright   : © QTLogic 2006 - All Right Reserved                                                          */
/*                                                                                                            */
/* Description : Returns which Radio Button is selected.  Yes or No.                                          */
/*                                                                                                            */
/* Arguments   : objRadYes     - The Yes Radio Button To Test.                                                */
/*               flgForceNo    - Determines whether or not No (0) should be returned if not yes.              */
/*               objRadNo      - The No Radio Button To Test.                                                 */
/*                                                                                                            */
/* History                                                                                                    */
/* -------                                                                                                    */
/* 10/13/2006  - Method Created.                                                                              */
/*METHOD************************** --- © QTLogic 2006 - All Right Reserved --- *************************METHOD*/

function CalcYesNoRads(objRadYes, flgForceNo, objRadNo) {
	if (!flgForceNo) {
		if (objRadYes.checked == true) {
			return 1;
		}
		else {
			return 0;
		}
	}
	
	if (!objRadNo) {
		if (objRadYes.checked == true) {
			return 1;
		}
		else {
			if (flgForceNo == true) {
				return 0;
			}
			else {
				return -2;
			}
		}		
	}
	else {
		if (objRadYes.checked == true) {
			return 1;
		}
		else if (objRadNo.checked == true) {
			return 0;
		}
		else {
			if (flgForceNo == true) {
				return 0;
			}
			else {
				return -2;
			}			
		}
	}
}


/*METHOD************************** --- © QTLogic 2006 - All Right Reserved --- *************************METHOD*/
/* Class       : None                                                                                         */
/* Method      : PositionDDL                                                                                  */
/* Created By  : RadiateLogic                                                                                 */
/* Copyright   : © QTLogic 2006 - All Right Reserved                                                          */
/*                                                                                                            */
/* Description : Positions The Drop Down List at the First Occurance of the Specified Value.                  */
/*                                                                                                            */
/* Arguments   : objDDL   - The Drop Down List to Position.                                                   */
/*               intValue - The Value to find in the Drop Down List.                                          */
/*                                                                                                            */
/* History                                                                                                    */
/* -------                                                                                                    */
/* 12/23/2005  - Method Created.                                                                              */
/*METHOD************************** --- © QTLogic 2006 - All Right Reserved --- *************************METHOD*/

function PositionDDL(objDDL, intValue) {
	var intDDLCounter = objDDL.options.length;
	for (var intTCount = 0; intTCount < intDDLCounter; intTCount++) {
		if (objDDL.options[intTCount].value == intValue) {
			objDDL.selectedIndex = intTCount;
			return true;
		}
	}
}

/*METHOD************************** --- © QTLogic 2006 - All Right Reserved --- *************************METHOD*/
/* Method      : PositionDDLByText                                                                            */
/* Created By  : RadiateLogic                                                                                 */
/* Copyright   : © QTLogic 2006 - All Right Reserved                                                          */
/*                                                                                                            */
/* Description : Positions The Drop Down List at the First Occurance of the Specified Text.                   */
/*                                                                                                            */
/* Arguments   : objDDL  - The Drop Down List to Position.                                                    */
/*               strText - The Text to find in the Drop Down List.                                            */
/*                                                                                                            */
/* History                                                                                                    */
/* -------                                                                                                    */
/* 12/23/2005  - Method Created.                                                                              */
/*METHOD************************** --- © QTLogic 2006 - All Right Reserved --- *************************METHOD*/

function PositionDDLByText(objDDL, strText) {
	var intDDLCounter = objDDL.options.length;
	for (var intTCount = 0; intTCount < intDDLCounter; intTCount++) {
		if (objDDL.options[intTCount].text == strText) {
			objDDL.selectedIndex = intTCount;
			return true;
		}
	}
}

function QTL_CInt(strValue) {
	try {
		strValue = strValue.TrimString();
		strValue = strValue.TrimLeadingZeros();
	}
	catch (ex) {
	}
	if (strValue == '') {
		return 0;
	}
	else if (isNaN(parseInt(strValue)) == true) {
		return 0;
	}
	else {
		return parseInt(strValue);
	}
}

function QTL_CFloat(strValue) {
	try {
		strValue = strValue.TrimString();
	}
	catch (ex) {
	}
	if (strValue == '') {
		return 0;
	}
	else if (isNaN(parseFloat(strValue)) == true) {
		return 0;
	}
	else {
		return parseFloat(strValue);
	}
}

function GetDDLValue(objDDL) {
	return objDDL.options[objDDL.selectedIndex].value;
}

function GetDDLText(objDDL) {
	return objDDL.options[objDDL.selectedIndex].text;
}

function GetDDLTextByValue(objDDL, intValue) {
	var intDDLCounter = objDDL.options.length;
	for (var intTCount = 0; intTCount < intDDLCounter; intTCount++) {
		if (objDDL.options[intTCount].value == intValue) {
			return objDDL.options[intTCount].text;
		}
	}
	return '';
}

/*METHOD************************** --- © QTLogic 2006 - All Right Reserved --- *************************METHOD*/
/* Method      : BinTheBox                                                                                    */
/* Created By  : RadiateLogic                                                                                 */
/* Copyright   : © QTLogic 2006 - All Right Reserved                                                          */
/*                                                                                                            */
/* Description : Reads a Checkbox's State and Returns a 1 for Checked or a 0 for Not Checked.                 */
/*                                                                                                            */
/* Arguments   : objCheck   - The Checkbox to Read.                                                           */
/*                                                                                                            */
/*                                                                                                            */
/* History                                                                                                    */
/* -------                                                                                                    */
/* 12/23/2005  - Method Created.                                                                              */
/*METHOD************************** --- © QTLogic 2006 - All Right Reserved --- *************************METHOD*/

function BinTheBox(objCheck) {
	if (objCheck.checked == true) {
		return 1;
	}
	else {
		return 0;
	}
}

/*METHOD************************** --- © QTLogic 2006 - All Right Reserved --- *************************METHOD*/
/* Method      : BoxTheBin                                                                                    */
/* Created By  : RadiateLogic                                                                                 */
/* Copyright   : © QTLogic 2006 - All Right Reserved                                                          */
/*                                                                                                            */
/* Description : Checks/Unchecks A Check Box Based on a 0 or 1 input.                                         */
/*                                                                                                            */
/* Arguments   : objCheck   - The Checkbox to Modify.                                                         */
/*               intChecked - The 0 or 1 Value to Apply to the Checkbox.                                      */
/*                                                                                                            */
/* History                                                                                                    */
/* -------                                                                                                    */
/* 12/23/2005  - Method Created.                                                                              */
/*METHOD************************** --- © QTLogic 2006 - All Right Reserved --- *************************METHOD*/

function BoxTheBin(objCheck, intChecked) {
	if (intChecked == 1) {
		objCheck.checked = true
	}
	else {
		objCheck.checked = false
	}
}

/*  HTML Table Support Functions */

function QTL_DeleteTableRows(objTable, intStartRow) {
	if (objTable) {
		if (!intStartRow) {
			intStartRow = 0;
		}
		for (var intCounter = (objTable.rows.length - 1); intCounter >= intStartRow; intCounter--) {
			objTable.deleteRow(intCounter);
		}
	}
}

function QTL_DeleteTableRowByID(objTable, strRowID) {
	if (objTable) {
		for (var intCounter = (objTable.rows.length - 1); intCounter >= 0; intCounter--) {
			if (objTable.rows(intCounter).id == strRowID) {
				objTable.deleteRow(intCounter);
			}
		}
	}
}

function QTL_DeleteRowCells(objRow) {
	if (objRow) {
		for (var intCounter = (objRow.cells.length - 1); intCounter >= 0; intCounter--) {
			objRow.deleteCell(intCounter);
		}
	}
}

function QTL_GetCTL(strControlID) {
	return document.getElementById(strControlID);
}

/*CLASS************************** --- © QTLogic 2006 - All Right Reserved --- ***************************CLASS*/
/* Class       : QTL String Extender                                                                          */
/* Created By  : RadiateLogic                                                                                 */
/* Copyright   : © QTLogic 2006 - All Right Reserved                                                          */
/*                                                                                                            */
/* Description : Extension to the String Class                                                                */
/*                                                                                                            */
/* History                                                                                                    */
/* -------                                                                                                    */
/* 12/23/2005  - Class Created.                                                                               */
/*CLASS************************** --- © QTLogic 2006 - All Right Reserved --- ***************************CLASS*/

/*METHOD************************** --- © QTLogic 2006 - All Right Reserved --- *************************METHOD*/
/* Class       : QTL String Extender                                                                          */
/* Method      : TrimString                                                                                   */
/* Created By  : RadiateLogic                                                                                 */
/* Copyright   : © QTLogic 2006 - All Right Reserved                                                          */
/*                                                                                                            */
/* Description : Used to trim spaces from the beginning and the end of the String.                            */
/*                                                                                                            */
/* Arguments   : strString - The String to Trim.  If no String specified the one tied to the class is used.   */
/*                                                                                                            */
/* History                                                                                                    */
/* -------                                                                                                    */
/* 12/23/2005  - Method Created.                                                                              */
/*METHOD************************** --- © QTLogic 2006 - All Right Reserved --- *************************METHOD*/
String.prototype.TrimString = function (strString) {
   if (!strString) {
      strString = this;
   }
   if (strString == '') {
		return strString;
   }
   while (strString.charAt(0) == ' ') {
      strString = strString.substring(1);
   }
   while (strString.charAt(strString.length - 1) == ' ') {
      strString = strString.substring(0, strString.length - 1);
   }
   return strString;
}

String.prototype.TrimLeadingZeros = function (strString) {
   if (strString == undefined) {
      strString = this;
   }
   if (strString == '') {
		return strString;
   }
   while (strString.charAt(0) == '0') {
      strString = strString.substring(1);
   }
   return strString;
}

String.prototype.StripNumbers = function (strString) {
	 var strNewString = "";
   if (strString == undefined) {
      strString = this;
   }
   if (strString == '') {
		return strString;
   }
	 var strNumbersMask = "0123456789";
	 for (var intCounter = 0; intCounter < strString.length; intCounter++) {
		if (strNumbersMask.indexOf(strString.substr(intCounter,1)) == -1) {
			strNewString += strString.substr(intCounter,1);
		}
	 }
   return strNewString;
}

String.prototype.KeepNumbers = function (strString) {
	 var strNewString = "";
   if (strString == undefined) {
      strString = this;
   }
   if (strString == '') {
		return strString;
   }
	 var strNumbersMask = "0123456789";
	 for (var intCounter = 0; intCounter < strString.length; intCounter++) {
		if (strNumbersMask.indexOf(strString.substr(intCounter,1)) != -1) {
			strNewString += strString.substr(intCounter,1);
		}
	 }
   return strNewString;
}

String.prototype.KeepNumbersAndDecimal = function (strString) {
	 var strNewString = "";
   if (strString == undefined) {
      strString = this;
   }
   if (strString == '') {
		return strString;
   }
	 var strNumbersMask = "0123456789.";
	 for (var intCounter = 0; intCounter < strString.length; intCounter++) {
		if (strNumbersMask.indexOf(strString.substr(intCounter,1)) != -1) {
			strNewString += strString.substr(intCounter,1);
		}
	 }
   return strNewString;
}

String.prototype.ApplyMask = function (strMask, boolKeepMask, strString) {
	var strNewString = "";
	if (strString == undefined) {
		strString = this;
	}
	if (strString == '') {
		return strString;
	}

	for (var intCounter = 0; intCounter < strString.length; intCounter++) {
		if (boolKeepMask == true) {
			if (strMask.indexOf(strString.substr(intCounter,1)) != -1) {
				strNewString += strString.substr(intCounter,1);
			}
		}
		else {
			if (strMask.indexOf(strString.substr(intCounter,1)) == -1) {
				strNewString += strString.substr(intCounter,1);
			}		
		}
	}
	return strNewString;
}

String.prototype.QTLAJAXUnescape = function (strString) {
	 var strNewString = "";
   if (strString == undefined) {
      strString = this;
   }
   if (strString == '') {
		return strString;
   }
	
	 strNewString = new String(strString).ReplaceAll("&gt;", ">");
	 strNewString = new String(strNewString).ReplaceAll("&lt;", "<");
	 strNewString = new String(strNewString).ReplaceAll("QTL_GT", ">");
	 strNewString = new String(strNewString).ReplaceAll("QTL_LT", "<");	 
	 strNewString = new String(strNewString).ReplaceAll("&amp;", "&");
   return strNewString;
}


/*METHOD************************** --- © QTLogic 2006 - All Right Reserved --- *************************METHOD*/
/* Class       : QTL String Extender                                                                          */
/* Method      : CapWord                                                                                      */
/* Created By  : RadiateLogic                                                                                 */
/* Copyright   : © QTLogic 2006 - All Right Reserved                                                          */
/*                                                                                                            */
/* Description : Used to Capitolize the first character of the String.                                        */
/*                                                                                                            */
/* Arguments   : strWord - The String to Cap.  If no String specified the one tied to the class is used.      */
/*                                                                                                            */
/* History                                                                                                    */
/* -------                                                                                                    */
/* 12/23/2005  - Method Created.                                                                              */
/*METHOD************************** --- © QTLogic 2006 - All Right Reserved --- *************************METHOD*/
String.prototype.CapWord = function (strWord) {
   if (!strWord) {
      strWord = this;
   }
	var strLetter = strWord.substring(0,1);
	strLetter = strLetter.toUpperCase();
	return (strLetter + strWord.toLowerCase().substring(1, strWord.length));
}

String.prototype.SizeString = function (intSize, boolAddDots, strString) {
	if (!strString) {
		strString = this;
	}
	if (strString.length > intSize) {
		if (boolAddDots == true) {
			return (strString.substring(0, (intSize - 4)) + "...");		
		}
		else {
			return strString.substring(0, (intSize - 1));
		}
	}
	else {
		return strString;
	}
}

QTL_SizeString = function (intSize, boolAddDots, strString, strDefault) {
	if ((!strString) || (strString == "")) {
		if (!strDefault) {
			strString = "";
		}
		else {
			strString = strDefault;
		}
	}
	
	if (strString.length > intSize) {
		if (boolAddDots == true) {
			return (strString.substring(0, (intSize - 4)) + "...");		
		}
		else {
			return strString.substring(0, (intSize - 1));
		}
	}
	else {
		return strString;
	}
}

/*METHOD************************** --- © QTLogic 2006 - All Right Reserved --- *************************METHOD*/
/* Class       : QTL String Extender                                                                          */
/* Method      : CapPhrase                                                                                    */
/* Created By  : RadiateLogic                                                                                 */
/* Copyright   : © QTLogic 2006 - All Right Reserved                                                          */
/*                                                                                                            */
/* Description : Used to Capitolize the first character of each word in the String.                           */
/*                                                                                                            */
/* Arguments   : strPhrase - The String to Cap.  If no String specified the one tied to the class is used.    */
/*                                                                                                            */
/* History                                                                                                    */
/* -------                                                                                                    */
/* 12/23/2005  - Method Created.                                                                              */
/*METHOD************************** --- © QTLogic 2006 - All Right Reserved --- *************************METHOD*/
String.prototype.CapPhrase = function (strPhrase) {
   if (!strPhrase) {
      strPhrase = this;
   }
	var arrWords = strPhrase.split(" ");
	strPhrase = "";
	
	for (var intCounter = 0; intCounter < arrWords.length; intCounter++) {
		strPhrase += arrWords[intCounter].CapWord() + ' ';
	}
	return strPhrase;
}

/*METHOD************************** --- © QTLogic 2006 - All Right Reserved --- *************************METHOD*/
/* Class       : QTL String Extender                                                                          */
/* Method      : ReplaceAll                                                                                   */
/* Created By  : RadiateLogic                                                                                 */
/* Copyright   : © QTLogic 2006 - All Right Reserved                                                          */
/*                                                                                                            */
/* Description : Used to Replace all the occurances of a character or sub-string in the String.               */
/*                                                                                                            */
/* Arguments   : strFind    - The String or character to Find.                                                */
/*               strReplace - The String or character to Replace the strFind value with.                      */
/*               strPhrase  - The String to manipulate.  If no String specified the one tied to the class     */
/*                           is used.                                                                         */
/*                                                                                                            */
/* History                                                                                                    */
/* -------                                                                                                    */
/* 12/23/2005  - Method Created.                                                                              */
/*METHOD************************** --- © QTLogic 2006 - All Right Reserved --- *************************METHOD*/
String.prototype.ReplaceAll = function (strFind, strReplace, strPhrase) {
  if (!strPhrase) {
    strPhrase = this;
  }
  
  eval('var strRep = /' + strFind + '/g');
  return strPhrase.replace(strRep, strReplace); 
}

function QTL_CDate(strDate) {
	if (!strDate) {
		return new Date();
	}
	var dtNew = new Date();
	dtNew.setFullYear(strDate.substr(0,4), (QTL_CInt(strDate.substr(5,2)) - 1), strDate.substr(8,2));	
	return dtNew;
}

function QTL_Date8Digit(dtNow) {
	if (!dtNow) {
		dtNow = new Date();
	}
	var strMonth = parseInt(dtNow.getMonth() + 1).toString();
	var strDay = parseInt(dtNow.getDate()).toString();
	
	if (strMonth.length == 1) {
		strMonth = "0" + strMonth;
	}
	
	if (strDay.length == 1) {
		strDay = "0" + strDay;
	}
	
	return strMonth + strDay + parseInt(dtNow.getFullYear()).toString();
}

function QTL_Date8DigitWithFormat(dtNow) {
	if (!dtNow) {
		dtNow = new Date();
	}
	var strMonth = parseInt(dtNow.getMonth() + 1).toString();
	var strDay = parseInt(dtNow.getDate()).toString();
	
	if (strMonth.length == 1) {
		strMonth = "0" + strMonth;
	}
	
	if (strDay.length == 1) {
		strDay = "0" + strDay;
	}
	
	return strMonth + "/" + strDay + "/" + parseInt(dtNow.getFullYear()).toString();
}

function QTL_Date6Digit(dtNow) {
	if (!dtNow) {
		dtNow = new Date();
	}
	var strMonth = parseInt(dtNow.getMonth() + 1).toString();
	var strDay = parseInt(dtNow.getDate()).toString();
	
	if (strMonth.length == 1) {
		strMonth = "0" + strMonth;
	}
	
	if (strDay.length == 1) {
		strDay = "0" + strDay;
	}
	
	return strMonth + strDay + parseInt(dtNow.getFullYear()).toString().substr(2,2);
}

function QTL_Date6DigitWithFormat(dtNow) {
	if (!dtNow) {
		dtNow = new Date();
	}
	var strMonth = parseInt(dtNow.getMonth() + 1).toString();
	var strDay = parseInt(dtNow.getDate()).toString();
	
	if (strMonth.length == 1) {
		strMonth = "0" + strMonth;
	}
	
	if (strDay.length == 1) {
		strDay = "0" + strDay;
	}
	
	return strMonth + "/" + strDay + "/" + parseInt(dtNow.getFullYear()).toString().substr(2,2);
}

function QTL_GetDateTime(objDate) { 
	if (!objDate) {
		objDate = new Date();
	}
	var intHour = objDate.getHours();
	var intMinutes = objDate.getMinutes();
	var intMonth = objDate.getMonth() + 1;
	var intDay = objDate.getDate();
	var intYear = objDate.getFullYear();
	var strAMPM = "AM";
	
	if (intHour > 12) {
		intHour = (intHour - 12);
		strAMPM = "PM"
	}
	else if (intHour == 12) {
		strAMPM = "PM"
	}
	else if (intHour == 0) {
		intHour = 12;
		strAMPM = "AM";
	}
	
	if (intMinutes < 10) {
		intMinutes = "0" + intMinutes;
	}

	return "" + intMonth + "/" + intDay + "/" + intYear + " " + intHour + ":" + intMinutes + strAMPM;
}

function QTL_GetDateTimeWithSeconds(objDate) {
	if (!objDate) {
		objDate = new Date();
	}
	var intHour = objDate.getHours();
	var intMinutes = objDate.getMinutes();
	var intSeconds = objDate.getSeconds();
	var intMonth = objDate.getMonth() + 1;
	var intDay = objDate.getDate();
	var intYear = objDate.getFullYear();
	var strAMPM = "AM";
	
	if (intHour > 12) {
		intHour = (intHour - 12);
		strAMPM = "PM"
	}
	else if (intHour == 12) {
		strAMPM = "PM"
	}
	else if (intHour == 0) {
		intHour = 12;
		strAMPM = "AM";
	}
	
	if (intMinutes < 10) {
		intMinutes = "0" + intMinutes;
	}
	
	if (intSeconds < 10) {
		intSeconds = "0" + intSeconds;
	}

	return "" + intMonth + "/" + intDay + "/" + intYear + " " + intHour + ":" + intMinutes + ":" + intSeconds + strAMPM;
}

function QTL_ProcessDBString(strField, strDefaultValue) {
	if (strField) {
		strField = new String(strField);
		strField = strField.TrimString();
		if (strField == '') {
			if (strDefaultValue) {
				return strDefaultValue;
			}
			else {
				return '';
			}
		}
		return strField;
	}
	else {
			if (strDefaultValue) {
				return strDefaultValue;
			}
			else {
				return '';
			}
	}
}

function QTL_FillSelect(objDDL, objARR, strTextField, strIDField, boolPersistCurrent) {
	if (boolPersistCurrent) {
		for (var intCounter = 0; intCounter < objARR.length; intCounter++) {
			objDDL.options[objDDL.options.length] = new Option(eval("objARR[intCounter]." + strTextField), eval("objARR[intCounter]." + strIDField));
		}
	}
	else {
		objDDL.options.length = 0;
		for (var intCounter = 0; intCounter < objARR.length; intCounter++) {
			objDDL.options[intCounter] = new Option(eval("objARR[intCounter]." + strTextField), eval("objARR[intCounter]." + strIDField));
		}
	}
}

function QTL_CreateElement(strElementName, strClassName, strID, intWidth) {
	var objElement = window.document.createElement(strElementName);
	objElement.className = strClassName;
	if (strID) {
		objElement.id = strID;
	}
	if (intWidth) {
		objElement.style.width = intWidth;
	}
	return objElement;
}

function QTL_CreateInputElement(strType, strClassName, strID, intWidth) {
	var objElement = window.document.createElement('input');
	objElement.type = strType;
	objElement.className = strClassName;
	if (strID) {
		objElement.id = strID;
	}
	if (intWidth) {
		objElement.style.width = intWidth;
	}
	return objElement;
}

function QTL_FormatDecimal(anynum, intDecPlaces, strPrefix) {
	anynum = "" + eval(anynum);
	if (anynum == "") {
		anynum = 0.00;
	}
	intnum = parseInt(anynum);
	intnum = Math.abs(intnum);
	intstr = ""+intnum;

	if (intnum >= 1000) {
				intlen = intstr.length;
				temp1=parseInt(""+(intnum/1000));
				temp2=intstr.substring(intlen-3,intlen);
				intstr = temp1+","+temp2;

	}
	if (intnum >= 1000000) {
				intlen = intstr.length;
				temp1=parseInt(""+(intnum/1000000));
				temp2=intstr.substring(intlen-7,intlen);
				intstr = temp1+","+temp2;

	}
	if (intnum >= 1000000000) {
				intlen = intstr.length;
				temp1=parseInt(""+(intnum/1000000000));
				temp2=intstr.substring(intlen-11,intlen);
				intstr = temp1+","+temp2;

	}
	if (intnum >= 1000000000000) {
				intlen = intstr.length;
				temp1=parseInt(""+(intnum/1000000000000));
				temp2=intstr.substring(intlen-15,intlen);
				intstr = temp1+","+temp2;
	}
	
	if (intDecPlaces == 0) {
		if (strPrefix) {
			intstr = strPrefix+intstr;
		}
		return intstr;
	}

	decnum = Math.abs(parseFloat(anynum)-parseInt(anynum));
	decnum = decnum * Math.pow(10,intDecPlaces);
	decstr = "" + Math.abs(Math.round(decnum));
	if (decstr.length>intDecPlaces) {decstr=decstr.substring(0,intDecPlaces)}
	while (decstr.length < intDecPlaces) {decstr="0"+decstr}
	retval = intstr + "." + decstr;
	
	
	/*decnum = Math.abs(parseFloat(anynum)-parseInt(anynum));
	decnum = decnum * 1000;
	decstr = "" + Math.abs(Math.round(decnum));
	if (decstr.length>intDecPlaces) {decstr=decstr.substring(0,intDecPlaces)}
	while (decstr.length < intDecPlaces) {decstr="0"+decstr}
	retval = intstr + "." + decstr;*/
	
	if (anynum < 0) {
				retval="("+retval+")";
	}
	if (strPrefix) {
		retval = strPrefix+retval;
	}
	return retval
}	

function QTL_CreateElement(strElementName, strClassName, strID, intWidth) {
	var objElement = window.document.createElement(strElementName);
	objElement.className = strClassName;
	if (strID) {
		objElement.id = strID;
	}
	if (intWidth) {
		objElement.style.width = intWidth;
	}
	return objElement;
}

function QTL_CreateInputElement(strType, strClassName, strID, intWidth) {
	var objElement = window.document.createElement('input');
	objElement.type = strType;
	objElement.className = strClassName;
	if (strID) {
		objElement.id = strID;
	}
	if (intWidth) {
		objElement.style.width = intWidth;
	}
	return objElement;
}
				
function QTL_HideDiv(objDiv) {
	objDiv.style.visibility = "hidden";
	objDiv.style.display = "none";
}

function QTL_ShowDiv(objDiv) {
	objDiv.style.visibility = "visible";
	objDiv.style.display = "block";
}

function QTL_ToggleDivs(objDivHide, objDivShow) {
	QTL_HideDiv(objDivHide);
	QTL_ShowDiv(objDivShow);
}