function CountWords (this_field, show_word_count, show_char_count)
{ if (show_word_count == null)
  { show_word_count = true; }
  if (show_char_count == null)
  { show_char_count = false; }
  
  var char_count = this_field.value.length;
  var fullStr = this_field.value + " ";
  var cleanedStr = fullStr.replace(/\s/g,' ');
  var splitString = cleanedStr.split(" ");
  var word_count = 0;
  for (z=0; z<splitString.length; z++)
  {if (splitString[z].length > 0) word_count++;}
  if (fullStr.length <2)
  { word_count = 0; }
  if (word_count == 1)
  { wordOrWords = " word"; }
  else
  { wordOrWords = " words"; }
  if (char_count == 1) 
  { charOrChars = " character"; } 
  else
  { charOrChars = " characters"; }
  if (show_word_count & show_char_count)
  { alert ("Word Count:\n" + "    " + word_count + wordOrWords + "\n" + "    " + char_count + charOrChars); }
  else
  { if (show_word_count)
    { alert ("Word Count:  " + word_count + wordOrWords); }
    else
    { if (show_char_count)
      { alert ("Character Count:  " + char_count + charOrChars); }
    }
  }
  return word_count;
}
  
function MM_openBrWindow(theURL,winName,features)
{ window.open(theURL,winName,features); }

function integrante(id)
{ MM_openBrWindow('integrante.php?id='+id,'integrante','scrollbars=yes,width=460,height=350'); }

function ValidateEmail(elementValue)
{ var emailPattern = /^[a-zA-Z0-9._-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,4}$/;
  return emailPattern.test(elementValue);
}

function wait()
{ // Nada
}