//------------------- 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;
}

//<![CDATA[
/* Replacement calls. Please see documentation for more information. */

if(typeof sIFR == "function"){

// This is the preferred "named argument" syntax
	sIFR.replaceElement(named({sSelector:"#left_column h3, #right_column h5", sFlashSrc:"/flash/helvetica-condmed.swf", sColor:"#464147", sLinkColor:"#ee0c14", sBgColor:"#FFFFFF", sHoverColor:"#000000", sWmode:"transparent", nPaddingTop:0, nPaddingBottom:0, sFlashVars:"textalign=left"}));
	//sIFR.replaceElement(named({sSelector:".btn_class", sFlashSrc:"/flash/helvetica-condmed.swf", sColor:"#003967", sLinkColor:"#003967", sBgColor:"#FFFFFF", sHoverColor:"#157acb", sWmode:"transparent", nPaddingTop:0, nPaddingBottom:0, sFlashVars:"textalign=left"}));
	sIFR.replaceElement(named({sSelector:"#left_column h1, #left_column h2, #left_column h3, #right_column h2, #right_column h3, #right_column h4", sFlashSrc:"/flash/helvetica-light.swf", sColor:"#464548", sLinkColor:"#a91227", sBgColor:"#FFFFFF", sHoverColor:"#000000", sWmode:"transparent", nPaddingTop:0, nPaddingBottom:0, sFlashVars:"textalign=left"}));
};

//]]>