//żESTO QUE VALIDA?  Jorge Girau
function IsEmail(texto)
{ var cadena="@";
  var estecaracter;
  var swv=0;
  for (var i=0; i < texto.length; i++)
  { estecaracter=texto.substring(i,i+1);
    if (cadena.indexOf(estecaracter,0)!=-1)
    swv++ ;
  }
  return((swv == 1)? true : false);
} 

//żY ESTO QUE VALIDA?  Jorge Girau
function EsMail(SwForm,SwTxt,valor) 
{
if (!(IsEmail(valor)))
	{
	 alert(" E-Mail '" + valor + "' no es correcto"); 
	 eval("document." + SwForm + "." + SwTxt + ".focus();");
  return (false);} 
	
}  

//VALIDA QUE EL TEXTO NO TENGA COMILLAS
function IsComilla(x)
  { for (k=0; k < x.length ; k++)
      if (x.substring(k,k+1) == "^" || x.substring(k,k+1) == "'" || x.substring(k,k+1) == '"' )
         return true;
     return false;
 }

//VALIDA QUE NO INGRESE COMILLA
function ValidaTexto(SwForm,SwTxt,texto)
	{
		if (IsComilla(texto))
        {alert('No debe poseer los caracteres ^ y/o  comilla.'); 
        eval("document." + SwForm + "." + SwTxt + ".focus();");
        return false ;}
        }
       
//VALIDA QUE EL CAMPO NO SEA VACIO - USARLO EN CAMPOS REQUERIDOS       
function TextoVacio(SwForm,SwTxt,texto)
	{	
		if (texto== "")
		{	alert('Debe ingresar dato obligatorio');
			eval("document." + SwForm + "." + SwTxt + ".focus();");
			return false;
		}
	}
       
