
 //------------------- 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;
	}
	if (document.form1.phone.value=='Phone:') {
		alert('Please enter phone number');
		document.form1.phone.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
	}
	
//	document.form1.name.value = document.form1.fname.value + ' ' + document.form1.name.value
	return true;
}

$(document).ready(function() {
   var bheight = $('#blurb_area').height();
   var cheight = $('#content_area').height();
   if (bheight >= cheight) {
   	$('#content_area').css({height: bheight,paddingBottom: '50px'});
   }
});
 
 

