

<!--


function ValidateForm(){
	var stateID=document.frmSearch.State
	var nameID=document.frmSearch.Name	
	
	if (((stateID.value==null)||(stateID.value=="")) && ((nameID.value==null)||(nameID.value==""))){
		alert("Please enter at least a Name or Location.")
		nameID.focus()
		return false
	}
	return true
}



function HealthcareRatings(cur){
	if (cur.State.value == ""){
		alert("Please select a State or Province");
		cur.State.focus();
	return false;
	}
}
function HealthcareRatingsWorld(cur){
	if (cur.State.value == ""){
		alert("Please select a Region");
		cur.State.focus();
	return false;
	}
}


function checkMDrating(cur){
	lastnameLength = cur.Lastname.value.length;
	if (lastnameLength<2){
		alert("Please enter a 'Lastname', currently there are " + lastnameLength + " characters.");
		cur.Lastname.focus();
		return false;
	}
	var strSearch = "http";
	var string1 = cur.Lastname.value;
	var matchPos1 = string1.indexOf(strSearch);	
	if(matchPos1 != -1){
		alert("Sorry, no reference to a webpage address is allowed.");
		cur.Lastname.focus();
		return false;
	}
	string1 = cur.Firstname.value;
	var matchPos1 = string1.indexOf(strSearch);	
	if(matchPos1 != -1){
		alert("Sorry, no reference to a webpage address is allowed.");
		cur.Firstname.focus();
		return false;
	}
	string1 = cur.City.value;
	var matchPos1 = string1.indexOf(strSearch);	
	if(matchPos1 != -1){
		alert("Sorry, no reference to a webpage address is allowed.");
		cur.City.focus();
		return false;
	}
}

function checkHospitalReview(cur){
	InstitutionLength = cur.Institution.value.length;
	if (InstitutionLength<2){
		alert("Please enter a 'Hospital or Clinc', currently there are " + InstitutionLength + " characters.");
		cur.Institution.focus();
		return false;
	}
	var strSearch = "http";
	var string1 = cur.Institution.value;
	var matchPos1 = string1.indexOf(strSearch);	
	if(matchPos1 != -1){
		alert("Sorry, no reference to a webpage address is allowed.");
		cur.Institution.focus();
		return false;
	}
	string1 = cur.City.value;
	var matchPos1 = string1.indexOf(strSearch);	
	if(matchPos1 != -1){
		alert("Sorry, no reference to a webpage address is allowed.");
		cur.City.focus();
		return false;
	}
}






function checkMedicineName(cur){//check
	MedicineLength = cur.Medicine.value.length;
	if (MedicineLength<2){
		alert("Please enter a 'Medicine', currently there are only " + MedicineLength + " characters.");
		cur.Medicine.focus();
		return false;
	}
}
function checkHospitalName(cur){//check
	InstitutionLength = cur.Institution.value.length;
	if (InstitutionLength<2){
		alert("Please enter a 'Hospital or Clinic', currently there are only " + InstitutionLength + " characters.");
		cur.Institution.focus();
		return false;
	}
}
function checkDoctorLastname(cur){//check
	LastnameLength = cur.Lastname.value.length;
	if (LastnameLength<2){
		alert("Please enter a 'Lastname', currently there are only " + LastnameLength + " characters.");
		cur.Lastname.focus();
		return false;
	}
	var strSearch = "http";
	var string1 = cur.Comment.value;
	var matchPos1 = string1.indexOf(strSearch);	
	if(matchPos1 != -1){
		alert("Sorry, no reference to a webpage address is allowed.");
		cur.Comment.focus();
		return false;
	}
	strSearch = "www";
	string1 = cur.Comment.value;
	matchPos1 = string1.indexOf(strSearch);	
	if(matchPos1 != -1){
		alert("Sorry, no reference to a webpage address is allowed.");
		cur.Comment.focus();
		return false;
	}	
}

