function isValidEmail(str) 
{
   return (str.indexOf(".") > 2) && (str.indexOf("@") > 0);
}

//============================
function sf(id_name)
{
	id=document.getElementById(id_name);
	id.focus();
}
//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
function send_mail()//
{
	//ask=document.getElementById('ask').value
	name2=document.getElementById('name2').value
	company=document.getElementById('company').value
	address=document.getElementById('address').value
	email=document.getElementById('email').value
	phone=document.getElementById('phone').value
	comments=document.getElementById('comments').value
	if(name2=='')
	{
	   alert("Please Enter Name");
		sf('name2');
		return false;
	}
	else if(company=='')
	{
	   alert("Please Enter Company Name");
		sf('company');
		return false;
	}
	else if(address=='')
	{
	   alert("Please Enter Address");
		sf('address');
		return false;
	}
	else if(isValidEmail(email)==false)
	{
	   alert("Please Enter Valid Email");
		sf('email');
		return false;
	}
	else if(comments=='')
	{
	   alert("Please Enter Comments");
		sf('comments');
		return false;
	}
	else
	{
		document.form2.action = "modify.php?mode=send_query"			
		window.document.form2.submit();
	}
}
