function chkProf(strField) {

	var wordlist = "fuck|shit|nigger|nigga|niggaz|niggas|bitch|cunt|asshole|pussy|cocksucker|piss|tits|titties|whore";
	wordlistarray = wordlist.split("|");
	var strText = ""
	strText = strField.toLowerCase();
	for(i=0; i<=wordlistarray.length-1; i++)
	{	
		if (strText.indexOf(wordlistarray[i]) != -1)
			{
				return true;
				
			}
	}

	return false;
}


function chkFormType(form) {
	var profanity=false;

	for(var i=0;i<form.length;i++) {
		if (form[i].type != "hidden") {
			if ((form[i].type == "text") || (form[i].type == "textarea")) {
				if (chkProf(form[i].value)) {
					profanity = true;
					//var popup = window.open ("http://appsdev2.scholastic.net/profilter/error.htm",null,"toolbar=0,scrollbars=0,resizable=1,height=200,width=720");
//window.location.href="http://appsdev2.scholastic.net/profilter/error.htm";
				}
			}
		}
	}
	return profanity;
}


/*
function chkProf(objform) {
	var wordlist = "fuck|shit|nigger|nigga|niggaz|niggas|bitch|cunt|asshole|pussy|cocksucker|piss|tits|titties|whore";
	wordlistarray = wordlist.split("|");
	var strText = ""
	var profanity = false;
	var message = "";

	for (var j=0; j<objform.elements.length; j++) {
		if ((objform.elements[j].type == 'text') || (objform.elements[j].type == 'textarea')) {
			strText = objform.elements[j].value.toLowerCase();

			for(i=0; i<=wordlistarray.length-1; i++) {	
				if (strText.indexOf(wordlistarray[i]) != -1) {
					//if (document.location.href.indexOf('htm') > 0) {
						message = "Please edit your message to ensure that it is appropriate and try again.";
					//}
					profanity = true;
				}
			}	
		}
	}

	//if (message != "") alert(message);
	return profanity;
}
*/