// JavaScript Document
function validatereview(revfrm)
{
	
	if(revfrm.txtVariant.value !='')
	{
			if(!ValidateNo(revfrm.txtVariant.value,"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789., "))
			{alert("Special characters are not allowed.");revfrm.txtVariant.focus();return false;}
	}

	if(revfrm.Overall1.value == 'n' && revfrm.Overall2.value == 'n' && revfrm.Overall3.value == 'n' && revfrm.Overall4.value == 'n' && revfrm.Overall5.value == 'n')
	{
		alert('Please select the Overall Satisfaction');
		return false;
	}

	if(revfrm.Pros.value !='')
	{
			if(!ValidateNo(revfrm.Pros.value,"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789.,@&()-/ "))
			{alert("Special characters are not allowed.");revfrm.Pros.focus();return false;}
	}
	
	if(revfrm.Cons.value !='')
	{
			if(!ValidateNo(revfrm.Cons.value,"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789.,@&()-/ "))
			{alert("Special characters are not allowed.");revfrm.Cons.focus();return false;}
	}	

	if(revfrm.Body.value == '')
	{
		alert('Please enter the comments');
		revfrm.Body.focus();
		return false;
	}
	blen=revfrm.Body.value;

	var comments	= blen;
	comments		= comments.split(" ");
	var wordcount	= comments.length;
	
	if(wordcount <15)
	{
		alert('Minimum 15 words in Comment');
		revfrm.Body.focus();
		return false;
	}

	if(blen.length>4000)
	{
		alert('Maximum 4000 characters allowed');
		revfrm.Body.focus();
		return false;
	}

	if(revfrm.Title.value == '')
	{
		alert('Please enter the Review Title');
		revfrm.Title.focus();
		return false;
	}

	if(revfrm.Title.value !='')
	{
			if(!ValidateNo(revfrm.Title.value,"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789.,@&()-/ "))
			{alert("Special characters are not allowed.");revfrm.Title.focus();return false;}
	}	
	
	if(revfrm.Poster.value == '')
	{
		alert('Please enter your Name');
		revfrm.Poster.focus();
		return false;
	}

	if(!ValidateNo(revfrm.Poster.value,"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ "))
	{alert("Special characters are not allowed.");revfrm.Poster.focus();return false;}

	if(revfrm.Location.value == '')
	{
		alert('Please enter your Location');
		revfrm.Location.focus();
		return false;
	}
	if(revfrm.Location.value !='')
	{
			if(!ValidateNo(revfrm.Location.value,"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789.,@#&()-/ "))
			{alert("Special characters are not allowed.");revfrm.Location.focus();return false;}
	}
	
	return true;
}

function checkvariant(revfrm)
{
	if(revfrm.txtVariant.value == "Not Sure")
	{
		revfrm.txtVariant.value = '';
	}
}



