function cargarpag2(pag,div){
	$.ajax({
		cache: false,
		url: pag,
		type: "GET",
		beforeSend: function(objeto){
			jQuery("#"+div).html("<img src='img/load.gif'>");
        },
        success: function(rpta){		
			jQuery("#"+div).html(rpta);
        }
	});
}

function cargarpag(pag,div){
	$.ajax({
		url: pag,
		type: "GET",
		cache: false,
		beforeSend: function(objeto){
			jQuery("#"+div).html("<img src='img/load.gif'>");
        },
        success: function(rpta){		
			jQuery("#"+div).html(rpta);
        }
	});
}
function vermail(){
	$('#txt_email0').hide();
	$('#txt_email').show().select().focus();
	
}
function hidemail(){
	var mail = $('#txt_email').attr('value');
	if(mail == ''){
		$('#txt_email').hide();
		$('#txt_email0').show();
	}

}
function showpass(){
	$('#txt_pass0').hide();
	$('#txt_pass').show().select().focus();
	
}
function hidepass(){
	var pass = $('#txt_pass').attr('value');
	if(pass == ''){
		$('#txt_pass').hide();
		$('#txt_pass0').show();
	}
}

function ingresar(){
	var email = $('#txt_email').val();
	var pass = $('#txt_pass').val();
	$.ajax({
		url: 'proc_ajax_user.php',
		data: 'op=conectar&email='+email+'&pass='+pass,
		type: 'POST',
		cache: false,
        success: function(rpta){
			if(rpta == 1) window.location.reload();
			else window.location.reload();
        }	
	});
}

function salir(){
	$.ajax({
		url: 'proc_ajax_user.php',
		data: 'op=salir',
		type: 'POST',
		cache: false,
        success: function(rpta){
			if(rpta == 1) window.location.reload();
        }	
	});
}



