

function sendWineryEmail() {
  var displaytext = "info@fortezzawinery.com"; 
  var mail1 = "info"; 
  var mail2 = "fortezzawinery.com"; 
  var subject = "?subject='Questions'"; 
  document.write("<a href=" + "mail" + "to:" + mail1 + "@" + mail2 + subject + ">" 
	      + displaytext + "</a>")
}


function search() {
   openNewWindow("http://www.google.com/search?q="+document.form1.input1.value+"+site%3Awww.fortezzawinery.com");
}

function openNewWindow(newURL) 
{     
   var MyWindowOptions = 'width=850,height=600,status=yes,toolbar=no,scrollbars=yes,resizable=yes';
   window.open(newURL, '', MyWindowOptions);
}


function validate()
{
     validated=false;
     if (document.contactform.name.value.length == 0) {
	   alert("Please enter your name");
 	   return false;
     }
    
     if (document.contactform.email.value.length == 0) {
	 alert("Please enter your email address");
	 return false;
     } 

     		 
     // Validate email address
     if (/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(document.contactform.email.value))
     {
        //email format is good; do nothing
     }
     else
     {
         alert("Invalid email Address! Please re-enter.")
         return false;
     }
		
     
     validated = true; 
     return true;
}


sfHover = function() 
{
	var sfEls = document.getElementById("navs").getElementsByTagName("LI");
	for (var i=0; i<sfEls.length; i++) {
		sfEls[i].onmouseover=function() {
			this.className+=" sfhover";
		}
		sfEls[i].onmouseout=function() {
			this.className=this.className.replace(new RegExp(" sfhover\\b"), "");
		}
	}
}
if (window.attachEvent) window.attachEvent("onload", sfHover);
