// Copyright Acro Media Inc. 1998-2004, www.acromediainc.com
preloaded = 0;
var imageNames;
var imageOver;
graphicsDir = dirDepth+"graphics/nav/";

if(document.images){
	imageNames = new initArray("button1", "button2", "button3", "button4", "button5", "button6", "button7", "button8", "button9", "clientbutton1", "clientbutton2", "clientbutton3");
	imageOver = new initArray("b_members_login_02.gif", "b_property_search_02.gif", "b_affiliate_dir_02.gif", "b_featured_listing_02.gif", "b_luxury_comm_02.gif", "b_membership_02.gif", "b_contact_02.gif", "b_home_02.gif", "b_members_logout_02.gif", "b_main_02.gif", "b_broker_02.gif", "b_listing_02.gif");
}

function preloadImages(){
	var i, temp;
	if(document.images){
		for(i=0; i<imageNames.length; i++){
		    var img = document.images[imageNames[i]];
		    if(img != null)
		        img.offsrc = document.images[imageNames[i]].src;
		}
		for(i=0; i<imageNames.length; i++){
			temp = new Image();
			temp.src = graphicsDir + imageOver[i];
			var img = document.images[imageNames[i]];
			if(img != null)
			    img.oversrc = temp.src;
		}
		preloaded = 1;
	}
}

function initArray(){
	if (document.images){
		this.length = initArray.arguments.length;
		for (var i=0;i<= this.length; i++){
			this[i] = initArray.arguments[i];
		}
	}
}

function mouseOver(imageID) {
	if(document.images && preloaded){
		document.images[imageNames[imageID]].src = document.images[imageNames[imageID]].oversrc;
	}
}

function mouseOut(imageID) {
	if(document.images && preloaded){
		document.images[imageNames[imageID]].src = document.images[imageNames[imageID]].offsrc;
	}
}