var base= "/images/"
var buttonUnselected = new Array();
var buttonSelected = new Array();
var buttonMouseOver = new Array();
var buttonName = new Array('home', 'courses', 'professors', 'ourGuarantee', 'aboutUs', 'faq', 'specialOffers','business', 'fineArts', 'ancientHistory',	'modernHistory', 'literature', 'philosphy', 'religion', 'scienceMath',	'socialSciences', 'greatProfessors', 'greatCourses', 'guaranteed');
var buttonNameSelected = new Array('home', 'courses', 'professors', 'ourGuarantee', 'aboutUs', 'faq', 'specialOffers','business', 'fineArts', 'ancientHistory',	'modernHistory', 'literature', 'philosphy', 'religion', 'scienceMath',	'socialSciences');

function pre_load_main_nav() { 
	if (document.images) {
		for (i=0;i<7;i++) {
			//buttonSelected[i] = new Image;
			//buttonSelected[i].src = base + buttonName[i] + "Selected.gif"
			buttonUnselected[i] = new Image;
			buttonUnselected[i].src = base + buttonName[i] + ".gif"
			buttonMouseOver[i] = new Image;
			buttonMouseOver[i].src = base + buttonName[i] + "Over.gif";
		}
	}
}

function pre_load_all() {
	if (document.images) {
		for (i=0;i<buttonName.length;i++) {
			buttonUnselected[i] = new Image;
			buttonUnselected[i].src = base + buttonName[i] + ".gif"
			buttonMouseOver[i] = new Image;
			buttonMouseOver[i].src = base + buttonName[i] + "Over.gif";
		}
		for (i=0;i<buttonNameSelected.length;i++) {
			buttonSelected[i] = new Image;
			buttonSelected[i].src = base + buttonName[i] + "Selected.gif";
		}
	}
}
// The functions: first mouseover, then mouseout
function over(no) {
	if (document.images) {
		if (buttonMouseOver[no]) {
			document.images[buttonName[no]].src = buttonMouseOver[no].src;
		}
	}
}

function out(no) {
	if (document.images) { 
		if (buttonUnselected[no]) {
			document.images[buttonName[no]].src = buttonUnselected[no].src;
		}
	}
}

function openHeaderLink(strLink, windowX, windowY, bScroll ) {
	TTCSearchWin = window.open (strLink,'','scrollbars='+ bScroll + ',status=no,width='+ windowX + ',height='+windowY);
}

function fnOpenShipInfo() {
	TTCSearchWin = window.open ('/ttc/shipTable.asp','TTCShipTable','scrollbars=yes,status=no,width=400,height=650');
}

function popUp(url) {
sealWin=window.open(url,"win",'toolbar=0,location=0,directories=0,status=1,menubar=1,scrollbars=1,resizable=1,width=720,height=450');
self.name = "mainWin";
}
function popUp2 (url) {
	window.open(url,"win",'toolbar=0,location=0,directories=0,status=1,menubar=1,scrollbars=1,resizable=1,width=800,height=500');
}

function setFocus(o) {
	o.focus();
}