﻿function Enviar(Id){
	for (i=1; i < document.getElementById(Id).elements.length; i++) {
		//deshabilita el boton de submit
		if (document.getElementById(Id).elements[i].type == 'submit') {
			document.getElementById(Id).elements[i].style.visibility="hidden";
			$(document.getElementById(Id).elements[i].parentNode).html("<img src='/Admin_Inc/Imagenes/load_negro_trans24x24.gif' alt='...' />");
		}
		if (document.getElementById(Id).elements[i].type == 'button') {
			document.getElementById(Id).elements[i].style.visibility="hidden";
			$(document.getElementById(Id).elements[i].parentNode).html("<img src='/Admin_Inc/Imagenes/load_negro_trans24x24.gif' alt='...' />");
		}
	}
	//envia el formulario
	document.getElementById(Id).submit();
	//reasinga la funcion de envio a una funcion dummy
	Submit_seguro = Submit_off;
	return false;
}
/* Esta funcion no hace nada Sirve para evitar el reenvio del formulario */
function Submit_off(Id) {
    return false;
}
function OpenBox(url){
	$("#Box").html("<img src='/Images/load48x48.gif' style='margin:20px;' align='center' />");
	
	$.get(url, { Pop: "true" },
		function(data){
		 	_gaq.push(['_trackPageview', url]);
			$("#Box").html(data);
		}
	);
	return false;
}
function CloseBox(){
	$("#Box").css("visibility", "hidden");
	$("#BoxBg").css("display", "none");
	return false;
}




















