// JavaScript Document
// Spawn local pops from menus
// ********************************************************
function pop_menu(page_req)
{
	switch (page_req)
	{
		// these change location:
		case "":
		case "?page=prequal":
			//document.location.href = "index.php"+page_req;
			document.location.href = "index.html";
			break;
		// this spawns the popup:
		default:
			page_url = page_req;
			window.open(page_url,"popwin","width=490,height=420,resizable=no,scrollbars=yes,toolbar=no,menubar=no");
			break;
	}
}



// Redirect links INSIDE of a popup back to parent window
// ********************************************************
function back2opener(loc_str)
{
	opener.location.href = loc_str;
	window.close()
}

function IsNumeric(strString)
{
	var strValidChars = "0123456789";
	var strChar;
	var blnResult = true;
	
	if (strString.length == 0) return false;
	
	//  test strString consists of valid characters listed above
	for (i = 0; i < strString.length; i++)
	{
		strChar = strString.charAt(i);
		if (strValidChars.indexOf(strChar) == -1)
		{
			blnResult = false;
		}
		else
		{
			blnResult = true;
			break;
		}
	}
	return blnResult;
}