function dia_trim(x)
{
   x = x.replace(/^\s*/g,'');
   x = x.replace(/\s*$/g,'');
   return x;
}

function dia_verify(email_id, zip_id)
{
   var email = document.getElementById(email_id);
   var zip = document.getElementById(zip_id);
   if(email && zip)
   {
		var emailv = dia_trim(email.value);
		var zipv = dia_trim(zip.value);
		if((emailv!='Email Address')&&(emailv.length>0)&&(zipv!='Zip Code')&&(zipv.length>0)&&(emailv.indexOf('@')>0)&&(zipv.match(/\d{5}/)))
		{
			return true;
		}
		else
		{
			alert('Please complete all form fields before pressing \'Join\'.');
			return false;
		}
	}
}