words = new Array( "asshole", "a$$hole", "bastard", "dumbass", "dumba$$", "dumbose", "cum", "fuck", "jackass", "jacka$$", "milf", "moron", "pussy", "pu$$y", "retard", "screw you", "shit", "slime", "wtf", "stfu", "w t f" );

function warned( form ) {
	index = 0;
	doNotContinue = false;
	var word;
	var subject = form.subject.value.toLowerCase();
	var body = form.body.value.toLowerCase();
	while( (index < words.length) && (doNotContinue == false) ) {
		word = words[index];
		target = word.replace(/\$/g, "\\$");
		re = new RegExp("\\b" + target + "\\b");
		if( subject.match(re) || body.match(re) ) {
			if( word.indexOf("retard") > -1 )
				doNotContinue = !confirm("Please don't use the  word \"retard\" in a derogatory fashion. Continue posting ?" );
			else 
				alert( "WARNING!\n\nPlease do not use the word (or phrase or abbreviation) \"" + word + "\" or any equally offensive substitute in your post.\n\nA post that uses vulgar language could result in suspension of posting privileges." );
				doNotContinue = true;
		}
		index++;
	}
	if( doNotContinue == false ){
		if (form.msgfiledir.value == "/closed"  )
			doNotContinue = !confirm("WARNING\n\nA post that is not civil or that accuses another poster of being a rival fan could result in a one-week suspension.\n\nDo you want to continue?");
		if (form.msgfiledir.value.indexOf("/tickets") == 0  )
			doNotContinue = !confirm("WARNING\n\nTickets may not be traded on this exchange for more than face value. If you're offering a ticket for sale, you must state its face value.\n\nDo you want to continue?");
	}
	
	return doNotContinue;
}
