/*
* This javascript is ued by the StaticContent pages
* found one level up at the site root.
* The JavaScript is here to keep the site root clean for the static content generation
*/
function ValidateSearch() 
{
    if (document.SearchForm.SearchCriteria.value == "") 
    {
        alert("Please enter a product to search for");
		return false;		    
	}
	return true;
}
function ValidateLogin() 
{
    if (document.LoginForm.Email.value == "") 
    {
        alert("Please enter your email address.");
		return false;		    
	}
    if (document.LoginForm.Password.value == "") 
    {
        alert("Please enter your password.");
		return false;		    
	}			
	return true;
}
function ValidateAddToTrolley() 
{
    if (isNaN(document.AddToTrolleyForm.Quantity.value) || Number(document.AddToTrolleyForm.Quantity.value) <= 0)
    {
        alert("Please enter a valid quantity");
        return false;
    }
    return true;
}
