function validate(objfreequote)
{
	if(trim(objfreequote.txtQName.value)=="")
	{
		alert("Please Enter Name !");
		objfreequote.txtQName.focus();
		return false;
	}
	if(trim(objfreequote.txtQEmail.value)=="")
	{
		alert("Please Enter Email Address !");
		objfreequote.txtQEmail.focus();
		return false;
	}
	if(trim(objfreequote.txtQEmail.value)!="")
	{
		if(!ChkEmaildetailquote("form_quick_quote","txtQEmail"))
		{	
			return false;
		}
	}
	if(trim(objfreequote.txtText.value)=="")
	{
		alert("Please Enter the image text in the box !");
		objfreequote.txtText.focus();
		return false;
	}
	
}
function trim(str)
{
   return str.replace(/^\s+|\s+$/g,''); 
}
function ChkEmaildetailquote(frmName,fldnm)
{
		var FormName;
		var FldName;
		FormName=frmName;
		FldName=fldnm;
		var str=eval("document."+FormName+"."+FldName+".value");
		//var str=document.form1.txtemail.value;
		
	if (!str=="")
	{
		if (str.indexOf("@",1) == -1)
		{
			alert("That is not a valid Email address. Please enter again.");
			eval("document."+FormName+"."+FldName+".focus()");
			eval("document."+FormName+"."+FldName+".select()");
			return false;
		}
		if (str.indexOf("@",1)== 0)
		{
			alert("That is not a valid Email address. Please enter again.");
			eval("document."+FormName+"."+FldName+".focus()");
			eval("document."+FormName+"."+FldName+".select()");
			return false;
		}
		if (str.indexOf(".")== 0)
		{
			alert("That is not a valid Email address. Please enter again.");
			eval("document."+FormName+"."+FldName+".focus()");
			eval("document."+FormName+"."+FldName+".select()");
			return false;
		}
		if (str.indexOf(".",1) == -1)
		{
			alert("That is not a valid Email address. Please enter again.");
			eval("document."+FormName+"."+FldName+".focus()");
			eval("document."+FormName+"."+FldName+".select()");
			return false;
		}
	
		// extra validation
		var posat=str.indexOf("@");
		var posdot=str.indexOf(".");
		var rposdot=str.lastIndexOf(".");
		if(rposdot==posdot)
		if((posdot < posat) || (posdot-posat < 3))
		{
			alert("That is not a valid Email address. Please enter again.");
			eval("document."+FormName+"."+FldName+".focus()");
			eval("document."+FormName+"."+FldName+".select()");
			return false;
		}
		if(str.charAt(str.length-1)==".")
		{
			alert("That is not a valid Email address. Please enter again.");
			eval("document."+FormName+"."+FldName+".focus()");
			eval("document."+FormName+"."+FldName+".select()");
			return false;
		}
		if(str.charAt(str.length-1)=="@")
		{
			alert("That is not a valid Email address. Please enter again.");
			eval("document."+FormName+"."+FldName+".focus()");
			eval("document."+FormName+"."+FldName+".select()");
			return false;
		}
		var j=0;
		for( var i=0;i<str.length;i++)
		{
			if(str.charAt(i)=="@")
			j++;
		}
		if(j > 1)
		{
		alert("That is not a valid Email address. Please enter again.");
		eval("document."+FormName+"."+FldName+".focus()");
		eval("document."+FormName+"."+FldName+".select()");
		return false;
		}
	}
return true;
}
-->