function trim(s){	
	while(''+s.charAt(0)==' '){
		s=s.substring(1,s.length)
	}
	return s;
}
function validateForm()
{
    valid = true;
    var filter  = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9])+$/;
    if (trim(document.WatchVideo.contactName.value).length<1)
    {
        alert ( "Please fill in the 'Name' box." );
        valid = false;
    }
    else if (!filter.test(document.WatchVideo.contactEmail.value))
    {
        alert ( "Please provide a Valid Email address." );
        valid = false;
    }    
    else if (trim(document.WatchVideo.contactEmail.value).length<1 )
    {
        alert ( "Please fill in the 'Email' box." );
        valid = false;
    }
    return valid;
}

function validateJoinForm()
{
    valid = true;
    var filter  = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9])+$/;
    if (trim(document.JoinForm.contactName.value).length<1)
    {
        alert ( "Please fill in the 'Name' box." );
        valid = false;
    }
    else if (!filter.test(document.JoinForm.contactEmail.value))
    {
        alert ( "Please provide a Valid Email address." );
        valid = false;
    }    
    else if (trim(document.JoinForm.contactEmail.value).length<1 )
    {
        alert ( "Please fill in the 'Email' box." );
        valid = false;
    }
    return valid;
}

