	getBottomTabGroup = function() 
	{ 
	if (this.element) 
	{ 
	var children = this.getElementChildren(this.element); 
	if (children.length) 
	return children[1]; 
	} 
	return null; 
	}; 

	var getBottomContentPanelGroup = function() 
	{ 
	if (this.element) 
	{ 
	var children = this.getElementChildren(this.element); 
	if (children.length > 1) 
	return children[0]; 
	} 
	return null; 
	}; 
	
sfHover = function() {

	var sfEls = document.getElementById("nav").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);

function clearval(txt)

			{	

				document.getElementById(txt).value ='';

			}

			

			function noinput(txt)

			{

				if(document.getElementById(txt).value =='')

				{

					document.getElementById(txt).value = txt;

				}

			}
			
$(document).ready(function(){

				//To switch directions up/down and left/right just place a "-" in front of the top/left attribute

				//Caption Sliding (Partially Hidden to Visible)

				$('.boxgrid.caption').hover(function(){

					$(".cover", this).stop().animate({top:'80px'},{queue:false,duration:160});

				}, function() {

					$(".cover", this).stop().animate({top:'220px'},{queue:false,duration:160});

				});

			});

function validate_email(field,alerttxt)

{

with (field)

  {

  apos=value.indexOf("@");

  dotpos=value.lastIndexOf(".");

  if (apos<1||dotpos-apos<2)

    {alert(alerttxt);return false;}

  else {return true;}

  }

}

function validate_required(field,alerttxt,caption)

{

with (field)

  {

  if (value==null||value=="" || value==caption)

    {

    alert(alerttxt);return false;

    }

  else

    {

    return true;

    }

  }

}



function validate_form(thisform)

{

with (thisform)

  {

  if (validate_required(firstname,"Name must be filled out!","First Name")==false)

  {firstname.focus();return false;}
  
  if (validate_required(lastname,"Name must be filled out!","Last Name")==false)

  {lastname.focus();return false;}

if (validate_email(email,"Email must be filled out!")==false)

  {email.focus();return false;}

if (validate_required(phone,"Phone must be filled out!","Phone Number")==false)

  {phone.focus();return false;}

if (validate_required(message,"Message must be filled out!","Message")==false)

  {message.focus();return false;}

  }



}			
