<!-- Invisible to Non-JavaScript Browers

// Copyrighted 2005 By Boulevard Group, LLC.  All Rights Reserved

var DebugWindow;
var AppWindow;

function PMISWin(URL, DNAME)
{
	//PMISWin2(URL, DNAME, 0, 0);
	document.location.href = URL;
	
} // End of PMISWin

function PMISWin2(URL, DNAME, X, Y)
{
var winParms = new String("");

//var calcWidth = screen.width - (.15 * screen.width); // Depreciated
//var calcHeight = screen.height - (.15 * screen.height); // Depreciated
var calcWidth = screen.availWidth - (.01 * screen.availWidth);
var calcHeight = screen.availHeight - (.065 * screen.availHeight); 

	// Format WinParms
	
	winParms += "height=" + calcHeight.toString() + ",";
	winParms += "width=" + calcWidth.toString() + ",";
	winParms += "location=no,";
	winParms += "menubar=no,";
	winParms += "resizable=yes,";
	winParms += "scrollbars=yes,";
	winParms += "titlebar=no,";
	winParms += "dependent=yes,";
	winParms += "directories=no,";
	winParms += "status=yes,";
	winParms += "toolbar=no";
	
	// Pop Window
	
	var PMISWindow = window.open('', DNAME, winParms);
	
	// Test for Popup Blocker
	
	if (IsPopupBlocker(PMISWindow)) {
		alert("The PMISWin Function was unable to open a window.  Please check if you have your browser has the popup blocker turned on.  If so please turn it off to use the PMISWin Function.  If this is not the case, please call us at support.  Thank you.");
	}
	
	// Window Fixup
	
	if (PMISWindow.opener == null) {
		PMISWindow.opener = self;
	}
	
	PMISWindow.moveTo(X, Y);

	PMISWindow.location.href = URL;
	PMISWindow.focus();

} // End of PMISWin2

function IsPopupBlocker(oWin)
{
	if (oWin == null || typeof(oWin) == "undefined") {
		return true;
	} else {
		return false;
	}
	
} // End of IsPopupBlocker

function initWin(LinkTo) {
	
	// Full Screen
	
	window.moveTo(0, 0);
	window.resizeTo(window.screen.availWidth - (.10 * window.screen.availWidth), window.screen.availHeight - (.10 * window.screen.availHeight));
	
	if (LinkTo != "") {
		window.location.href = LinkTo
	}
	
	// Show SESSION Variables
	
	//ShowSV();
	
}  // End of initWin

function ShowSV(AppID)
{
	// Open DisplaySV.asp Window
	
	DebugWindow = window.open("PMISDisplaySV.asp", AppID, "directories=no,height=300,width=450,resizeable=yes,scrollbars=yes,status=no,toolbar=no,menubar=no"); 

	return false;
	
} // End of ShowSV

function popAppWin(appURL, appCaption)
{

	// Open Application Window
	
	AppWindow = window.open(appURL, appCaption, "directories=no,height=500,width=650,resizeable=yes,scrollbars=yes,status=yes,toolbar=yes,menubar=yes"); 

	//return false;
	
} // End of popAppWin

/* Save as Sample Select
function selectStatus() {

	var bIndx = document.ProjectSelect.StatusCode.selectedIndex; // Selected Index
	
	var holdstatuscode = document.ProjectSelect.StatusCode.options[bIndx].value; 
	var holdstatusdescription = document.ProjectSelect.StatusCode.options[bIndx].text; 
	
	document.ProjectSelect.holdstatuscode.value = holdstatuscode;
	document.ProjectSelect.holdstatusdescription.value = holdstatusdescription;

}  // End of selectStatus
End of Sample */

function getSelectedButton(buttonGroup) 
{
	for (var i = 0; i < buttonGroup.length; i++) {
		if (buttonGroup[i].checked) {
			return i;
		}
	}
	return -1;		

} // End of getSelectedButton

function getGroupValue(form, buttonGroup)  
{
var i;
var selectedOption;

	// Get Option
	
	i = getSelectedButton(buttonGroup);
	if (i < 0) {
		//alert("System Error: Please Call Support.  Thanks.");
		selectedOption = "";
	} else {
		selectedOption = form.buttonGroup[i].value;
	}
	
	// Outa Here
	
	return selectedOption;
	
} // End of getGroupValue

// Misc

function autoselect(a,b,c,d) {
	document.ProjectSelect[a].selectedIndex = b;
	document.ProjectSelect[c].selectedIndex = d;
}

function showalert(msg)
{
	alert(msg);
	
} // End of showalert

function FlipMR(ctl, form)
{
	if (ctl.checked) {
		document.forms[0].MR.value = "MR";
	} else {
		document.forms[0].MR.value = "NO";
	}

} // End of FlipMR

function ClearFilterFields()
{
	document.MyForm.MULTIFILTERSTRING.value = "";
	document.MyForm.MULTIFILTERXML.value = "";

} // End of ClearFilter

function DoDMDelete(docID)
{
	if (confirm("Delete Document?")) {
		location.href = "PMISWebDMDelete.asp?ID="+docID;
		return false;
	} else {
		return false;
	}
}

// Make Visible -->
