<!--
//add link form function
function FormAddLink_Validator(theForm)
{

//check to see If the name field is blank
if(theForm.txtName.value=="")
{
alert("You must enter a title");
theForm.txtName.focus();
return (false);
}

//check to see If the URL field is just http://
if(theForm.txtURL.value=="http://")
{
alert("You must enter your URL");
theForm.txtURL.focus();
return (false);
}

//check to see If the URL field is blank
if(theForm.txtURL.value=="")
{
alert("You must enter your URL");
theForm.txtURL.focus();
return (false);
}

//check to see If the description field is blank
if(theForm.txtDescription.value=="")
{
alert("You must enter a description");
theForm.txtDescription.focus();
return (false);
}

//check to see If the category field is blank
if(theForm.id.value=="")
{
alert("You must select a Category");
theForm.id.focus();
return (false);
}

//check to see If the contact name field is blank
if(theForm.txtContactName.value=="")
{
alert("You must enter a contact name");
theForm.txtContactName.focus();
return (false);
}

//check to see If the contact email field is blank
if(theForm.txtContactEmail.value=="")
{
alert("You must enter a contact email");
theForm.txtContactEmail.focus();
return (false);
}

If (theForm.txtContactEmail.value.indexOf("@") == -1 || theForm.txtContactEmail.value.indexOf(".") == -1) 
{
alert ("Please enter a valid email address");
theForm.txtContactEmail.focus();
return (false);
}
		
return(true);
}




function FormRate_Validator(theForm)
{
//check that the user picks a radio button
rating_check=-1
for(i=0;i<theForm.txtRating.length;i++)
{
if(theForm.txtRating[i].checked)
{
rating_check=i;
}
}
if(rating_check==-1)
{
alert("You must select a rating");
return(false);
}

//check to see If the email field is blank
if(theForm.txtEmail.value=="")
{
alert("You must enter an Email");
theForm.txtEmail.focus();
return (false);
}

If (theForm.txtEmail.value.indexOf("@") == -1 || theForm.txtEmail.value.indexOf(".") == -1) 
{
alert ("Please enter a valid email address");
theForm.txtEmail.focus();
return (false);
}



return(true);
}



function FormReviewLink_Validator(theForm)
{
//check to see If the email field is blank
if(theForm.txtEmail.value=="")
{
alert("You must enter an Email");
theForm.txtEmail.focus();
return (false);
}

If (theForm.txtEmail.value.indexOf("@") == -1 || theForm.txtEmail.value.indexOf(".") == -1) 
{
alert ("Please enter a valid email address");
theForm.txtEmail.focus();
return (false);
}

//check to see If the name field is blank
if(theForm.txtName.value=="")
{
alert("You must enter your name");
theForm.txtName.focus();
return (false);
}
//check to see If the title field is blank
if(theForm.txtTitle.value=="")
{
alert("You must enter a title for your review");
theForm.txtTitle.focus();
return (false);
}
//check to see If the title field is blank
if(theForm.txtReview.value=="")
{
alert("You must enter your review");
theForm.txtReview.focus();
return (false);
}
return(true);
}


function FormAddLinkAdmin_Validator(theForm)
{

//check to see If the name field is blank
if(theForm.txtName.value=="")
{
alert("You must enter a title");
theForm.txtName.focus();
return (false);
}

//check to see If the URL field is blank
if(theForm.txtURL.value=="http://")
{
alert("You must enter your URL");
theForm.txtURL.focus();
return (false);
}

//check to see If the description field is blank
if(theForm.txtDescription.value=="")
{
alert("You must enter a description");
theForm.txtDescription.focus();
return (false);
}

//check to see If the title field is blank
if(theForm.id.value=="")
{
alert("You must select a Category");
theForm.id.focus();
return (false);
}

return(true);
}



function openratelink(URL)
{
window.open
(URL,"openratelink","width=400,height=300,location=0,menubar=1,resizable=1,scrollbars=1,status=1,titlebar=1,toolbar=1,screenX=100,left=100,screenY=30,top=60");
}
function openreviewlink(URL)
{
window.open
(URL,"openreviewlink","width=400,height=300,location=0,menubar=1,resizable=1,scrollbars=1,status=1,titlebar=1,toolbar=1,screenX=20,left=20,screenY=10,top=10");
}
function openreviews(URL)
{
window.open
(URL,"openreviews","width=400,height=300,location=0,menubar=1,resizable=1,scrollbars=1,status=1,titlebar=1,toolbar=1,screenX=20,left=20,screenY=10,top=10");
}

function textCounter(field, countfield, maxlimit) {
	if (field.value.length > maxlimit)
	field.value = field.value.substring(0, maxlimit);
	else 
	countfield.value = maxlimit - field.value.length;
}
//-->
