function simpleblogWordCount (oTextArea, oCountLabelBox, nCount)
{
  var sText = oTextArea.value;
  var nWordCount = 0;
  
  for (var nIter = 0; nIter < sText.length; nIter++) {
    if (sText.charAt(nIter) == "\\n" || sText.charAt(nIter) == " " || sText.charAt(nIter) == "\\r") {
      nWordCount++;
      if (nWordCount > nCount-1) {
	oTextArea.value = sText.substring(0,nIter);
	break;
      }
      
    }
  }
  if(nWordCount <= nCount-1)
    oCountLabelBox.value = nWordCount + 1;
  else
    oCountLabelBlock.value = nWordCount;
}

