var bigstring = " ";

function shake(n) 
{
	if (self.moveBy) 
	{
		for (i = 10; i > 0; i--) 
		{
			for (j = n; j > 0; j--) 
			{
				self.moveBy(0,i);
				self.moveBy(i,0);
				self.moveBy(0,-i);
				self.moveBy(-i,0);
			}
		}
	}
}
function doesexist(inputValue, inputExpected) 
{
  var aCharExists=0
  if (inputValue) 
  {
    for (var i=0; i<inputValue.length; i++) 
    {
      if (inputValue.charAt(i) != " ") 
      {
        aCharExists = 1
      }
    }
  }
  if (!aCharExists) 
  {
    bigstring = bigstring += inputExpected += "\n ";
  }
}
function check_review() 
{
  doesexist(document.form1.restaurant_ID.value, '- Which Restaurant')
  doesexist(document.form1.reviewer_name.value, '- Your Name')
  doesexist(document.form1.reviewer_location.value, '- City, State')
  doesexist(document.form1.stars_service.value, '- Service Stars')
  doesexist(document.form1.stars_food.value, '- Food Stars')
  doesexist(document.form1.stars_atmosphere.value, '- Atmosphere Stars')
  doesexist(document.form1.stars_total.value, '- Total Stars')
  doesexist(document.form1.review_title.value, '- Review Title')
  doesexist(document.form1.review.value, '- Review')
  if (bigstring != " ")
  {
    alert("Please fill out the following fields: \n" + bigstring)
    bigstring = " "
    return false
  }
  return true
}
function newsletter_signup_check()
{
	doesexist(document.newsletter_form.email.value, '- Email Address')
	if (bigstring != " ")
  	{
    	alert("Please fill out the following fields: \n" + bigstring)
    	bigstring = " "
    	return false
  	}
  	return true
}
