<!-- By Matt Spinelli -->


function mangle() {
  if (!document.getElementsByTagName && !document.createElement &&
    !document.createTextNode) return;
  var nodes = document.getElementsByTagName("span");
  for(var i=nodes.length-1;i>=0;i--) {
    if (nodes[i].className=="change") {
      var at = /at/;
      var dot = /dot/;
      var address = nodes[i].firstChild.nodeValue.split(" ").join("");
      var node = document.createElement("a");

      address = address.replace(at, "@");
      address = address.replace(dot, ".");
      node.setAttribute("href", "mailto:"+address);
      node.appendChild(document.createTextNode(address));

      var parent = nodes[i].parentNode;
      for(var j=0;j<parent.childNodes.length;j++)
        if (parent.childNodes[j] == nodes[i]) {
          if (!parent.replaceChild) return;
          parent.replaceChild(node, parent.childNodes[j]);
          break;
        }
    }
  }
}
	
function hidestatus(){
		window.status="Welcome"
		return true
	}
	
	if (document.layers)
	document.captureEvents(Event.MOUSEOVER | Event.MOUSEOUT)
	
	document.onmouseover=hidestatus
	document.onmouseout=hidestatus

browserName = navigator.appName;
browserVer = parseInt ( navigator.appVersion );
version = "n2";
if ( browserName == "Netscape" && browserVer >= 3 ) version = "n3";
if ( browserName == "Microsoft Internet Explorer" && browserVer >=4 ) version = "e4";
if ( version == "n3" || version == "e4" )
{
        home_on = new Image ( 87, 32 );
        home_off = new Image ( 87, 32 );
        home_on.src = "images/home_on.gif";
        home_off.src = "images/home_off.gif";

        gallery_on = new Image ( 87, 32 );
        gallery_off = new Image ( 87, 32 );
        gallery_on.src = "images/gallery_on.gif";
        gallery_off.src = "images/gallery_off.gif";

        policy_on = new Image ( 87, 32 );
        policy_off = new Image ( 87, 32 );
        policy_on.src = "images/policy_on.gif";
        policy_off.src = "images/policy_off.gif";

        contact_on = new Image ( 87, 32 );
        contact_off = new Image ( 87, 32 );
        contact_on.src = "images/contact_on.gif";
        contact_off.src = "images/contact_off.gif";

}
function button_on ( imgName )
{
        if ( version == "n3" || version == "e4" )
        {
                butOn = eval ( imgName + "_on.src" );
                document [imgName].src = butOn;
        }
}
function button_off ( imgName )
{
        if ( version == "n3" || version == "e4" )
        {
                butOff = eval ( imgName + "_off.src" );
                document [imgName].src = butOff;
        }
}


function processform()
  {
  	if (document.submitform.name.value == '' || 
  	    document.submitform.comments.value == '' || 
  	    document.submitform.foundsite.value == 'none' || 
  	    document.submitform.emailaddy.value == '')
  	{
  		alert('Please fill in the required fields');
	  	event.returnValue=false;
	}
  	else
  	{
  		str = document.submitform.emailaddy.value
  		if ( str.indexOf("@") == -1 || str.indexOf(".") == -1)
  		{
  			alert('Please enter a valid email address')
  			event.returnValue=false;
  		}
  		else
  		{
  			event.returnValue=true;
  		}
  	}

  }