﻿ <!-- hide from non JavaScript Browsers


function validate_required(field,alerttxt)
		{
		with (field)
		  {
		  if (value==null||value=="")
		    {
		    alert(alerttxt);return false;
		    }
		  else
		    {
		    return true;
		    }
		  }
		}
		
function validate_form(thisform)
		{
		with (thisform)
		  {
		  if (validate_required(Comment,"A comment must be entered.")==false)
		  	{Comment.focus();return false;}
		  if (validate_required(CommentPerson,"A name must be entered.")==false)
		  	{CommentPerson.focus();return false;}
		  if (validate_required(CommentEmail,"An email address must be entered.")==false)
		  	{CommentEmail.focus();return false;}
		  }
		}
		
function ValidateRatingForm(thisform) 
	{
		myOption = -1;
		for (i=thisform.Rating.length-1; i > -1; i--) {
		if (thisform.Rating[i].checked) {
		myOption = i; i = -1;
		}
		}
		if (myOption == -1) {
		alert("You must select a rating.");
		return false;
		}
	
	}

			
function ResetPosting()
	{
		document.input.elements['Posting'].value="TRUE";
	}
	
function ResetRating()
	{
		document.RatingInput.elements['RatingPost'].value="TRUE";
	}


/*** make start black when going over ***/
function overStar(starID)
{
	var starNo = starID.charAt(1);
	for(var i=1; i<=5; i++)
		{
			//document.getElementById('s'+i).style.color="#666666";
			if(i<=starNo) document.getElementById('s'+i).src="/images/PawPrintDark.png";
			if(i>starNo) document.getElementById('s'+i).src="/images/PawPrintLight.png";
		}
}

/*** make start gray or white when leaving ***/
function outStar(starID)
	{
		var starNo = starID.charAt(1);
		var rating = document.RatingInput.Average.value;
		for(var i=1; i<=5; i++)
			{
				//col = "color"+i;
				if(i<=rating){
				document.getElementById('s'+i).src="/images/PawPrintGray.png";
				//document.getElementById('s'+i).style.color=eval(col);
			}
			if(i>rating) document.getElementById('s'+i).src="/images/PawPrintLight.png";
		}
	}


/*** sets rating ***/
function starSelection(starID)
	{
		var starNo = starID.charAt(1);
		document.RatingInput.Average.value = starNo;
		document.RatingInput.elements['PawRating'].value=starNo;
		for(var i=6; i>0; i--)
			{
			//col = "color"+i;
				if(i<=starNo){
				document.getElementById('s'+i).src="/images/PawPrintGray.png";
				//document.getElementById('s'+i).style.color=eval(col);
				
			}
			if(i>rating) document.getElementById('s'+i).src="/images/PawPrintLight.png";
		}
	}



var state = 'none';

function showhide(layer_ref) 
	{
		if (state == 'block') 
			{ 
				state = 'none'; 
			}
		else 
			{ 
				state = 'block'; 
			} 
		if (document.all) 
			{ //IS IE 4 or 5 (or 6 beta) 
				eval( "document.all." + layer_ref + ".style.display = state"); 
			} 
		if (document.layers) 
			{ //IS NETSCAPE 4 or below 
				document.layers[layer_ref].display = state; 
			} 
		if (document.getElementById &&!document.all) 
			{ 
				hza = document.getElementById(layer_ref); 
				hza.style.display = state; 
			} 
	} 



//          -->













