function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

function formValid1() {
var PG6=(document.response1.PG1.value)
if (document.response1.NA1.value == ""){
  alert("Please enter your name.");
  document.response1.NA1.focus();
  return false;
  }

if (document.response1.EM1.value == ""){
   confirm('','win2','640','514');return false;
   }
   
else {
	    var email_pattern = /^(\w|.)+\@([a-zA-Z0-9]|-)+\.(\w|\.)+/;
		var email_result;
		email_result = email_pattern.exec(document.response1.EM1.value);
		if (email_result) {
			}
		else  {
			alert("That is not a valid e-mail address.");
			document.response1.EM1.focus();
			return false;
		}
	}
confirm('','win2','640','514');return false;
}













addEvent(window, "load", selectButtons);

function selectButtons() {
	// We don't actually need createElement, but we do
	// need good DOM support, so this is a good check.
	if (!document.createElement) return;
	
	section = document.URL;
	// Trim parameters
	i = section.indexOf("?");
	if (i>-1) {
		section = section.substr(0, i);
	}
	// Trim intra-page links
	i = section.indexOf("#");
	if (i>-1) {
		section = section.substr(0, i);
	}
	//alert(i + "\r\n" + section);
	thisURL = section;
	// Get last folder separator
	i = section.lastIndexOf("/");
	section = section.substr(i+1);  // remove the folders
	section = section.substr(0,2);  // Get the first two characters
	//alert("Section " + section);
	
	divs = document.getElementsByTagName("div");
	for (i=0;i<divs.length;i++) {
		thisDiv = divs[i];
		//alert(thisDiv.className);
		if (thisDiv.className == "verticalNav" || thisDiv.className == "horizontalNav") {
			//alert("Found Nav DIV: " + thisDiv.className);
			processNavDiv(thisDiv);
		}
	}  // for(i)
}  // selectButtons()

function processNavDiv(thisDiv) {
	for (var inDivi=0;inDivi<thisDiv.childNodes.length;inDivi++) {
		ul = thisDiv.childNodes[inDivi];
		//alert("Div " + thisDiv.className + " has a " + ul.nodeName)
		if (ul.nodeName == "UL") {
			//alert(" the Div has a UL");
			if (ul.childNodes && ul.childNodes.length >= 1) {
				//alert("The UL has children");
				// Iterate through LIs, which are menu headers in the menu bar
				for (var itemi=0;itemi<ul.childNodes.length;itemi++) {
					var item = ul.childNodes[itemi];
					//alert("Child " + itemi + " is a " + item.nodeName);
					if (item.nodeName == "LI") {
						// Iterate things in this LI: should be an A and a UL
						var a;
						for (var sitemi=0;sitemi<item.childNodes.length;sitemi++) {
							var sitem = item.childNodes[sitemi];
							//alert(document.URL + " =? \r\n" + sitem.href + "\r\n(" + sitem.className + ")");
							if (thisDiv.className=="verticalNav") {
								// match the section page if it is in the same section
								if (sitem.nodeName =="A" && sitem.href.lastIndexOf(section)>30) {  // It should be at the 33rd character.
									item.className += ' selected';
								}
							} else {
								if (sitem.nodeName =="A" && sitem.href==thisURL) {
									item.className += ' selected';
								} else {
									// Special case for the Stock quote page that redirects from id2.shtml to id2_2.php
									//alert(sitem.href + "\r\n" + sitem.href.lastIndexOf("id2.shtml") + "\r\n" + document.URL.indexOf("id2_2.php"));
									if (sitem.nodeName =="A" 
									     && sitem.href.lastIndexOf("id2.shtml")>30 
										 && (thisURL.indexOf("id2_2.php")>30 
										     || thisURL.indexOf("st_his.php")>30
											)
										) {
										item.className += ' selected';
									}  // if "A" and points to "id2.shtml" or "id2_2.php" or "st_his.php"
									
									// Special case for the Better Business Bureau page that links from um6.shtml to um6_2.shtml
									if (sitem.nodeName =="A" 
									     && sitem.href.lastIndexOf("um6.shtml")>30 
										 && thisURL.indexOf("um6_2.shtml")>30 
										) {
										item.className += ' selected';
									}  // if "A" and points to "um6.shtml" or "um6_2.shtml"
								}  // if "A" and points to this page .. else
							}  // if "verticalNav" .. else
						}  // for(sitemi)
					}  // if "LI"
				}  // for (itemi)
			}  // if childNodes.length > 1
		}  // if "UL"
	}  // for (inDivi)
}  // processNavDiv()

function addEvent(obj, evType, fn){
	/* adds an eventListener for browsers which support it
	   Written by Scott Andrew: nice one, Scott */
	if (obj.addEventListener){
		obj.addEventListener(evType, fn, false);
		return true;
	} else if (obj.attachEvent){
		var r = obj.attachEvent("on"+evType, fn);
		return r;
	} else {
		return false;
	}
}