function formBgOn( tblTag, hiliteClass, eventPlan) {
	this.pkgId            = tblTag;
	this.tblItem           = document.getElementById(tblTag);
	this.hiliteClass   = hiliteClass;
	this.rowChoice;
	this.rowChoiceInitClass;
	if( this.tblItem == null ) {
		return false;
	}
	var thisClone = this;	
	var action 	= 	function( e ) {
						if( e == null ) {
							e = this.tblItem.myDoc.parentWindow.event;
						}
						thisClone.mouseover(e);
					}
	if (this.tblItem.addPlan) {
		for( i=0; i< eventPlan.length; i++ ) {
			this.tblItem.addPlan(eventPlan[i], action, false);
		}
	}
	else if (this.tblItem.attachEvent) {
	    for( i=0; i< eventPlan.length; i++ ) {
			eventName = "on" + eventPlan[i];
			this.tblItem.attachEvent(eventName, action);
		}
	}
	return;
}

formBgOn.prototype.mouseover = function( e ) {
	var el;
	if( e.target != null ) {
		el = e.target;
	}
	else {
		el = e.srcElement;
	}
	while ( el != null && el.nodeType!=1 && el.parentNode!=this.tblItem ) {
		el = el.parentNode;
	}
	if(el == this.tblItem) {
		return false;
	}
	rowEl = this.getCurrentRow(el);
	if( rowEl == null ) {
		return false;
	}
	if( rowEl == this.rowChoice ) {
		return false;
	}
	if( this.rowChoice ) {
		this.rowChoice.className = this.rowChoiceInitClass;
	}
	this.rowChoice              = rowEl;
	this.rowChoiceInitClass = rowEl.className;
	rowEl.className = this.hiliteClass;
	return;
}

formBgOn.prototype.getCurrentRow = function(el) {
	while ( el != null && el.parentNode.parentNode.id!=this.pkgId && el.parentNode != null) {
		el = el.parentNode;
	}	
	return el;
}


//pop launcher

function openWindow( URL, width, height, resizable, scrollbars)
{
  try
	{
		newWindow.close(); 
	}
	catch(e)
	{
				
	}

	newWindow=window.open( URL,'page',"status=no,location=no,menubar=no,toolbar=no,directories=no,resizable=" + resizable + ",scrollbars=" + scrollbars + ",width=" + width + ",height=" + height + ",screenX=100,screenY=100");	
    window.onerror = null;
} 
// CHG41199: Changes to Grand Canyon site 
function changeProgram() {
    
    var a1 = document.forms[0].A43.options[document.forms[0].A43.selectedIndex].value;
	if (a1 == '') return;
 		document.forms[0].programDescFlag.value = a1;     
    document.forms[0].elements['programChangeFlag'].value = 'Y';
	 setLeavingFlagToFalse();
	document.forms[0].submit();
	//return textBlurb;
}

function calculateCssProperties() {
	var addHeight = -100;
	document.getElementById("footerLinks").style.top=document.getElementById("copyContent").offsetHeight + addHeight;
}

function getHeight(box) {
	var h;
	for(var x=0;x<box.length;x++){
	 	// set outer table
	 		h = document.getElementById(box[x]).offsetHeight;
      		for(var y=0;y<box.length;y++){
        		var test_h = document.getElementById(box[y]).offsetHeight;
        		if(h<test_h) h = test_h;
      		}  
		}
	return h;		
}	

function adjustHeight(box,h) {
	//set the height of all divs to the tallest
   	for(var x=0;x<box.length;x++) {
		document.getElementById(box[x]).style.height = h +"px";
	}
}

function setHeight(){
	var outerbox = new Array("pageContent","form2"); 
 	var h=getHeight(outerbox);
	adjustHeight(outerbox,h);
	//changing h to the offset for the nav table
	h=h-54;
}	

// for www.learningandlife.com
function openWin(URL) {
newWindow=window.open(URL, 'programs','toolbar=no,width=550,height=500,directories=0,status=0,scrollbars=1,resizable=0,menubar=0,location=0,screenX=100,screenY=75,left=100,top=75,copyhistory=0');
}