var pageloadedSub=0;
var maxNumSub = 28;        // update this variable with the number of rollover images
var offSub = new definearray(maxNumSub);
var onSub = new definearray(maxNumSub);
imgNameSub = new definearray(maxNumSub);

function definearray(x) {
    this.length = x;
    for(var t = 1; t <= x; t++)
        this[t] = 0;
    return this;
}
                
function initSub() {     
	if (document.images) {
		if (navigator.appVersion.charAt(0)>=3) {
			for (var i = 1; i<=maxNumSub; i++) {
				offSub[i] = new Image();  
				onSub[i] = new Image();          
				imgNameSub[i] = 'sub' + i;
				} 						
				offSub[1].src = "images/menu/sub_menu/patmate_off.gif";
										
				onSub[1].src = "images/menu/sub_menu/patmate_on.gif";

				offSub[2].src = "images/menu/sub_menu/exCITEr_off.gif";
										
				onSub[2].src = "images/menu/sub_menu/exCITEr_on.gif";


				pageloadedSub=1;
		}
	}
}



/* rollovers for pulldown menus */
function actPullDown(id,imgIndex) {                            // onMouseOver
	if (document.images && imgIndex>0 && pageloadedSub) {
		show(id);
		if (isNN4){
			document.layers[id].document[imgNameSub[imgIndex]].src = onSub[imgIndex].src;
		}
		else if (isIE){
			document[imgNameSub[imgIndex]].src = onSub[imgIndex].src;
		}
		else {
			// NN6
			document[imgNameSub[imgIndex]].src = onSub[imgIndex].src;
		}
	}
}

function inActPullDown(id,imgIndex) {                     //  onMouseOut     
	if (document.images && imgIndex>0 && pageloadedSub) {
		if (isNN4) {
			document.layers[id].document[imgNameSub[imgIndex]].src = offSub[imgIndex].src;
		}
		else if (isIE) {
			document[imgNameSub[imgIndex]].src = offSub[imgIndex].src;
		}
		else {
			// NN6
			document[imgNameSub[imgIndex]].src = offSub[imgIndex].src;
		}
		hide(id); 
	}
}


var pageloadedSimple=0;
var maxNumSimple = 1;        // update this variable with the number of rollover images
var offSimple = new definearray(maxNumSub);
var onSimple = new definearray(maxNumSub);
imgNameSimple = new definearray(maxNumSub);

function definearray(x) {
    this.length = x;
    for(var t = 1; t <= x; t++)
        this[t] = 0;
    return this;
}
                

/* simple rollovers for contact us and sitemap */
function simpleRollOver(imgIndex){
	if (document.images && imgIndex>0 && pageloadedSimple) {
		document[imgNameSimple[imgIndex]].src = onSimple[imgIndex].src
	}
}

function simpleRollOut(imgIndex){
	if (document.images && imgIndex>0 && pageloadedSimple) {
		document[imgNameSimple[imgIndex]].src = offSimple[imgIndex].src
	}
}
