function validate(form)
{
	//Check fields are not blank
	if(form.title.value.length==0)
	{
	alert('You must enter a title!');
	return false;
	}
	
	if(form.posted_by.value.length==0)
	{
	alert('You must enter who posted the hand!');
	return false;
	}
	
	if(form.hand.value.length==0)
	{
	alert('You must pick a hand type!');
	return false;
	}

	//Check cards are picked and are different
	/*var cards=new Array(form.c1.value,form.c2.value,form.c3.value,form.c4.value,form.c5.value);
	for(var i=0;i<cards.length;i++)
	{
		if(cards[i].length==0)
		{
		alert("You must pick 5 cards!");
		return false;
		}
	}*/
	
	cards.sort();
	for (var i=0; i<cards.length - 1; i++)
	{
		if (cards[i] == cards[i+1])
			{
			alert("The 5 cards must be different!");
			return false;
			}
	}
}