function checkPrescriptionDrugRating(cur){
	MedicineLength = cur.Medicine.value.length;
	if (MedicineLength<2){
		alert("Please enter a 'Medicine or Diet Plan', currently there are " + MedicineLength + " characters.");
		cur.Medicine.focus();
		return false;
	}
}

function checkDoctorReview(cur){ //RateExisting and check
	CommentLength = cur.Comment.value.length;
	if (CommentLength>249){
		alert("Please enter a 'Comment' less than 250 characters, currently there are " + CommentLength + " characters.");
		cur.Comment.focus();
		return false;
	}	
	var strSearch = "http";
	var string1 = cur.Comment.value;
	var matchPos1 = string1.indexOf(strSearch);	
	if(matchPos1 != -1){
		alert("Sorry, no reference to a webpage address is allowed.");
		cur.Comment.focus();
		return false;
	}
	strSearch = "www";
	string1 = cur.Comment.value;
	matchPos1 = string1.indexOf(strSearch);	
	if(matchPos1 != -1){
		alert("Sorry, no reference to a webpage address is allowed.");
		cur.Comment.focus();
		return false;
	}	
}

function checkContactUs(cur){//contactus

	
	MessageLength = cur.Message.value.length;
	if (MessageLength<10){
		alert("Please enter a value in 'Message', currently there are " + MessageLength + " characters.");
		cur.Message.focus();
		return false;
	}
	FromLength = cur.From.value.length;
	if (FromLength<2){
		alert("Please enter a value in 'From', currently there are " + FromLength + " characters.");
		cur.From.focus();
		return false;
	}
	
	//declaration here, below 'var' not needed
	var strSearch = "http";//needed below too	
	var string1 = cur.Message.value;
	var matchPos1 = string1.indexOf(strSearch);	
	if(matchPos1 != -1){
		alert("Sorry, no reference to a webpage address is allowed due to spam problems.");
		cur.Message.focus();
		return false;
	}
	
	string1 = cur.From.value;
	var matchPos1 = string1.indexOf(strSearch);	
	if(matchPos1 != -1){
		alert("Sorry, no reference to a webpage address is allowed do to spam problems.");
		cur.From.focus();
		return false;
	}

	strSearch = "www";
	
	string1 = cur.Message.value;
	matchPos1 = string1.indexOf(strSearch);	
	if(matchPos1 != -1){
		alert("Sorry, no reference to a webpage address is allowed due to spam problems.");
		cur.Message.focus();
		return false;
	}
	
	string1 = cur.From.value;
	var matchPos1 = string1.indexOf(strSearch);	
	if(matchPos1 != -1){
		alert("Sorry, no reference to a webpage address is allowed do to spam problems.");
		cur.From.focus();
		return false;
	}

}

function ViewDoctorRatings(cur){
	lastnameLength = cur.Lastname.value.length;
	if (lastnameLength<1){
		alert("Please enter a 'Lastname' or the first letter(s) of the 'Lastname', currently there are " + lastnameLength + " characters.");
		cur.Lastname.focus();
		return false;
	}	
	if (cur.State.value == ""){
		alert("Please select a State or Province");
		cur.State.focus();
	return false;
	}
}

function ViewHospitalRatings(cur){
	institutionLength = cur.Institution.value.length;
	if (institutionLength<1){
		alert("Please enter an 'Institution' or the first letter(s) of the 'Institution', currently there are " + institutionLength + " characters.");
		cur.Institution.focus();
		return false;
	}	
	if (cur.State.value == ""){
		alert("Please select a State or Province");
		cur.State.focus();
	return false;
	}
}


function bookmark(url, description)
{
netscape="Firefox and Netscape User's hit CTRL+D to add a bookmark to this site."
if (navigator.appName=='Microsoft Internet Explorer')
{
window.external.AddFavorite(url, description);
}
else if (navigator.appName=='Netscape')
{
alert(netscape);
}
}



// end hiding script-->

