// JavaScript Document
function refreshPage() {
	window.location = window.location;
}

function changeSrc(el, newSrc) {
	el.src = newSrc;
}


function generateEl(parentEl) {
	if (parentEl) {
		var theParent = document.getElementById(parentEl);
	} else {
		var theParent = document.getElementsByTagName("body").item(0);
	}
	var elToAdd = document.createElement("div");
	var theEl = theParent.appendChild(elToAdd);
	return theEl;
}

function explore (prefix, myNum, total, onClass, offClass) {
/*
+===========================================-===========================================+
|                                    VERSION HISTORY                                    |
| 1.0.00  2004.05.04  JEM  Initial version and any changes undocumented to date.        |
| 1.0.01  2004.05.04  JEM  Added functionality to not turn any element back on (reset). |
|                                        SUMMARY                                        |
| Turns off all elements with an id within a specified sequence, then turns on the      |
| desired element out of that sequence.                                                 |
|                                       PARAMETERS                                      |
| prefix - the initial portion of the id's for a series of desired elements.            |
| myNum - of all of the elements within the series, the specific one to turn on.        |
| total - the total (upperBound) of the elements in the series.                         |
| onClass - the class to assign to the element that should remain on.                   |
| offClass - the class to assign to the elements to be turned off.                      |
|                                  DEPENDANT FUNCTIONS                                  |
| changeClassById;                                                                      |
|                                     EXAMPLE USAGE                                     |
| In the HTML: <div id="els1">...</div><div id="els2">...</div><div id="els3">...</div> |
| The JS call: explore('els',2,3,'fbon','fboff');                                       |
| assuming the second div is desired, and 'fbon' and 'fboff' were appropriatly defined  |
| in the CSS.                                                                           |
+===========================================-===========================================+
*/
	for (i = 1; i <= total; i++) {
		currEl = prefix + i;
		changeClassById (currEl, offClass);
	}
	if (myNum != '') {
		currEl = prefix + myNum;
		changeClassById (currEl, onClass);
	}
} // end explore


function changeTab(el){
	var parentEl = document.getElementById("tabs");
	var elsToGet = parentEl.getElementsByTagName("a");
	for(i=0;i<elsToGet.length;i++){
		elsToGet[i].className = "formButton";
	}
	el.className = "active";
	if(document.getElementById("loaderDiv")){
		resizeMe();
	}
}

function resizeMe(){
	var parentHeight = 760;
	var topHeight = document.getElementById("topDiv").offsetHeight+document.getElementById("ban").offsetHeight+document.getElementById("sectionTitle").offsetHeight+document.getElementById("breadCrumbs").offsetHeight+document.getElementById("textFooter").offsetHeight+5;
	if(navigator.userAgent.indexOf("MSIE") > 0){
		var bottomHeight = (parentHeight - topHeight)+10;	
	}else{
		var bottomHeight = (parentHeight - topHeight);		
	}
	document.getElementById("loaderDiv").style.height = bottomHeight+"px";	
}

function init(){/*DO NOT DELETE*/};