<!--
///////////////////////////////////////////////////////
// Used to anncounce that a feature is not available
///////////////////////////////////////////////////////
function NotAvailable() {
	alert('This feature is not yet available.\nTry Again later.');
}


//////////////////////////////////////////
// Auto Tab when field limit is reached
//////////////////////////////////////////
function AutoTab(fieldFrom, maxLen, fieldTo) {
	if (fieldFrom.value.length >= maxLen)
	{ fieldTo.focus(); }
}


////////////////////////////////////////////////////
// When in edit mode, automatically selects user's
// options on drop-down menus only
////////////////////////////////////////////////////
function SetEditMenus(fieldID, checkValue, mode) {
	// MODE 0=option text (default)
	// MODE 1=option value	
	for (i=0; i<fieldID.length; i++)
	{
		if (mode==1)
		{
			// Look at option VALUE when setting menus
			if (fieldID.options[i].value==checkValue)
			{
				fieldID.options[i].selected=true;
				break;
			}
		}
		else
		{
			// Look at option TEXT when setting menus
			if (fieldID.options[i].text==checkValue)
			{
				fieldID.options[i].selected=true;
				break;
			}
		}
	}
}

///////////////////////////////////////////////////
// Default Status Bar Text
///////////////////////////////////////////////////
window.defaultStatus = "Online Employment Application";

//////////////////////////////////////////////////////////////////
// opens small window that tells user their information is loading
//////////////////////////////////////////////////////////////////
function OpenLoadingWindow() {
	var leftPos = 100;
	var topPos = 100;
	var windowWidth = 200;
	var windowHeight = 100;
	
	if (screen)
	{
		leftPos = (screen.width - 100) / 2;
		topPos = (screen.height - 100) / 2;
	}
	var app = window.open("Loading.asp","app","left=" + leftPos + ",top=" + topPos + ",width="+ windowWidth +",height="+ windowHeight +",scrollbars=0,toolbar=0,menubar=0,status=0,resizable=0");
}

////////////////////////////////////////
// Same as trim function in VBScript
////////////////////////////////////////
function trim(strText) { 
    // this will get rid of leading spaces 
    while (strText.substring(0,1) == ' ') 
        strText = strText.substring(1, strText.length);

    // this will get rid of trailing spaces 
    while (strText.substring(strText.length-1,strText.length) == ' ')
        strText = strText.substring(0, strText.length-1);

   return strText;
} 


///////////////////////////////////////////////////////////
// Changes Status Bar Text on Mousover on all links
///////////////////////////////////////////////////////////
function StatusText(msg) {
	// msg = Text to be displayed on browser status bar
	window.status = msg;
	return true;
}

////////////////////////////////////////////////////////
// Opens the Help window based on the pageID parameter
////////////////////////////////////////////////////////
function OpenHelpWindow(pageID,LIDS) {
	
	var leftPos = 10;
	var topPos = 10;
	var windowWidth = 600;
	var windowHeight = 400;
	
//	if (screen)
//	{
//		leftPos = (screen.width - windowWidth) / 2;
//		topPos = (screen.height - windowHeight) / 2;
//	}

	var helpWindow = window.open("/Jobs/Help/Help.asp?LIDS=" + LIDS + "&helpID=" + pageID,"help","left=" + leftPos + ",top=" + topPos + ",width="+ windowWidth +",height="+ windowHeight +",scrollbars=1,toolbar=0,menubar=0,status=0,resizable=1,location=0");	
}

////////////////////////////////////////////////////////////
// Produces Mouseover effect for buttons (IE4+, NN6+ only)
// by swapping CSS classes on the button
////////////////////////////////////////////////////////////
function ButtonOver(buttonID) {
	// buttonID = DOM reference to button object
	if (buttonID.className=="button")
	{ buttonID.className="buttonOver" }
	else
	{ buttonID.className="button" }
}

//////////////////////////////////////////////////////////////////
// This script fixes the Netscape 4.X CSS bug that causes
// CSS to be ignored when the browser window is resized.
// Include this script on every page in the site to make sure
// Netscape 4.x users have the bug fix.
//////////////////////////////////////////////////////////////////
if (document.layers) {
	origWidth = innerWidth;
	origHeight = innerHeight;
	}

function reloadPage() {
	if (innerWidth != origWidth || innerHeight != origHeight) 
		if (confirm('If you resize the window, Netscape will reload the page.\nIf you are filling out a form, all of the information you\nhave entered on the form may be lost.\n\nDo you want the page to reload?'))
		{
			location.reload();
		}
	}

if (document.layers) onresize = reloadPage;

////////////////////////////////////////////////////
// IE Sniffer
////////////////////////////////////////////////////
function AdminSniffer() {
	if (document.all) {
		IE=true;
	}
	else if (document.layers) {
		window.location="Browser.asp";
	}
	else if (document.getElementById) {
		NN6=true;
	}
	else {
		window.location="Browser.asp";
	}
}
//-->
