	var id,x,y;

	var bAnimate = true;
	var nonie4 = "/index.htm";
	var nStep = 10;
	var nDelay = 20;
	var nChunk;

	var useragent = navigator.userAgent;


	// redirect all but IE 4.x on Win32 to 
	if (useragent.indexOf("MSIE")==-1) {
		window.location = nonie4;
	} else {
		if ((navigator.appVersion.substring(0,1) < 4) || 
		    (useragent.indexOf("Windows 3.1") != -1) ||
		    (useragent.indexOf("X11") != -1) ||
		    (useragent.indexOf("Mac") != -1))
		{
			window.location = nonie4;
		}
	}

	function doMenu(id, x, y) {
		var thisMenu = document.all(id);

		// check if we're already animating the requested menu
		if (thisMenu == AnimatedMenu) {
			window.event.cancelBubble = true;
			return false;
		}
		// if were animating a different menu then hide that one and animate the requested on
		if (AnimatedMenu != null) AnimatedMenu.style.display = "none";

		window.event.cancelBubble = true;

		// set x and y location for the menu
		// if x is negative then subtract from screen width
		if( x < 0) {
			x = document.body.clientWidth + x;
		}
		thisMenu.style.left = x;
		thisMenu.style.top = y;
		AnimatedMenu = thisMenu;

		if (bAnimate) {
			// we're animating so init everything
			thisMenu.style.clip = "rect(0 0 0 0)";
			thisMenu.style.display = "block";
			nChunk = nStep;
			window.setTimeout("showMenu()", nDelay);
		}
		else {
			// no animation, just show it
			AnimatedMenu.style.display = "";
		}
	}

	function showMenu() {
		AnimatedMenu.style.clip = "rect(0 "+ nChunk + "% " + nChunk + "% 0)"
		nChunk += nStep;
		nChunk<=100?window.setTimeout("showMenu()",nDelay):null	
	}

	function hideMenu(){
		AnimatedMenu.style.display = "none";
		AnimatedMenu = StartMenu;
		window.event.cancelBubble = true;
	}

	function keepMenu(){
		window.event.cancelBubble = true;
	}
	
	document.onmouseover = hideMenu; 

function newImage(arg) {
	if (document.images) {
		rslt = new Image();
		rslt.src = arg;
		return rslt;
	}
}

function changeImages() {
	if (document.images && (preloadFlag == true)) {
		for (var i=0; i<changeImages.arguments.length; i+=2) {
			document[changeImages.arguments[i]].src = changeImages.arguments[i+1];
		}
	}
}

var preloadFlag = false;
function preloadImages() {
	if (document.images) {
		WM_Home_01_over = newImage("images/WM_Home_01-over.gif");
		WM_Services_01_over = newImage("images/WM_Services_01-over.gif");
		WM_Ministries_01_over = newImage("images/WM_Ministries_01-over.gif");
		WM_Families_01_over = newImage("images/WM_Families_01-over.gif");
		WM_Activities_01_over = newImage("images/WM_Activities_01-over.gif");
		WM_Directory_01_over = newImage("images/WM_Directory_01-over.gif");
		WM_Prayer_Request_01_over = newImage("images/WM_Prayer_Request_01-over.gif");
		preloadFlag = true;
	}
}

