// JavaScript Document
function starsto(num)
{

	for(i=0;i<=num;i++)
	{
		document.getElementById('star'+i).src='/images/review/fstar.gif';
	}
	if(num<4)
	{
		for(i=num+1;i<5;i++)
		{
			document.getElementById('star'+i).src='/images/review/estar.gif';
		}
	}
	
	var num2=(num+1);
	document.getElementById('rating').value=num2;
}

function validate()
{
	
	title=document.getElementById('title').value;
	if(title.length<3)
	{
		alert("Please add a longer title for your review");
		return false;
	}
	review=document.getElementById('review').value;
	if(review.length<50)
	{
		alert("Please add a little more information in your review.  We dont want anything too long either, just 2-4 sentances really.");
		return false;
	}
	
	
	rating=document.getElementById('rating').value;
	if(rating==0)
	{
		alert("Please give a rating of 1-5 stars");
		return false;
	}
	city=document.getElementById('location').value;
	if(city.length<3)
	{
		alert("Please tell us which city you are from");
		return false;
	}
}