function cargar_div(control,pagina) {
	$.ajax({
		type: "POST",
		timeout: 7000,
		url: pagina,
		success: function(result) {
			if (result != "") {
				$("#"+control).html(result).fadeIn('slow');
			}
		}
	});
}
function animar(control) {
	$("#"+control).fadeIn();
	$("#"+control).effect('shake', { distance: 4, times: 5, speed:50 })
	$("#"+control).animate({opacity: 1.0}, 1500).fadeOut('slow');
}
function revisar(control) {
var n = 1;
var sel = 0;
var id = '';
	if (control != undefined)
	{
		if (control.length != undefined) {
			for (i=0;i<control.length;i++) {
				if (control[i].checked) {
					if (n == 2) {
						sel=0;
						break;
					} else {
						id = control[i].value;
						sel=1;
					}
					n++;
				}
			}
		} else {
			if (control.value == '')
					sel = 0;
				else {
					if (control.checked) {
							id = control.value;
							sel = 1;
					}
				}
		}
		if (!sel) {
			alert ("Por favor seleccione una fila...");
			return undefined;
		} else {
			return id;
		}
	} else {
		alert ("Error, no hay fila que seleccionar...");
		return undefined;
	}
}
function isEmailAddress(theElement)
{
	var s = theElement.value;
	var filter=/^[A-Za-z][A-Za-z0-9_.]*@[A-Za-z0-9_]+\.[A-Za-z0-9_.]+[A-za-z]$/;
	if (s.length == 0 ) return true;
	if (filter.test(s))
	return true;
	else
	alert("Ingrese una dirección de correo válida");
	//theElement.focus();
	return false;
}
