//open popup window
function openWindow(url, name, width, height) 
{
	if (!url) {return false;}
	if (!name) {name = "popupWin";}
	if (!width) {width = 550;}
	if (!height) {height = 600;}
	var properties = "";
	properties = 'toolbar=0';
	properties += ', scrollbars=1';
	properties += ', location=0';
	properties += ', statusbar=0';
	properties += ', menubar=0';
	properties += ', resizable=1';
	properties += ', width=' + width;
	properties += ', height=' + height;
	properties += ', left=50';
	properties += ', top=50';
	window.open(url, name, properties);
}
function gotoURL(thisPulldown) 
{
	if (thisPulldown) 
	{
		window.location = thisPulldown.options[thisPulldown.selectedIndex].value;
		return true;
	} 
	else 
	{
		return false;
	}
}
//test flash area
function testFlash(pageURL) {
	//test for flash version

	if (pageURL) 
	{
		if (player.version >= requireFlashVersion) 
		{
			window.location = pageURL + "?flash=true";
		} else 
		{
			window.location = pageURL + "?flash=false";
		}
	}
}
//write flash area
function writeFlash() {
	//does browser have the proper version of the flash plug-in
	var newHTML = "";

	if (player.version >= requireFlashVersion) {
		newHTML += '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"  codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" width="760" height="90" id="navigation" align="">';
		newHTML += '<param name="movie" value="/shared/templates/navigation.swf">';
		newHTML += '<param name="quality" value="high">';
		newHTML += '<param name="bgcolor" value="#ffffff">';
		newHTML += '<param name="FlashVars" value="sectionName=' + sectionName + '&pageName=' + pageName + '">';
		newHTML += '<embed src="/shared/templates/navigation.swf" quality="high" bgcolor="#ffffff" width="760" height="90" name="navigation" align="" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" FlashVars="sectionName=' + sectionName + '&pageName=' + pageName + '"></embed>';
		newHTML += '</object>';
	} else {
		newHTML += '<p>The latest version of the <a href="http://www.macromedia.com/downloads/">Flash plug-in</a> is required.</p>';
	}

	document.write(newHTML);
}

//swap image with a new image URL
function swapImg(imgName, imgURL) {
	imgNum = getImgNum(imgName);
	if (imgNum > -1) 
	{
		document.images[imgNum].src = imgURL;
	}
}

//find image number using older method for compatibility
function getImgNum(imgName) {
	for (i=0; i<document.images.length; i++) 
	{
		if (document.images[i].name == imgName) {return i;}
	}

	return -1;
}


//popup a dialog box to confirm action
function confirmDialogBox(thisTitle, thisAction) {
	confirmWindow = confirm(thisTitle);

	if (confirmWindow == true) 
	{
		if (thisAction) {window.location = thisAction;}
		return true;
	} else 
	{
		return false;
	}
}
function safemail(name, domain, display) 
{
	displayed=(typeof(display)=="undefined") ? name+"@"+domain : display;
	document.write('<a href=mailto:' + name + '@' + domain + '>' + displayed + '</a>');
}
<!-- Original:  Nannette Thacker -->
<!-- http://www.shiningstar.net -->
<!-- Begin
function checkNumeric(objName,minval, maxval,comma,period,hyphen)
{
	var numberfield = objName;
	if (chkNumeric(objName,minval,maxval,comma,period,hyphen) == false)
	{
		numberfield.select();
		numberfield.focus();
		return false;
	}
	else
	{
		return true;
	}
}

function chkNumeric(objName,minval,maxval,comma,period,hyphen)
{
	// only allow 0-9 be entered, plus any values passed
	// (can be in any order, and don't have to be comma, period, or hyphen)
	// if all numbers allow commas, periods, hyphens or whatever,
	// just hard code it here and take out the passed parameters
	var checkOK = "0123456789" + comma + period + hyphen;
	var checkStr = objName;
	var allValid = true;
	var decPoints = 0;
	var allNum = "";
	for (i = 0;  i < checkStr.value.length;  i++)
	{
		ch = checkStr.value.charAt(i);
		for (j = 0;  j < checkOK.length;  j++)
			if (ch == checkOK.charAt(j))
			break;
			if (j == checkOK.length)
			{
				allValid = false;
				break;
			}
			if (ch != ",")
				allNum += ch;
	}
	if (!allValid)
	{	
		alertsay = "Please enter only these values \""
		alertsay = alertsay + checkOK + "\" in the \"" + checkStr.name + "\" field."
		alert(alertsay);
		return (false);
	}
	// set the minimum and maximum
	var chkVal = allNum;
	var prsVal = parseInt(allNum);
	if (chkVal != "" && !(prsVal >= minval && prsVal <= maxval))
	{
		alertsay = "Please enter a value greater than or "
		alertsay = alertsay + "equal to \"" + minval + "\" and less than or "
		alertsay = alertsay + "equal to \"" + maxval + "\" in the \"" + checkStr.name + "\" field."
		alert(alertsay);
		return (false);
	}
}
							//****************************************//
							//			the following functions come			//
							//        from UW template								//
							//****************************************//
function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
							//****************************************//
							// end cusotm template functions					//
							//****************************************//
//-->
