<!--
var defaultColor = "#003399";
var arrColors = new Array();
arrColors[0] = new Array("everydaybanking","#669999");
arrColors[1] = new Array("loansmortgages","#ff6633"); 
arrColors[2] = new Array("investments","#996699");
arrColors[3] = new Array("protection","#cc3333");
arrColors[4] = new Array("commercialbanking","#999966");
arrColors[5] = new Array("community","#5c8eae");


function getColorNumber (id) {
	i = 0;
	b = false;
	while ((i<arrColors.length)&&(!b)) {
		if (arrColors[i][0]==id) {
			b = true;
			i--;
		}
		i++;
	}
	return i;
}

/* function changeTabColor changes color of tab depending on mouse status (over or out)
 * id - string, id of the tab  
 * status - string, mouse status (over or out)
 * idSelected - string, id of the selected tab
 */
function changeTabColor(id,status,idSelected) {
	
	if (document.getElementById) {
		if (status=='over') { // Mouse over tab
			color = arrColors[getColorNumber(id)][1];			
			document.getElementById(id).style.background = color;
			if (idSelected!='') {
				document.getElementById("mainnav-" + idSelected).style.background  = color;
			} else {
				document.getElementById("mainnav").style.background  = color;
			}
		} else {			  // Mouse out of tab
			document.getElementById(id).style.background = defaultColor;
			if (idSelected!='') {
				document.getElementById("mainnav-" + idSelected).style.background  = arrColors[getColorNumber(idSelected)][1];
			} else {
				document.getElementById("mainnav").style.background  = defaultColor;
			}
		}
	}
}



/* function changeArrowColor changes color of tab depending on mouse status (over or out)
 * id - string, id of the tab  
 * status - string, mouse status (over or out)
 * pref - prefix
 */
function changeArrowColor(id,status, pref) {
	
	if (document.getElementById) {		
		if (status=='over') { // Mouse over tab							
			document.getElementById(id).src = pref + "images/modules_more_arrow_on.gif";
			
		} else {			  // Mouse out of tab				
			document.getElementById(id).src = pref + "images/modules_more_arrow_off.gif";
			
		}
	}
}

/* function onLoad gives name to the window and sets focus
 */
function onLoad() {
	window.name = "firstontariocu";
	window.focus();
}

/* function popup opens popup window */
function popup(url, windowName, x, y) {
	eval('window.open(url, windowName, "history=no,toolbar=yes,location=1,directories=0,status=0,menubar=1,scrollbars=yes,resizable=yes,width=' +  x  + ',height=' +  y + '");');
}

/* function openOnlineBanking opens OnlineBanking Application */
function openOnlineBanking() {
	window.location = "https://membersfirstonline.firstontariocu.com";
}

//-->
