//store array of images to be preloaded
var myImages = new Array('../images/aftheader_02.jpg', '../images/aftheader_01.jpg', '../images/aftheader_05.jpg', '../images/aftheader_04.jpg', '../images/aftheader_03.jpg', '../images/aftheader_06.jpg', '../images/check.gif');
//store sub menu for showing and hidding pop menus
var menu = new Object ();
var index = 0;
//store arrays for accessing stylesheets
var theRules = null;

function preloadImages() {
     if (document.images) {
          for (var i = 0; i < myImages.length; i++) {
               (new Image()).src = myImages[i];
          }
     }
}

function prepHome(){
        //determine style sheet access
    	if (!document.styleSheets) return;
	theRules = new Array();
	if (document.styleSheets[0].cssRules)
		theRules = document.styleSheets[0].cssRules
	else if (document.styleSheets[0].rules)
		theRules = document.styleSheets[0].rules
}

function focusLink(mn){
	//set menu
        menu = mn;
		if( menu == '1')
			index = 0;
		else if(menu == '2')
				index = 1;
		else if(menu == '3')
				index = 2;
		else if(menu == '4')
                index = 3;
		else if(menu == '5')
                index = 4;
		else if(menu == '6')
                index = 5;
		else if(menu == '7')
                index = 6;
		else if(menu == '8')
                index = 7;
		else if(menu == '9')
                index = 8;
		else if(menu == '10')
                index = 9;
		else if(menu == '11')
                index = 10;
		else if(menu == '12')
                index = 11;

	//set menu link to pop menu color
	theRules[index].style.backgroundColor = '#5072E7';
	theRules[index+12].style.color = '#ffffff';
}

function unfocusLink(){
	theRules[index].style.backgroundColor = '#c0c0ff';
	theRules[index+12].style.color = '#050C74';
}

