function CheckIfBlank(controlName, message)
{
    retVal = false;
    if (trim(document.getElementById(controlName).value) == '')    
    {    
        alert(message);
        document.getElementById(controlName).focus();
        retVal = true;
    }
     return  retVal;
}

function trim(stringToTrim)
{
    return stringToTrim.replace(/^\s+|\s+$/g,"");
}

function validateEmailForm()
{
    retValidation = true;    
    if (CheckIfBlank("name", "Name, e-mail and contact message must be provided!"))
    {       
        retValidation = false;        
    }
    else if (CheckIfBlank("email", "Name, e-mail and contact message must be provided!"))
    {       
        retValidation = false;        
    }
    else if (CheckIfBlank("message", "Name, e-mail and contact message must be provided!"))
    {       
        retValidation = false;        
    }         
    
    return retValidation;
}