
<!--
//-------------------------------------------------------------
//			Script to Determine Remaining Characters
function cuenta()
{
  textoArea = document.isc.message.value;
  numeroCaracteres = textoArea.length;
  inicioBlanco = /^ / 
  finBlanco = / $/
  variosBlancos = /[ ]+/g 
  textoArea = textoArea.replace(inicioBlanco,"");
  textoArea = textoArea.replace(finBlanco,"");
  textoArea = textoArea.replace(variosBlancos," ");
  inicioEnter = /^\n/ 
  finEnter = /\n$/
  variosEnter = /[\n]+/g 
  textoArea = textoArea.replace(inicioEnter,"");
  textoArea = textoArea.replace(finEnter,"");
  textoArea = textoArea.replace(variosEnter," ");
  textoAreaDividido = textoArea.split(" ");
  numeroPalabras = textoAreaDividido.length;
  tC = (numeroCaracteres==1)?" carácter":" caracteres";
  tP = (numeroPalabras==1)?" palabra":" palabras";
  document.isc.caracteres.value=numeroCaracteres
  if(numeroCaracteres>1000)
  {
    alert ('Se permite un máximo de 1000 caracteres!!');
	document.isc.message.value=textoArea.substring(0,1000);
	}
}

//-->
