function emailvalidation(entered)
{
with (entered)
{
apos=value.indexOf("@");
dotpos=value.lastIndexOf(".");
lastpos=value.length-1;
if (apos<1 || dotpos-apos<2 || lastpos-dotpos>3 || lastpos-dotpos<2) 
 {return false;}
 else {return true;}
}
}

function phonevalidation(entered)
{
with (entered)
{
phonelen=value.length
if (phonelen<10)
 {return false;}
else {return true;}
}
}

function emptyvalidation(entered)
{
// Emptyfield-Validation
with (entered)
{
if (value==null || value=="")
 {return false;}
else {return true;}
}
}

function formvalnewsletter(thisform)
{
myStr = "The Following Fields Need to be fixed:";
with (thisform)
{
if (emailvalidation(Email)==false)
	myStr = myStr + "\nThe Email Field is Invalid";

if(myStr.length > 38)
{
window.alert(myStr);
 return false;
}
else
{
return true;
}
}
}

function formvalidation(thisform)
{
myStr = "The Following Fields Need to be fixed:";
with (thisform)
{
if (emptyvalidation(Name)==false)
	myStr = myStr + "\nThe Name Field is Empty";

if (emptyvalidation(Company)==false)
	myStr = myStr + "\nThe Company Field is Empty";

if (emptyvalidation(Phone)==false)
	myStr = myStr + "\nThe Phone Field is Empty or Improper";

if (emailvalidation(Email)==false)
	myStr = myStr + "\nThe Email Field is Invalid";

if(myStr.length > 38)
{
window.alert(myStr);
 return false;
}
else
{
return true;
}
}
}