function validateLogin(user,pass,div) {
	if($(user).value.length < 4 )  { $('textMiss').innerHTML = errMsj('textMin');}
	else if($(pass).value.length < 4 )  { $('textMiss').innerHTML = errMsj('passMin');	 }
	else { validateAjax("login.php",div);   }
}
function hiddenDiv(div) {
	$('textMiss').innerHTML = '';
	$(div).style.display = "none";	
}
function showStep(step) {
	switch (step) {
		case 'step2':
			$('step2').style.display = "block";
			$('step2B').style.display = "none";
			
			clearContent();			
			break;
		case 'step2B':
			
			$('step2').style.display = "block";
			$('step2B').style.display = "block";
			break;
		default:
			if ($('checkKeys').checked == false ) {
				 $('textKeys').value = '';
				 $(step).style.display = "none";
			}
			else  { 
				$(step).style.display = "block";
			}
	}
}
function clearContent(){
	Form.getInputs($('formReport'),'text').each(
		function(element, index) {
			if (index!=0)
				element.value="";
		}
	)
}
function isIE() {
	return document.all;
}
function objetoAjax(){
	var xmlhttp=false;
	try {
		xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
	} catch (e) {
		try {
		   xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
		} catch (E) {
			xmlhttp = false;
  		}
	}

	if (!xmlhttp && typeof XMLHttpRequest!='undefined') {
		xmlhttp = new XMLHttpRequest();
	}
	return xmlhttp;
}
function ajaxHanlder(datos,div,params){
	$(div).style.display="block";
	ajax=objetoAjax();
	ajax.open("POST", datos,true);
	ajax.onreadystatechange=function() {
		if (ajax.readyState==1) {
			//$(div).innerHTML = "Loading";
		}
		else if (ajax.readyState==4) {
			$(div).innerHTML = ajax.responseText
		}
	}
	ajax.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded;');
	ajax.send(params);
}