function simplePopup(theUrl,windowName,features)
{
window.open(theUrl,windowName,features);
void 0;
}

function goTo()
{
	if(document.majorSelect.pulldown[document.majorSelect.pulldown.selectedIndex].value=='@'){
	
	}
	
	else{

		document.location = document.majorSelect.pulldown[document.majorSelect.pulldown.selectedIndex].value;

	}


}
function goToPage(destinationPage)
{
	if (destinationPage == "" || destinationPage == undefined) return;
	document.location = destinationPage;
}

/* 
tab switcher
onclick, set class name of all tabs to CSS class for "off" state
then set all content display divs to "display: none;"
then set clicked tab to CSS class for "on" state
then set called content diplay div to "display: block;"
*/

function tabSwitch(theTabs,tabOn,theContentDivs,divOn)
{

	// create array from li's in indicated ul
	// assign array to var tabArray
	var theTabs = document.getElementById(theTabs);
	var theTabsLis = theTabs.getElementsByTagName("li");
	
	// create array from divs within indicated div
	// assign array to var divArray
	var theDivs = document.getElementById(theContentDivs);
	var theDivsDivs = theDivs.getElementsByTagName("div");

	// set all tabs to CSS class for "off"
	for (i=0;i<theTabsLis.length;i++) {
		theTabsLis[i].childNodes[0].className='off';
	}

	// set all divs to "display: none;"
	for (i=0;i<theDivsDivs.length;i++) {
		theDivsDivs[i].style.display='none';
	}

	// set indicated tab to CSS class for "on"
	document.getElementById(tabOn).className='on';
	
	// set indicated div to "display: block;"
	document.getElementById(divOn).style.display='block';

}


//DROP MENU CODE
function clearMenu() {
	var obj;
	for (var i=1;i<10;i++) {
		obj = document.getElementById('submenu'+i);
		if (obj==null) {
			break;
			return;
		}
		else {
			obj.style.display='none';
		}
	}
}

//set global variable

var timer;

function turnon(id) {

// show explicitly defined menu block
clearMenu();
	var thediv = document.getElementById(id);
	thediv.style.display="block";

// if mouse is idle for x seconds (currently 4, represented by 4000)
// run clearMenu function to reset menus

	if ('1'[0]) document.captureEvents(Event.MOUSEMOVE);
	document.onmousemove = function ()
	{
		if (!timer) timer=setTimeout('timer=null;clearMenu()',4000);
		else {
			 clearTimeout(timer);
			 timer=setTimeout('timer=null;clearMenu()',4000);
		}
	}

}

//
// end tabswitch hacks - CE 09.18.06
//

function setIdProperty(id, property, value) {
	var hideElement = 'none';
	var styleObject = document.getElementById(id+"Content");
	var callerObject =  document.getElementById(id);
	var className="contentLinkSelected";
	if (styleObject != null) {
		
		styleObject = styleObject.style;
		
		if (styleObject[property] == value) {
			value = 'none';
			className="contentLink";
		}
		
		styleObject[property] = value;
		callerObject.className = className;

	}
}
function hideAll(item, id, length) {
	/*Hide All Items on click*/
	var property = 'display';
	var styleObject;
	
	for (var i=1;i<length+1;i++) {
		styleObject = styleObject = document.getElementById(item+i);
		if (styleObject != null) {
			styleObject.style[property] = 'none';
		}
	}
	/*Now Show Selected Item*/
	setIdProperty((item+id), property, 'block');
}



// Nonintrusitve Javascript Pop-Up

var win=null;
	function NewWindow(mypage,myname,w,h,scroll,pos) {
	if(pos=="random"){LeftPosition=(screen.width)?Math.floor(Math.random()*(screen.width-w)):100;TopPosition=(screen.height)?Math.floor(Math.random()*((screen.height-h)-75)):100;}
	if(pos=="center"){LeftPosition=(screen.width)?(screen.width-w)/2:100;TopPosition=(screen.height)?(screen.height-h)/2:100;}
	else if((pos!="center" && pos!="random") || pos==null){LeftPosition=0;TopPosition=20}
	settings='width='+w+',height='+h+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+',location=no,directories=no,status=no,menubar=no,toolbar=no,resizable=yes';
	win=window.open(mypage,myname,settings); }
	
// End
