var but_home = new Image();
but_home.src = "graphics/but-home_in.gif";
var but_appearances = new Image();
but_appearances.src = "graphics/but-appearances_in.gif";
var but_gallery = new Image();
but_gallery.src = "graphics/but-gallery_in.gif";
var but_contact = new Image();
but_contact.src = "graphics/but-contact_in.gif";
var but_guestbook = new Image();
but_guestbook.src = "graphics/but-guestbook_in.gif";

function maillist() {
window.open("../updates.cgi","","height=280,width=525,left=30,top=10", "poppage", "toolbars=0, scrollbars=0, location=0, statusbars=0, menubars=0");
}

function validateupdate( f )
{
  a1 = f.pemail.value.indexOf("@");
  a2 = f.pemail2.value.indexOf("@");

  if(f.pname.value.length < 2)
  {
    alert("Please enter a name");
    f.pname.focus();
    return(false);
  }else if(f.pemail.value.length < 7 || a1 == -1)
  {
    alert("Please enter a valid email address");
    f.pemail.focus();
    return(false);
  }else if(f.pemail2.value.length < 7 || a2 == -1)
  {
    alert("Please enter a valid confirmation email address");
    f.pemail2.focus();
    return(false);
  }else if(f.pemail.value != f.pemail2.value)
  {
    alert("Email addresses must match");
    f.pemail.focus();
    return(false);
  }
}

function winpop(target,h,w) {
window.open(target,"NearlyNature","height=" + h + ",width=" + w + ",left=30,top=10,toolbars=no,scrollbars=no,location=no,statusbars=no,menubars=no");
}

function swap_img(img_name,img_src) 
{
  document[img_name].src=img_src;
}
