// ************************************************************************<BR>
// IPIN Script Library<BR>
// This is a set of custom scripts written for the IPIN<BR>
// construction reporting service by James Chevraux, III.<BR>
// <B>Do not modify in design view. Switch to source view.</B><BR>
// ************************************************************************<BR>
// <SCRIPT>
function CheckAAM(vFileStatus, vURL)
{
	if (vFileStatus == "False")
		window.alert("FILE NOT YET AVAILABLE: The document you have requested has not yet been scanned and made available online. Please try again later.")
	else
		window.location.href = vURL;
}
function PrvCheckAAM(vURL, poi, aamoi)
{
	window.location.href = 'PrvLogSpec.asp?file='+vURL+'&poi='+poi+'&desc='+aamoi+'&source=aam';
}
function CheckSpec(vFileStatus, vURL)
{
	if (vFileStatus == "Misc")
		window.alert("Specs with a code of MISC have been placed in the description by the reporters for searching purposes only. There will never be any specs to view for a MISC.")
	else
		{
		if (vFileStatus == "Scanning")
			window.alert("FILE NOT YET AVAILABLE: The document you have requested has not yet been scanned and made available online. Please try again later.")
		else
			window.location.href = vURL;
		}
}
function GetFileName(vPID, vURL)
{
	if (vFileSpec == "False")
		window.alert("FILE NOT YET AVAILABLE: The document you have requested has not yet been scanned and made available online. Please try again later.")
	else
		window.location.href = vURL;
}
function PageNav(vNavDest, vPID, vPName, vBidDate, vCID)
{
	document.frmNav.action = vNavDest
	document.frmNav.txtPID.value = vPID;
	document.frmNav.txtPName.value = vPName;
	document.frmNav.txtBidDate.value = vBidDate;
	document.frmNav.txtCID.value = vCID;
	document.frmNav.submit();
}
function NavCNA(vNavDest)
{
	document.frmCNA.action = vNavDest
	document.frmCNA.submit();
}
function NavPlans(vPID, vPName, vBidDate, vPS)
{
	if ((vPS == 0) || (vPS == 2) || (vPS == 4))
		{
		if (vPS == 0)
			window.alert("PLANS NOT YET AVAILABLE: Plans for this project have not yet been received by the planroom. Please check back later.");
		if (vPS == 2)
			window.alert("PLANS NOT AVAILABLE: Plans for this project have not been made available to planrooms. Please contact the plan issuing authority to review plans.");
		if (vPS == 4)
			{
			window.alert("PLANS NO LONGER ONLINE: Plans for this project are no longer available online. You will be able to view the list of plans, but not the plans themselves. You may also be able to order drawings if your planroom supports this. If your planroom archives project information, you may be able to order the plans on hard copy or CD-ROM.")
			document.frmPlans.txtPID.value = vPID;
			document.frmPlans.txtPName.value = vPName;
			document.frmPlans.txtBidDate.value = vBidDate;
			document.frmPlans.intStatus.value = vPS;
			document.frmPlans.submit();
			}
		}
	else
		{
		document.frmPlans.txtPID.value = vPID;
		document.frmPlans.txtPName.value = vPName;
		document.frmPlans.txtBidDate.value = vBidDate;
		document.frmPlans.intStatus.value = vPS;
		document.frmPlans.submit();
		}
}
function NavSpecs(vPID, vPName, vBidDate, vSS)
{
	if ((vSS == 0) || (vSS == 2) || (vSS == 4))
		{
		if (vSS == 0)
			window.alert("SPECIFICATIONS NOT YET AVAILABLE: Specs for this project have not yet been received. Please check back later.")
		if (vSS == 2)
			window.alert("SPECIFICATIONS NOT AVAILABLE: Specs for this project have not been made available to planrooms. Please contact the plan issuing authority to review specs.")
		if (vSS == 4)
			{
			window.alert("SPECIFICATIONS NO LONGER ONLINE: Specs for this project are no longer available online. You will be able to view the list of specs, but not the specs themselves. If your planroom archives project information, you may be able to order the specs on hard copy or CD-ROM.")
			document.frmSpecs.txtPID.value = vPID;
			document.frmSpecs.txtPName.value = vPName;
			document.frmSpecs.txtBidDate.value = vBidDate;
			document.frmSpecs.intStatus.value = vSS;
			document.frmSpecs.submit();
			}
		}
	else
		{
		document.frmSpecs.txtPID.value = vPID;
		document.frmSpecs.txtPName.value = vPName;
		document.frmSpecs.txtBidDate.value = vBidDate;
		document.frmSpecs.intStatus.value = vSS;
		document.frmSpecs.submit();
		}
}
