function rate(hover, set, rate) {
	//------create some global objects
	if (typeof(window[set+'Instructions']) == 'undefined') {
		window[set+'Instructions'] = document.getElementById(set+'Instruction').getElementsByTagName('span');
	}
	if (typeof(window[set+'Rating']) == 'undefined') {
		window[set+'Rating'] = 'stars0';
	}
	//------do stuff
	if (rate) {
		//------we are clicking, people
		window[set+'Rating'] = 'set'+hover;
		review[set].value = window[set+'Rating'].charAt(window[set+'Rating'].length-1);
	}
	if (document.getElementById(set).className=='stars '+hover || document.getElementById(set).className=='stars set'+hover) {
		//------we are mousing out, people
		document.getElementById(set).className='stars '+window[set+'Rating'];
		for (var n=0; n<window[set+'Instructions'].length; n++) {
			window[set+'Instructions'][n].style.display = 'none';
		}
		window[set+'Instructions'][window[set+'Rating'].charAt(window[set+'Rating'].length-1)].style.display = 'inline';
	} else {
		//------we are mousing over, people
		document.getElementById(set).className='stars '+hover;
		for (var n=0; n<window[set+'Instructions'].length; n++) {
			window[set+'Instructions'][n].style.display = 'none';
		}
		window[set+'Instructions'][hover.charAt(hover.length-1)].style.display = 'inline';
	}
}

function validateProdForm(form)
{

	var SubmitForm = true;

	if(document.getElementById("ActualRating").value.length <= 0)
	{
		SubmitForm = false;
	}

	if(SubmitForm == false)
	{
	
		alert("Please select your Overall Rating of the Product.");

	}
	
	return SubmitForm;
}

function validateLensForm(form)
{

	var SubmitForm = true;

	if(document.getElementById("ActualRating").value.length <= 0 || document.getElementById("ActualComfortRating").value.length <= 0 || 
		document.getElementById("ActualVisionRating").value.length <= 0)
	{
		SubmitForm = false;
	}

	if(SubmitForm == false)
	{
	
		alert("Please select your Ratings of the Lens.");

	}
	
	return SubmitForm;
}
