/* ***********************************************
JAVASCRIPT FOR THE MAIN (LEFT) NAV 
**************************************************/
var autoClose=1;
var oldObject=null;

function toggleClamShellMenu(objectID) {
	if ((oldObject)&&(autoClose==1)) oldObject.style.display='none'
	var object = document.getElementById(objectID);
	if (object.style.display =='block')  object.style.display='none';
	else object.style.display='block';
	oldObject = object;
	return;
}


/* ***********************************************
JAVASCRIPT THAT DOES THE SLIDING FOR THE TOP SUBNAV  
**************************************************/

//SLIDE FOR TOP MENU
function slideMenu1 (aY,zY) {
		if ((openTop==1) && (aY > zY)) { 
			aY -= slideSpeed;
			object1.style.top = aY + 'px';
			setTimeout('slideMenu1(' + aY + ',' + zY + ')', 0);  
		}
		else if ((openTop==0) && (aY < zY)) { 
			aY += slideSpeed;
			object1.style.top = aY + 'px';
			setTimeout('slideMenu1(' + aY + ',' + zY + ')', 0);  
		} 
	else return;
}

//SLIDE FOR BOTTOM MENU
function slideMenu2 (cY,fY) {
		if ((openBtm==1) && (cY > fY)) { 
			cY -= slideSpeed;
			object2.style.top = cY + 'px';
			setTimeout('slideMenu2(' + cY + ',' + fY + ')', 0);  
		}
		else if ((openBtm==0) && (cY < fY)) { 
			cY += slideSpeed;
			object2.style.top = cY + 'px';
			setTimeout('slideMenu2(' + cY + ',' + fY + ')', 0);  
		} 
	else return;
}

function addStyleDef(objectID, styleName, newVal) {
	var object = document.getElementById(objectID);
	object.style[styleName] = newVal;
}

function setClass(objectID, newClass) {
	var object = document.getElementById(objectID);
	object.className = newClass;
	}
