//  Begin Preload Defs

var Home = new Image();
Home.src = "/_catalogs/Images/Navigation/HomePage_on.jpg";

var CareerOpportunities = new Image();
CareerOpportunities.src = "/_catalogs/Images/Navigation/CareerOpportunities_on.jpg";

var SiteMap = new Image();
SiteMap.src = "/_catalogs/Images/Navigation/SiteMap_on.jpg";

var MembersOnly = new Image();
MembersOnly.src = "/_catalogs/Images/Navigation/MembersOnly_on.jpg";

var FindAHome = new Image();
FindAHome.src = "/_catalogs/Images/Navigation/FindAHome_on.jpg";

var DesignOptions = new Image();
DesignOptions.src = "/_catalogs/Images/Navigation/DesignOptions_on.jpg";

var HomeOwners = new Image();
HomeOwners.src = "/_catalogs/Images/Navigation/HomeOwners_on.jpg";

var RealtorProgram = new Image();
RealtorProgram.src = "/_catalogs/Images/Navigation/RealtorProgram_on.jpg";

var AboutTheCompany = new Image();
AboutTheCompany.src = "/_catalogs/Images/Navigation/AboutTheCompany_on.jpg";

var StandardPlan = new Image();
StandardPlan.src = "/_catalogs/Images/Navigation/StandardPlan_on.jpg";

// End Preload Defs


//Begin Fix Image script for active pages and rollovers
window.onload = fixAllImages;

function navOver1() {
	img.src = '/_catalogs/Images/Navigation/button-HOME.jpg';
}
function navOver2() {
	img.src = '/_catalogs/Images/Navigation/Button-PrintON.jpg';
}
function navOver3() {
	img.src = '/_catalogs/Images/Navigation/Button-ContactUs.jpg';
}
function navOver4() {
	img.src = '/_catalogs/Images/Navigation/Button-LargerText.jpg';
}
function navOver5() {
	img.src = '/_catalogs/Images/Navigation/Button-SmallerText.jpg';
}
function navOver6() {
	img.src = '/_catalogs/Images/Navigation/Button-Reset.jpg';
}

function navOut(img) {
	if(img.parentNode.className == "ActiveLink") {
		img.src = '/_catalogs/Images/Navigation/' + img.parentNode.getAttribute("srcover");
	} else {
		if(img.src != '/_catalogs/Images/Navigation/' + img.parentNode.getAttribute("srcout")) {
			img.src = '/_catalogs/Images/Navigation/' + img.parentNode.getAttribute("srcout");
		}
	}

}

function fixAllImages() {
	for(var i=0; i < document.images.length; i ++) {
		fixImage(document.images[i]);
	}
}

function fixImage(img) {  	
	if(img.parentNode) {
		if(img.parentNode.className == "ActiveLink") {
			if (img.className != "NavIcon") {
			img.src = '/_catalogs/Images/Navigation/' + img.parentNode.getAttribute("srcover");
			}
		}
	}
}

//End Fix Image script for active pages and rollovers
