// JavaScript Document

function checar(form){
if (document.form1.email.value=="" || document.form1.email.value==" "){
alert ("Escribe tu E-Mail de Usuario.");
document.form1.email.focus();
return false;
}
else if(!check_email(document.form1.email.value)){
	
	alert("Escribe un E-Mail válido");
	document.form1.email.focus();
	return false;
	}

if (document.form1.password.value=="" || document.form1.password.value==" "){
alert ("Escribe tu contraseña.");
document.form1.password.focus();
return false;
}
}
function inicio(){
	
}

function recordar(){
	if(document.getElementById('login').value=="" || document.getElementById('login').value==" "){
		alert("Escribe tu E-mail.");
		document.getElementById('login').focus();
		return false;
	}
}


//***************************************************************************************	
function check_email(e) { 
ok = "1234567890qwertyuiop[]asdfghjklzxcvbnm.@-_QWERTYUIOPASDFGHJKLZXCVBNM"; 

for(i=0; i < e.length ;i++){ 
if(ok.indexOf(e.charAt(i))<0){ 
return (false); 
} 
} 

if (document.images) { 
re = /(@.*@)|(\.\.)|(^\.)|(^@)|(@$)|(\.$)|(@\.)/; 
re_two = /^.+\@(\[?)[a-zA-Z0-9\-\.]+\.([a-zA-Z]{2,4}|[0-9]{1,3})(\]?)$/; 
if (!e.match(re) && e.match(re_two)) { 
return (-1); 
} 

} 

}

function replace_A(StringX){
	StringX = StringX.replace(/&aacute;/,"á");
	StringX = StringX.replace(/&eacute;/,"é");
	StringX = StringX.replace(/&iacute;/,"í");
	StringX = StringX.replace(/&oacute;/,"ó");
	StringX = StringX.replace(/&uacute;/,"ú");
	StringX = StringX.replace(/&Aacute;/,"Á");
	StringX = StringX.replace(/&Eacute;/,"É");
	StringX = StringX.replace(/&Iacute;/,"Í");
	StringX = StringX.replace(/&Oacute;/,"Ó");
	StringX = StringX.replace(/&Uacute;/,"Ú");
	return StringX;	
}