function check()
{
  if(document.theform.name1.value.length==0)
  {
   alert('Please enter your name');
   document.theform.name1.focus();
   return;
  }
if(document.theform.title.value.length==0)
  {
   alert('Please enter a review title');
   document.theform.title.focus();
   return;
  }
if(document.theform.review.value.length==0)
  {
   alert('Please enter your product review');
   document.theform.review.focus();
   return;
  }
if(document.theform.stars.value=="nil")
  {
   alert('Please enter the amount of stars');
   document.theform.stars.focus();
   return;
  }

if (document.theform.name1.value.match(/\|/))
   {
   alert('Invalid Character in the Name Field');
   document.theform.name1.focus();
   return;
  }

if(document.theform.title.value.match(/\|/))
  {
   alert('Invalid Character in review title');
   document.theform.title.focus();
   return;
  }
if(document.theform.review.value.match(/\|/))
  {
   alert('Invalid Character in product review');
   document.theform.review.focus();
   return;
  }

document.theform.submit();

document.theform.stars.value="";
document.theform.name1.value="";
document.theform.title.value="";
document.theform.review.value="";
}
