NS4 = (document.layers) ? 1 : 0;
IE4 = (document.all) ? 1 : 0;
ver4 = (NS4 || IE4) ? 1 : 0;
menuCount = 3;

function location (menu, x, y) {
	if (NS4) {
		document.layers[menu].left = x;
		document.layers[menu].top = y;
	}
	else {
		document.all[menu].style.pixelLeft = x;
		document.all[menu].style.pixelTop = y;
	}
}


function moveLayers() {
        if (gotlayers) {
                if (NS4) {
                        screenWidth = window.innerWidth;
                        location ('nav1Admund', 256, 123);
                        location ('nav2Admund', 330, 123);
                        location ('nav3Admund', 416, 123);
                } else {
                        screenWidth = document.body.clientWidth + 18;
                        location ('nav1Admund', 260, 130);
                        location ('nav2Admund', 335, 130);
                        location ('nav3Admund', 420, 130);
                }
        }
}



function popUp(menuName,on) {
        if (gotlayers) {
                if (on) {
                        hideall();
                        moveLayers();
                        if (NS4) {
                                document.layers[menuName].visibility = "show";
                        } else {
                                document.all[menuName].style.visibility = "visible";
                        }
                } else {
                        if (NS4) {
                                document.layers[menuName].visibility = "hide";
                        } else {
                                document.all[menuName].style.visibility = "hidden";
                        }
                }
        }
}


function hideall () {
        for (i=1; i<=menuCount; i++) {
                popUp("nav"+i+"Admund" , false);
        }
}

function preload () {
    home1 = new Image();
  home1.src = "images/home1.gif";
  homen = new Image();
  homen.src = "images/home.gif";
    profile1 = new Image();
  profile1.src = "images/profile1.gif";
  profilen = new Image();
  profilen.src = "images/profile.gif";
    feedback1 = new Image();
  feedback1.src = "images/feedback1.gif";
  feedbackn = new Image();
  feedbackn.src = "images/feedback.gif";
    contact1 = new Image();
  contact1.src = "images/contact1.gif";
  contactn = new Image();
  contactn.src = "images/contact.gif";
    sitemap1 = new Image();
  sitemap1.src = "images/sitemap1.gif";
  sitemapn = new Image();
  sitemapn.src = "images/sitemap.gif";
    formwork1 = new Image();
  formwork1.src = "images/subnav/formwork1.gif";
  formworkn = new Image();
  formworkn.src = "images/subnav/formwork.gif";
}


function dreadyco(image, changeto) {
	if (document.images) {
		image.src = changeto.src;
	}
}