Array.prototype.inArray = function (value) {
	var i;
	//alert(this[i]);
	for (i=0; i < this.length; i++) {
		//alert(value);
		//alert(this[i]);
		if (this[i] === value) {
			return true;
		}
		if ( (value.indexOf(this[i])) != -1)
		{
			
			return true;
		}
	}
	return false;
};

function containBadWord(strWord)
{	

    var strReplaceAll = strWord;
    var intIndexOfMatch = strReplaceAll.indexOf( "\n" );
      
    // Loop over the string value replacing out each matching
    // substring.
    while (intIndexOfMatch != -1){
    // Relace out the current instance.
    strReplaceAll = strReplaceAll.replace( "\n", " " )
     
    // Get the index of any next matching substring.
    intIndexOfMatch = strReplaceAll.indexOf( "\n" );
    }
     
	
	sWord = strReplaceAll.split(' ');
	exists = false;
	len = sWord.length;
	for(i=0;i<len;i++)
	{
		if(bWords.inArray(sWord[i].toLowerCase()))
		{
			exists= true;
		}
	}
	
	return exists;
}


