// Son-Of-Sucker-Fish IE Hack
// -----------------------------------------------------------------
sfHover = function() {
  var sfEls = document.getElementById("navbar").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);
 
 

 //------------------- for clearing and replacing text in form input fields and textareas -------------------//
function clearText(thefield) {
  if (thefield.defaultValue==thefield.value) { thefield.value = "" }
} 
function replaceText(thefield) {
  if (thefield.value=="") { thefield.value = thefield.defaultValue }
}

function addBookmark(title,url) { 
 if (window.sidebar) { 
 window.sidebar.addPanel(title, url,""); 
 } else if( document.all ) { 
 window.external.AddFavorite( url, title); 
 } else if( window.opera && window.print ) { 
 return true; 
} 
} 

function FormSubmit(frm) {		// validate form1
	if (document.form1.name.value=='name') {
		alert('Please enter name');
		document.form1.name.focus()
		return false;
	}
	// check to see if email address field is of valid syntax
	substremail = document.form1.email.value.split("@")
	if (substremail.length > 1)
	{
		index = substremail[1].indexOf(".")
		if (index == -1)
 		{
		alert("Please enter a valid e-mail address")
		document.form1.email.focus()
		return false
		}
	}
	else {
		alert("Please enter a valid e-mail address")
		document.form1.email.focus()
		return false
	}
	if (document.form1.phone.value=='phone') {
		alert('Please enter phone number');
		document.form1.phone.focus()
		return false;
	}
//	document.form1.name.value = document.form1.fname.value + ' ' + document.form1.name.value
	return true;
}


 
 
