  function passit()
  {
  x=""+self.location;
  if(x.split("?")[1]=="code=fail")
  {
     document.passform.errorbox.value="You have entered an invalid passcode";
  }
  }
     
     
     function gallerysearch()
	 {
		this.document.location="http://www.dbrownphotography.com/"+document.getElementById("inputbox").value+"/index.htm?"+document.getElementById("codebutton").name+"=search";
	 }
	
	function checkform(customer)
	{
		if(customer.elements[0].value=="")
		{
			alert("Please enter code in the box");
			return false;
		}
	}
	
function showSelectedImage(imgName) {
 document.images[imgName].src = eval(imgName + "On.src");
}

function showUnselectedImage(imgName) {
  document.images[imgName].src = eval(imgName + "Off.src");
}

function setupImages() {
  if (document.images) {
    
    homeOff = new Image();
    homeOff.src = "index_files/linksOff/home.gif"
    homeOn = new Image();
    homeOn.src = "index_files/linksOn/home.gif"
    
    approachOff = new Image();
    approachOff.src = "index_files/linksOff/approach.gif"
    approachOn = new Image();
    approachOn.src = "index_files/linksOn/approach.gif"
    
    weddingOff = new Image();
    weddingOff.src = "index_files/linksOff/wedding.gif"
    weddingOn = new Image();
    weddingOn.src = "index_files/linksOn/wedding.gif"
    
    contactOff = new Image();
    contactOff.src = "index_files/linksOff/contact.gif"
    contactOn = new Image();
    contactOn.src = "index_files/linksOn/contact.gif"
    
    linksOff = new Image();
    linksOff.src = "index_files/linksOff/links.gif"
    linksOn = new Image();
    linksOn.src = "index_files/linksOn/links.gif"

  }
}

setupImages();