//-------------------------------------------------------------------------------------------------------------------------------------------
function doSubmitDefaultForm()
{
	var df = xGetElementById("defaultForm");
	var reportNbr = xGetElementById("reportSelected").value;
	var reportFamily = xGetElementById("reportFamily").value;

	if (	(reportNbr == 1000) || (reportNbr == 2000) || (reportNbr == 3000) || (reportNbr == 4000) || 
		(reportNbr == 5000) || (reportNbr == 6000) || (reportNbr == 7000) || 
		(reportNbr == 8000) || (reportNbr == 9000) || (reportNbr == 10000) || (reportNbr == 11000)
	)
	{ return false; }
	else
	{
		df.action = ""+reportFamily+"/"+reportNbr+".asp";

		var isValidSubmission = doValidateSubmission(df, reportNbr);

		if (isValidSubmission)
		{
//			df.target = "_blank";
			df.submit();
		}
	}
}
//-------------------------------------------------------------------------------------------------------------------------------------------
function doGetWebHelpPage(nbr)
{
	var mainWindow = xGetElementById("iFrameMainBody");
	mainWindow.src = "webHelp/"+nbr+".htm";
}
//-------------------------------------------------------------------------------------------------------------------------------------------
function doValidateSubmission(f, n)
{
	var reportFamilyNbr = xGetElementById("reportFamilyNbr").value;
	var reportNbr = xGetElementById("reportSelected").value;
	var elems = f.elements;

	for (var i = 0; i < elems.length; i++)
	{
		if (elems[i].id == "districtNbr") { continue; }
		else if (elems[i].id == "yearOnlyDateField") { continue; }
		else if (elems[i].id == "alphabetField") { continue; }
		else if (elems[i].id == "remarksInd") { continue; }
		else if (elems[i].id == "projectYearNbr") { if (!doValidateProjectYearNbrInput(elems[i].id, 1)) { return false; } }
		else if (elems[i].id == "projectSeqNbr") { if (!doValidateProjectSeqNbrInput(elems[i].id, 1)) { return false; } else { continue; } }
		else if (elems[i].id == "userName") { tmpElem = xGetElementById("userName"); if (tmpElem.value == "") { alert("The User Name field is required\nand has been left blank.\n\nPlease correct and resubmit."); tmpElem.focus(); return false; } else { continue; } }
		else if (elems[i].id == "password") { tmpElem = xGetElementById("password"); if (tmpElem.value == "") { alert("The Password field is required\nand has been left blank.\n\nPlease correct and resubmit."); tmpElem.focus(); return false; } else { continue; } }
		else if (elems[i].id == "subNbr") { if (!doValidateSubNbrInput(1)) { return false; } else { continue; } }
		else if (elems[i].id == "subSubNbr") { if (!doValidateSubSubNbrInput(1)) { return false; } else { continue; } }
		else if (elems[i].id == "fullDateField") { tmpElem = xGetElementById("fullDateField"); if (tmpElem.value == "") { alert("The Date field is required\nand has been left blank.\n\nPlease correct and resubmit."); return false; } else { continue; } }
		else if (elems[i].id == "fullDateRangeField1") { if (!doValidateFullDateRangeInput()) { return false; } else { continue; } }
		else if (elems[i].id == "fullDateRangeField2") { if (!doValidateFullDateRangeInput()) { return false; } else { continue; } }
		else if (elems[i].id == "estimateNbrField") { if (!doValidateEstimateNbrInput(elems[i].id, 1)) { return false; } else { continue; } }
		else if (elems[i].id == "referenceNbrField") { if (!doValidateReferenceNbrInput(elems[i].id, 1)) { return false; } else { continue; } }
		else if (elems[i].id == "optionalReferenceNbrField") { if (!doValidateReferenceNbrInput(elems[i].id, 0)) { return false; } else { continue; } }
		else if (elems[i].id == "searchStringField") { tmpElem = xGetElementById("searchStringField"); if (tmpElem.value == "") { alert("The Text String field is required\nand has been left blank.\n\nPlease correct and resubmit."); tmpElem.focus(); return false; } else { continue; } }
		else if (elems[i].id == "optionalFullDateRangeField1") { if (!doValidateOptionalFullDateRangeInput()) { return false; } else { continue; } }
		else if (elems[i].id == "optionalFullDateRangeField2") { if (!doValidateOptionalFullDateRangeInput()) { return false; } else { continue; } }
		else if (elems[i].id == "prodSuppCd") { if (!doValidateProdSuppCdInput(elems[i].id, 1)) { return false; } else { continue; } }
		else if (elems[i].id == "estimateNbrRangeField1") { if (!doValidateEstimateNbrInput(elems[i].id, 1)) { return false; } else { continue; } }
		else if (elems[i].id == "estimateNbrRangeField2") { if (!doValidateEstimateNbrInput(elems[i].id, 1)) { return false; } else { continue; } }
		else if (elems[i].id == "referenceNbrRangeField1") { if (!doValidateReferenceNbrInput(elems[i].id, 1)) { return false; } else { continue; } }
		else if (elems[i].id == "referenceNbrRangeField2") { if (!doValidateReferenceNbrInput(elems[i].id, 1)) { return false; } else { continue; } }
		else if (elems[i].id == "optionalReferenceNbrRangeField1") { if (!doValidateReferenceNbrInput(elems[i].id, 0)) { return false; } else { continue; } }
		else if (elems[i].id == "optionalReferenceNbrRangeField2") { if (!doValidateReferenceNbrInput(elems[i].id, 0)) { return false; } else { continue; } }
		else if (elems[i].id == "coNbr") { if (!doValidateChangeOrderNbrInput(1)) { return false; } else { continue; } }
		else if (elems[i].id == "partCode") { if (!doValidatePartCodeInput(1)) { return false; } else { continue; } }
		else if (elems[i].id == "optionalMaterialCode") { if (!doValidateMaterialCodeInput()) { return false; } else { continue; } }
		else if ((elems[i].id == "grouping0001PurchaseOrderNbr") || (elems[i].id == "grouping0001ProdSuppCd") || (elems[i].id == "grouping0001ProjectNbr")) { if (!doValidateGrouping0001Inputs()) { return false; } else { continue; } }
		else if ((elems[i].id == "grouping0003RespLoc") || (elems[i].id == "grouping0003County") || (elems[i].id == "grouping0003State") || (elems[i].id == "grouping0003ProdSuppCd")) { if (!doValidateGrouping0003Inputs()) { return false; } else { continue; } }
		else if (elems[i].id == "avgBidPriceItemNbr") { tmpElem = xGetElementById("avgBidPriceItemNbr"); if (tmpElem.value == "") { alert("The Item Number field is required and has been left blank.\n\nPlease correct this and try again."); return false; } else { continue; } }
		else if (elems[i].id == "costDataItemNbr") { tmpElem = xGetElementById("costDataItemNbr"); if (tmpElem.value == "") { alert("The Item Number field is required and has been left blank.\n\nPlease correct this and try again."); return false; } else { continue; } }
		else if (elems[i].id == "costDataMinQtyNbr") { if (!doValidateMinQtyInput(1)) { return false; } else { continue; } }
		else if (elems[i].id == "optionalBeginYearField") { if (!doValidateOptionalMonthYearRangeInput()) { return false; } else { continue; } }
		else if (elems[i].id == "optionalBeginMonthField") { if (!doValidateOptionalMonthYearRangeInput()) { return false; } else { continue; } }
		else if (elems[i].id == "optionalEndYearField") { if (!doValidateOptionalMonthYearRangeInput()) { return false; } else { continue; } }
		else if (elems[i].id == "optionalEndMonthField") { if (!doValidateOptionalMonthYearRangeInput()) { return false; } else { continue; } }
		else if (elems[i].id == "te24Nbr") { if (!doValidateTE24NbrInput(1)) { return false; } else { continue; } }

		else { continue; }
	}

	if ((reportNbr != "6003") && (reportNbr != "7011") && (reportNbr != "8004"))
	{
		xGetElementById("printGraphic_"+reportFamilyNbr).src = "images/printGreenEnabled.gif";
	}

	return true;
}
//-------------------------------------------------------------------------------------------------------------------------------------------
function toggleNavDiv(btnElem)
{
	if (!enabled) { return; }

	var widthVal;
	var marginVal;
	var displayVal;
	var elem;
	var tmpArr;
	var idx;
	var imgSrc;

	if (navExpanded)
	{
		widthVal = "15px";
		marginVal = "20px";
		imgSrc = "images/button_ArrowsRight.gif";
		displayVal = "none";
	}
	else
	{
		widthVal = "230px";
		marginVal = "235px";
		imgSrc = "images/button_ArrowsLeft.gif";
		displayVal = "block";
	}

	elem = xGetElementById("cmsNavigatorDiv");
	elem.style.width = widthVal;

	elem = xGetElementById("mainBodyDiv");
	elem.style.marginLeft = marginVal;
	if ((elem) && (xDef(elem.style))) { xHeight(elem, (xHeight(document) - 45)); }
	if ((elem) && (xDef(elem.style))) { xWidth(elem, (xWidth(document) - (xWidth(xGetElementById("cmsNavigatorDiv")) + 5))); }

	elem = xGetElementById("cmsInternalSystemsContainerDiv");
	elem.style.display = displayVal;

	navExpanded = !navExpanded;
	btnElem.src = imgSrc;
}
//-------------------------------------------------------------------------------------------------------------------------------------------
function toggleInternalSystemNavContent(divElem, sectionNbr)
{
	var tmpObj = new Object();
	var toggleBtnElem = xGetElementById("toggleGraphic_"+sectionNbr);
	var srcName = "";

	if ((toggleBtnElem != null) && (toggleBtnElem != "undefined")) { srcName = jsRight(toggleBtnElem.src, 21); }

	for (idx = 1; idx < 12; idx++)
	{
		var tmpIdx = (idx * 1000);

		tmpObj = xGetElementById("toggleGraphic_"+tmpIdx);
		if ((tmpObj != null) && (tmpObj != "undefined")) { tmpObj.src = "images/button_ArrowsDown.gif"; }

		tmpObj = xGetElementById("content_"+tmpIdx);
		if ((tmpObj != null) && (tmpObj != "undefined")) { tmpObj.style.display = "none"; }

		tmpObj = xGetElementById("select_"+tmpIdx);
		if ((tmpObj != null) && (tmpObj != "undefined")) { tmpObj.selectedIndex = 0; }

		tmpObj = xGetElementById("paramDiv_"+tmpIdx);
		if ((tmpObj != null) && (tmpObj != "undefined")) { tmpObj.innerHTML = ""; }

		tmpObj = xGetElementById("printGraphic_"+tmpIdx);
		if ((tmpObj != null) && (tmpObj != "undefined")) { tmpObj.src = "images/printGreenDisabled.gif"; }

		tmpObj = xGetElementById("ifrmParams_"+tmpIdx);
		if ((tmpObj != null) && (tmpObj != "undefined")) { tmpObj.src = "prompts/"+tmpIdx+".asp"; }
	}

	if (srcName == "button_ArrowsDown.gif")
	{
		toggleBtnElem.src = "images/button_ArrowsUp.gif";
		
		tmpObj = xGetElementById("content_"+sectionNbr);
		if ((tmpObj != null) && (tmpObj != "undefined")) { tmpObj.style.display = "block"; }

		tmpObj = xGetElementById("ifrmParams_"+tmpIdx);
		if ((tmpObj != null) && (tmpObj != "undefined")) { tmpObj.src = "prompts/"+tmpIdx+".asp"; }
	}

	if (sectionNbr == 4000) { top.window.frames["iFrameMainBody"].location = "04000-ContractorEvals/c95LargeNotes.htm"; }
	else if (sectionNbr == 9000)
	{
		top.window.frames["iFrameMainBody"].location = "09000-VirtualWarehouse/createShipment.asp"; 
	}
	else if (sectionNbr == 10000)
	{
		top.window.frames["iFrameMainBody"].location = "10000-WebCMSFinance/default.asp"; 
	}
	else if (sectionNbr == 11000)
	{
		top.window.frames["iFrameMainBody"].location = "11000-WebCMSTestResults/default.asp"; 
	}
	else { top.window.frames["iFrameMainBody"].location = "main.asp"; }

	tmpObj = xGetElementById("reportSelected");
	tmpObj.value = sectionNbr;

	tmpObj = xGetElementById("reportFamilyNbr");
	tmpObj.value = sectionNbr;

	tmpObj = xGetElementById("reportFamily");
	tmpObj.value = doDetermineReportFamily(sectionNbr);
}
//-------------------------------------------------------------------------------------------------------------------------------------------
function doDetermineReportFamily(nbr)
{
	var dName = "";

	switch (nbr)
	{
		case 1000: { dName = "01000-HomeAndSupport"; break; }
		case 2000: { dName = "02000-BidAndItemData"; break; }
		case 3000: { dName = "03000-ChangeOrders"; break; }
		case 4000: { dName = "04000-ContractorEvals"; break; }
		case 5000: { dName = "05000-Estimates"; break; }
		case 6000: { dName = "06000-Finals"; break; }
		case 7000: { dName = "07000-MaterialsAndTesting"; break; }
		case 8000: { dName = "08000-ProjectInformation"; break; }
		case 9000: { dName = "09000-VirtualWarehouse"; break; }
		case 10000: { dName = "10000-WebCMSFinance"; break; }
		case 11000: { dName = "11000-WebCMSTestResults"; break; }
	}

	return dName;
}
//-------------------------------------------------------------------------------------------------------------------------------------------
function doPrintMainFrameContents()
{
//	var reportNbr = xGetElementById("reportSelected").value;
//	var printMsg = "The results of this search do not seem to\nbe worth printing.  Continue to print?";
//	if ((top.window.frames["iFrameMainBody"].window.resultsWorthPrinting != undefined) && (top.window.frames["iFrameMainBody"].window.reportNbr == reportNbr))
//	{
//		var resultsWorthPrinting = top.window.frames["iFrameMainBody"].window.resultsWorthPrinting;
//
//		if (resultsWorthPrinting > 0) { top.window.frames["iFrameMainBody"].focus(); top.window.frames["iFrameMainBody"].print(); }
//		else
//		{
//			if (confirm(printMsg)) { top.window.frames["iFrameMainBody"].focus(); top.window.frames["iFrameMainBody"].print(); }
//			else { return false; }
//		}
//	}
//	else { return false; }

	var reportNbr = xGetElementById("reportSelected").value;

	if (((parseInt(reportNbr) % 1000) > 0) && ((reportNbr != "6003") && (reportNbr != "7011") && (reportNbr != "8004")))
	{
/*
		if (reportNbr == "2002")
		{
			var listing = "S";
			var promptMsg = "Type the letter of the listing you would like to print -\n";
			promptMsg += "'I' for the Item List (top) and 'P' for the Project List (bottom).";

			while ((listing != null) && (listing.toUpperCase() != "I") && (listing.toUpperCase() != "P") && (listing.toUpperCase() != "")) { listing = prompt(promptMsg, ""); }
			if ((listing != null) && (listing != undefined) && (listing.toUpperCase() != ""))
			{
				if (listing.toUpperCase() == "I") { top.window.frames["iFrameMainBody"].window.frames["itemSearchResultsData"].focus(); top.window.frames["iFrameMainBody"].window.frames["itemSearchResultsData"].print(); }
			}
		}
		else { top.window.frames["iFrameMainBody"].focus(); top.window.frames["iFrameMainBody"].print(); }
*/
		top.window.frames["iFrameMainBody"].focus();
		top.window.frames["iFrameMainBody"].print();
	}
//	top.window.frames["iFrameMainBody"].focus(); top.window.frames["iFrameMainBody"].print();

}
//-------------------------------------------------------------------------------------------------------------------------------------------
function doHandleReportChange(selectElem, sectionNbr)
{
	if (selectElem.value == 7006)
	{
//		window.open("http://www.dot.state.oh.us/testlab/applists/qplweb/qpl.htm", "qplWindow"); 
		window.open("http://www.dot.state.oh.us/Divisions/ConstructionMgt/Materials/Pages/QPL.aspx", "qplWindow"); 
	}

	else{


	var paramDiv = top.window.frames["ifrmParams_"+sectionNbr].document.getElementById(selectElem.value);
	var elem = xGetElementById("paramDiv_"+sectionNbr);
	elem.innerHTML = paramDiv.innerHTML;

	elem = xGetElementById("reportSelected");
	elem.value = selectElem.value;

	var reportFamilyNbr = xGetElementById("reportFamilyNbr").value;
	tmpObj = xGetElementById("printGraphic_"+reportFamilyNbr);
	tmpObj.src = "images/printGreenDisabled.gif";




	}

}
//-------------------------------------------------------------------------------------------------------------------------------------------
function doHandleReportChangeForVirtualWarehouse()
{
	var paramDiv = top.window.frames["ifrmParams_9000"].document.getElementById("9000");
	var elem = xGetElementById("paramDiv_9000");
	elem.innerHTML = paramDiv.innerHTML;

	elem = xGetElementById("reportSelected");
	elem.value = "9000";

	var reportFamilyNbr = xGetElementById("reportFamilyNbr").value;
	tmpObj = xGetElementById("printGraphic_9000");
	tmpObj.src = "images/printGreenDisabled.gif";
}
//-------------------------------------------------------------------------------------------------------------------------------------------
function doResetDefaultForm()
{
	var df = xGetElementById("defaultForm");
	var reportNbr = xGetElementById("reportSelected").value;
	var reportFamilyNbr = xGetElementById("reportFamilyNbr").value;

	if (	(reportNbr == 1000) || (reportNbr == 2000) || (reportNbr == 3000) || (reportNbr == 4000) || 
		(reportNbr == 5000) || (reportNbr == 6000) || (reportNbr == 7000) || 
		(reportNbr == 8000) || (reportNbr == 9000) || (reportNbr == 10000) || (reportNbr == 11000)
	)
	{ return false; }

	var paramDiv = top.window.frames["ifrmParams_"+reportFamilyNbr].document.getElementById(reportNbr);
	var elem = xGetElementById("paramDiv_"+reportFamilyNbr);
	elem.innerHTML = paramDiv.innerHTML;
}
//-------------------------------------------------------------------------------------------------------------------------------------------
function advanceToProjSeqNbr(elem)
{
	if (elem.value.length == 2) { xGetElementById("projectSeqNbr").focus(); }
	else { return false; }
}
//-------------------------------------------------------------------------------------------------------------------------------------------
function advanceToProjSeqNbr2(elem)
{
	if (elem.value.length == 2) { xGetElementById("grouping0001ProjectSeqNbr").focus(); }
	else { return false; }
}
//-------------------------------------------------------------------------------------------------------------------------------------------
function advanceToPOSeqNbr(elem)
{
	if (elem.value.length == 2) { xGetElementById("grouping0001POSeqNbr").focus(); }
	else { return false; }
}
//-------------------------------------------------------------------------------------------------------------------------------------------
function keyTrap(e)
{
	if (window.event.keyCode == 13) { doSubmitDefaultForm(); }
}
//-------------------------------------------------------------------------------------------------------------------------------------------
function populateVwNavMenu()
{
	var vwNavMenuElem = top.xGetElementById("content_9000");
	var localVwNavMenuElem = xGetElementById("vwNavMenu");

	vwNavMenuElem.innerHTML = localVwNavMenuElem.innerHTML;
}
//-------------------------------------------------------------------------------------------------------------------------------------------
function populateWacNavMenu1()
{
	var wacNavMenuElem = top.xGetElementById("content_10000");
	var localWacNavMenuElem = xGetElementById("wacNavMenu");

	wacNavMenuElem.innerHTML = localWacNavMenuElem.innerHTML;
}
//-------------------------------------------------------------------------------------------------------------------------------------------
function populateWacNavMenu2()
{
	var wacNavMenuElem = top.xGetElementById("content_11000");
	var localWacNavMenuElem = xGetElementById("wacNavMenu");

	wacNavMenuElem.innerHTML = localWacNavMenuElem.innerHTML;
}
//-------------------------------------------------------------------------------------------------------------------------------------------
function doLogoutOfVW()
{
	var vwLogoutElem = xGetElementById("iFrameVWLogoutProcessor");
	vwLogoutElem.src = "09000-VirtualWarehouse/logout.asp";
}
//-------------------------------------------------------------------------------------------------------------------------------------------
function doLogoutOfWebCms(nbr)
{
	var wacLogoutElem = xGetElementById("iFrameVWLogoutProcessor");
	var nextLocation = "";

	if (nbr == 10000) { nextLocation = "10000-WebCMSFinance/logout.asp"; }
	else if (nbr == 11000) { nextLocation = "11000-WebCMSTestResults/logout.asp"; }

	wacLogoutElem.src = nextLocation;
}
//-------------------------------------------------------------------------------------------------------------------------------------------
function doSelectAdminFunctionType(idx)
{
	$('psHintResults').innerHTML = "";
	$('psHintResults').style.display = "none";

	var genObject = xGetElementsByClassName("vwAdminFunctionType");
	genObject[idx].checked = true;

	var elems = $("psCd", "psCdSfx", "psName", "psTe24Prefix");
	for (var x = 0; x < elems.length; x++)
	{
		elems[x].value = "";
	}

	if (idx == 0)
	{
		$("psCodeInput").disabled = false;
		xBackground($("psCodeInput"), "#FFFFFF");
		xColor($("psCodeInput"), "#000000");
		$("psCodeInput").value = "";
		$("psCodeInput").focus();
	}
	else
	{
		$("psCodeInput").disabled = true;
		xBackground($("psCodeInput"), "#666666");
		xColor($("psCodeInput"), "#FFFFFF");
		$("psCodeInput").value = "";
	}

	return false;

/*
	var elems = $("psCodeInput");
	for (var x = 0; x < elems.length; x++)
	{
		elems[x].value = "";

		if (
			((idx == 0) && (x == 0)) 		||
			((idx == 1) && (x == 1))
		)
		{
			elems[x].disabled = false;
			xBackground(elems[x], "#FFFFFF");
			xColor(elems[x], "#000000");

			if (idx == 0) { elems[0].focus(); }
			else if (idx == 1) { elems[1].focus(); }
		}
		else
		{
			elems[x].disabled = true;
			xBackground(elems[x], "#666666");
			xColor(elems[x], "#FFFFFF");
		}
	}
*/
}
//-------------------------------------------------------------------------------------------------------------------------------------------
function doShowAcctHint(idx)
{
	var acct = new Object();
	var acctType = "EXT";
	var addEdit = "";

	if (idx == 0) { acct = $("newAccountName"); addEdit = "ADD"; }
	else if (idx == 1) { acct = $("existingAccountName"); addEdit = "EDIT"; }

	if (acct.value.length > 0)
	{
		if (ensureInBag(acct.value, digits)) { acctType = "ODOT"; }

		var url = "vwAccountHints.asp";
		var pars = "sid="+Math.random();
		pars += "&addEdit="+addEdit;
		pars += "&acctType="+acctType;
		pars += "&acct="+acct.value;

		var myAjax = new Ajax.Request(url, { method: 'get', parameters: pars, onComplete: showAcctHint });
	}
	else
	{
		var accountResultsElem = $('accountResults');
		accountResultsElem.innerHTML = "";
		xDisplay(accountResultsElem, "none");

		return false;
	}
}
//-------------------------------------------------------------------------------------------------------------------------------------------
function showAcctHint(originalRequest)
{
	var origReqRespTextArr = originalRequest.responseText.split("<~BR~>");
	var accountResultsElem = $('accountResults');
	var matchingAccountsNbrElem = $('matchingAccountsNbr');
	var acctTypeElem = $('acctType');

	accountResultsElem.innerHTML = origReqRespTextArr[0];
	matchingAccountsNbrElem.value = origReqRespTextArr[1];
	acctTypeElem.value = origReqRespTextArr[2];

	xDisplay(accountResultsElem, "block");

	return false;
}
//-------------------------------------------------------------------------------------------------------------------------------------------
function doHandleVWSupportDocumentChange(elem)
{
	if (elem.selectedIndex > 0) { top.window.frames["iFrameMainBody"].location = elem.value; }
}
//-------------------------------------------------------------------------------------------------------------------------------------------
function doHandleWebCmsSupportDocumentChange(strLoc)
{
	top.window.frames["iFrameMainBody"].location = strLoc;
}
//-------------------------------------------------------------------------------------------------------------------------------------------
/*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
function doDisplayItemListSearchListing()
{
	doDisableAllPrintIcons();
	top.window.frames["iFrameMainBody"].location = "itemSearchResults.asp?itemUnitCd="+xGetElementById("itemUnitCd").value+"&itemListSpecYr="+xGetElementById("itemListSpecYr").value+"&itemListDescription="+xGetElementById("itemListDescription").value;
	xGetElementById("itemListPrintGraphic").src = "images/printGreenEnabled.gif";
}
//-------------------------------------------------------------------------------------------------------------------------------------------
function doDisplayCostDataSearchListing()
{
	var qty = xGetElementById("costDataMinQtyNbr").value;

	if (xGetElementById("costDataItemNbr").value == "") { alert("The Item Number field is required and has been left blank.\n\nPlease correct this and try again."); return false; }

	if (qty == "") { xGetElementById("costDataMinQtyNbr").value = "0"; }
	else if ((qty != "") && ((!ensureInBag(qty, floatNbrs)) || (!ensureOnlyOneDecimalPoint(qty)))) { alert("The Minimum Quantity field must contain numeric data only.\n\nPlease correct this and try again."); xGetElementById("costDataMinQtyNbr").value = "0"; return false; }

	doDisableAllPrintIcons();
	top.window.frames["iFrameMainBody"].location = "costDataResults.asp?costDataItemNbr="+xGetElementById("costDataItemNbr").value+"&costDataMinQtyNbr="+xGetElementById("costDataMinQtyNbr").value;
	xGetElementById("costDataPrintGraphic").src = "images/printGreenEnabled.gif";
}
//-------------------------------------------------------------------------------------------------------------------------------------------
function doDisplayApprovedPlantListing()
{
	doDisableAllPrintIcons();
	top.window.frames["iFrameMainBody"].location = "approvedPlantList.asp?ltr="+xGetElementById("approvedPlantNameLeadChar").value+"&plantType="+xGetElementById("approvedPlantType").value;
	xGetElementById("approvedPlantsPrintGraphic").src = "images/printGreenEnabled.gif";
}
//-------------------------------------------------------------------------------------------------------------------------------------------
function doDisplayQualifiedProductsListing()
{
	doDisableAllPrintIcons();
	top.window.frames["iFrameMainBody"].location = "qualifiedProductsList.asp?specRef="+xGetElementById("qplSpecRef").value;
	xGetElementById("qplSpecRefPrintGraphic").src = "images/printGreenEnabled.gif";
}
//-------------------------------------------------------------------------------------------------------------------------------------------
function doDisplayAverageBidPriceListing()
{
	if (xGetElementById("itemNbr").value == "") { alert("The Item Number field is required and has been left blank.\n\nPlease correct this and try again."); return false; }
	doDisableAllPrintIcons();
	top.window.frames["iFrameMainBody"].location = "averageBidPrice.asp?specYr="+xGetElementById("specYear").value+"&itemNbr="+xGetElementById("itemNbr").value+"&districtNbr2="+xGetElementById("avgBidPriceDistrictNbr").value;
	xGetElementById("averageBidPricePrintGraphic").src = "images/printGreenEnabled.gif";
}
//-------------------------------------------------------------------------------------------------------------------------------------------
function doDisplayQueryCentralQueryResults()
{
	doDisableAllPrintIcons();
	var elem = xGetElementById("queryCentralParametersDiv");
	var formElem = xGetElementById("defaultForm");
	var querySelectElem = xGetElementById("querySelectedSelect");
	var iFrameElem = xGetElementById("iFrameMainBody");

	if (querySelectElem.selectedIndex == 0) { iFrameElem.src = "about:blank"; if ((elem) && (xDef(elem.style))) { xHeight(elem, 5); xDisplay(elem, "none"); } alert("The query you selected is not a valid choice.\n\nPlease try again."); return false; }
	else if ((elem) && (xDef(elem.style))) { formElem.action = "template.asp"; formElem.submit(); }
	xGetElementById("queryCentralPrintGraphic").src = "images/printGreenEnabled.gif";
}
//-------------------------------------------------------------------------------------------------------------------------------------------
function doDisableAllPrintIcons()
{
	var elemsArr = xGetElementsByClassName("buttonImagePrint");
	if (elemsArr.length > 0) { for (idx = 0; idx < elemsArr.length; idx++) { elemsArr[idx].src="images/printGreenDisabled.gif"; } }
}
//-------------------------------------------------------------------------------------------------------------------------------------------
function doPrintMainFrameContents_origToDelete(internalSystemNbr)
{
	var printMsg = "The results of this search do not seem to\nbe worth printing.  Continue to print?";
	if ((top.window.frames["iFrameMainBody"].window.resultsWorthPrinting != undefined) && (top.window.frames["iFrameMainBody"].window.internalSystemNbr == internalSystemNbr))
	{
		var resultsWorthPrinting = top.window.frames["iFrameMainBody"].window.resultsWorthPrinting;

		if (resultsWorthPrinting > 0) { top.window.frames["iFrameMainBody"].focus(); top.window.frames["iFrameMainBody"].print(); }
		else
		{
			if (confirm(printMsg)) { top.window.frames["iFrameMainBody"].focus(); top.window.frames["iFrameMainBody"].print(); }
			else { return false; }
		}
	}
	else { return false; }
}
//-------------------------------------------------------------------------------------------------------------------------------------------
function doSelectAdminFunctionType(idx)
{
	$('psHintResults').innerHTML = "";
	$('psHintResults').style.display = "none";

	var genObject = xGetElementsByClassName("vwAdminFunctionType");
	genObject[idx].checked = true;

	var elems = $("psCd", "psCdSfx", "psName", "psTe24Prefix");
	for (var x = 0; x < elems.length; x++)
	{
		elems[x].value = "";
	}

	var elems = $("psCodeInput", "newAccountName", "existingAccountName");
	for (var x = 0; x < elems.length; x++)
	{
		elems[x].value = "";

		if (
			((idx == 0) && (x == 0)) 		||
			((idx == 1) && (x == 1)) 		|| 
			((idx == 2) && (x == 2))
		)
		{
			elems[x].disabled = false;
			xBackground(elems[x], "#FFFFFF");
			xColor(elems[x], "#000000");

			if (idx == 0) { elems[0].focus(); }
			else if (idx == 1) { elems[1].focus(); }
			else if (idx == 2) { elems[2].focus(); }
		}
		else
		{
			elems[x].disabled = true;
			xBackground(elems[x], "#666666");
			xColor(elems[x], "#FFFFFF");
		}
	}
}
//-------------------------------------------------------------------------------------------------------------------------------------------
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*/