function login_check()
{
	if(document.frm_login.email.value=='')
	{
		alert("Please enter email address!");
		document.frm_login.email.focus();
		return false;
	}
	else if(document.frm_login.email.value!='')
	{
	if(!validateEmail(document.frm_login.email.value))
		{
		alert("Please enter valid email address.");
		document.frm_login.email.focus();
		return false;
		}	
	}

//alert(document.frm_login.password.value);
	if(document.frm_login.password.value=="")
	{
		alert("Please type your password.");
		document.frm_login.password.focus();
		return false;
	}
return true;
}

function validateEmail(email)
{
// a very simple email validation checking. 
// you can add more complex email checking if it helps 
if(email.length <= 0)
{
return true;
}
var splitted = email.match("^(.+)@(.+)$");
if(splitted == null) return false;
if(splitted[1] != null )
{
var regexp_user=/^\"?[\w-_\.]*\"?$/;
if(splitted[1].match(regexp_user) == null) return false;
}
if(splitted[2] != null)
{
var regexp_domain=/^[\w-\.]*\.[A-Za-z]{2,4}$/;
if(splitted[2].match(regexp_domain) == null) 
{
var regexp_ip =/^\[\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}\]$/;
if(splitted[2].match(regexp_ip) == null) return false;
}// if
return true;
}
return false;
}
function submit_form()
{
var drug_name = document.drug.cmbDrug.options[document.drug.cmbDrug.selectedIndex].value;
/*	document.drug.submit();
*/	
//window.open("http://www.speedyhealth.com/price.php?txtSearchProd=" + drug_name);
self.location = "http://www.speedyhealth.com/price.php?txtSearchProd=" + drug_name;

}
function submit_form1()
{
//alert(document.frm_search.prod_name.value);
//	var drug_name = document.frm_search.prod_name.value;
var drug_name = document.getElementById('prod_name').value;
//window.open("http://www.speedyhealth.com/price.php?txtSearchProd=" + drug_name);
self.location = "http://www.speedyhealth.com/price.php?txtSearchProd=" + drug_name;

}