bG = new Image();
bG.src = "images/bg.gif";
toP = new Image();
toP.src = "images/top.gif";
buT1 = new Image();
buT1.src = "images/main_normal.gif";
buT2 = new Image();
buT2.src = "images/listings_normal.gif";
buT3 = new Image();
buT3.src = "images/schedule_normal.gif";
buT4 = new Image();
buT4.src = "images/about_normal.gif";
buT5 = new Image();
buT5.src = "images/contact_normal.gif";
doT = new Image();
doT.src = "images/dot.gif";
baR1 = new Image();
baR1.src = "images/next_meeting.gif";
baR2 = new Image();
baR2.src = "images/new_member.gif";
baR3 = new Image();
baR3.src = "images/town_links.gif";

nMaxItem = 4;
NameIndex = 0;
DefaultState = 1;

MouseOverState = 2;
MouseDownState = 3;
imgCounter = 0;

ImageList = new Array();

bIsSupportOK = (
	((navigator.appName == "Netscape") && (parseInt(navigator.appVersion) >= 3 )) ||
	((navigator.appName == "Microsoft Internet Explorer") && (parseInt(navigator.appVersion) >= 4 ))
);

function AddImageToImageList(name, Default, MouseOver, MouseDown)
{
	ImageList[imgCounter] = new Array(nMaxItem);
	ImageList[imgCounter][NameIndex] = name;
	ImageList[imgCounter][DefaultState] = new Image();
	ImageList[imgCounter][DefaultState].src = Default;
	if (MouseOver != "") {
		ImageList[imgCounter][MouseOverState] = new Image();
		ImageList[imgCounter][MouseOverState].src = MouseOver;
	}
	if (MouseDown != "") {
		ImageList[imgCounter][MouseDownState] = new Image();
		ImageList[imgCounter][MouseDownState].src = MouseDown;
	}

	imgCounter++;
}

function ReplaceImage(name, state)
{
	for (i = 0; i < imgCounter; i++) {
		if (document.images[ImageList[i][NameIndex]] != null) {
			if ((name == ImageList[i][NameIndex]) && (ImageList[i][state] != null))
				document.images[name].src = ImageList[i][state].src;
		}
	}
}

AddImageToImageList("main", "images/main_normal.gif", "images/main_over.gif", "images/main_down.gif");
AddImageToImageList("listings", "images/listings_normal.gif", "images/listings_over.gif", "images/listings_down.gif");
AddImageToImageList("schedule", "images/schedule_normal.gif", "images/schedule_over.gif", "images/schedule_down.gif");
AddImageToImageList("about", "images/about_normal.gif", "images/about_over.gif", "images/about_down.gif");
AddImageToImageList("contact", "images/contact_normal.gif", "images/contact_over.gif", "images/contact_down.gif");
