function	hacerMenuNivel2() {
            var id_categoria			=	document.getElementById("id_categoria").value;
            var oXmlHttp				=	zXmlHttp.createRequest();
            oXmlHttp.open("get", "modulos/PA/hacerMenuTipoProductos.php?id_categoria=" + id_categoria, true);
            oXmlHttp.onreadystatechange =	function () {
				if (oXmlHttp.readyState ==	4) {
					if (oXmlHttp.status ==	200) {
						mostrarMenu2(oXmlHttp.responseText);
						}
				else	{
						mostrarMenu2("Ha ocurrido un error: " + oXmlHttp.statusText);
						}
					}            
				};
            oXmlHttp.send(null); 
        	}
        
function	mostrarMenu2(sText) {
			var divCustomerInfo = document.getElementById("menuNivel2");
			divCustomerInfo.innerHTML	= "";
			divCustomerInfo.innerHTML = sText;
			}
		
function hacerMenuNivel3() {
            var id_categoria			=	document.getElementById("id_categoria").value;
            var id_tipo_producto		=	document.getElementById("id_tipo_producto").value;
            var oXmlHttp				=	zXmlHttp.createRequest();
            oXmlHttp.open("get", "modulos/PA/hacerMenuFabricantes.php?id_categoria=" + id_categoria+"&id_tipo_producto="+id_tipo_producto, true);
            oXmlHttp.onreadystatechange =	function () {
                if (oXmlHttp.readyState ==	4) {
                    if (oXmlHttp.status ==	200) {
                        mostrarMenu3(oXmlHttp.responseText);
                    }
				else {
                       mostrarMenu3("Ha ocurrido un error: " + oXmlHttp.statusText);
                    }
                }            
            };
            oXmlHttp.send(null); 
        }
        
function	mostrarMenu3(sText) {
			var divCustomerInfo			=	document.getElementById("menuNivel3");
			divCustomerInfo.innerHTML	=	"";
			divCustomerInfo.innerHTML	=	sText;
			}
			
function	hacerMenuNivel4() {
            var id_categoria			=	document.getElementById("id_categoria").value;
            var id_tipo_producto		=	document.getElementById("id_tipo_producto").value;
            var id_fabricante			=	document.getElementById("id_fabricante").value;
            var oXmlHttp				=	zXmlHttp.createRequest();
            oXmlHttp.open("get", "modulos/PA/hacerMenuModelos.php?id_categoria=" + id_categoria+"&id_tipo_producto="+id_tipo_producto+"&id_fabricante="+id_fabricante, true);
            oXmlHttp.onreadystatechange =	function () {
			if (oXmlHttp.readyState ==	4) {
				if (oXmlHttp.status ==	200) {
					mostrarMenu4(oXmlHttp.responseText);
					}
			else	{
				mostrarMenu4("Ha ocurrido un error: " + oXmlHttp.statusText);
				}
                }            
            };
            oXmlHttp.send(null);
			}
        
function	mostrarMenu4(sText) {
			var divCustomerInfo			= document.getElementById("menuNivel4");
			divCustomerInfo.innerHTML	= "";
			divCustomerInfo.innerHTML	= sText;
			}
			
function	realizarBusquedaArchivos() {
            var archivoBuscar			=	document.getElementById("archivoBuscar").value;
            var oXmlHttp				=	zXmlHttp.createRequest();
            oXmlHttp.open("get", "../../modulos/GCP/GCP_buscador_rapido_archivos_ajax.php?archivoBuscar=" + archivoBuscar, true);
            oXmlHttp.onreadystatechange =	function () {
			if (oXmlHttp.readyState ==	4) {
				if (oXmlHttp.status ==	200) {
					mostrarArchivos(oXmlHttp.responseText);
					}
			else	{
				mostrarArchivos("Ha ocurrido un error: " + oXmlHttp.statusText);
				}
                }            
            };
            oXmlHttp.send(null);
			}
			
			
function	mostrarArchivos(sText) {
			var divCustomerInfo			= document.getElementById("resultadoBusquedaRapida");
			divCustomerInfo.innerHTML	= "";
			divCustomerInfo.innerHTML	= sText;
			}
			
function	relacionarCatagoriaTemaProducto(id_producto, id_categoria_producto, id_tema_producto) {
			if	(id_producto	==	"nuevo")	{
				var id_producto				=	document.referrer.getElementById("id_producto").value;
				}
            var oXmlHttp					=	zXmlHttp.createRequest();
            oXmlHttp.open("get", "../../modulos/GCP/GCP_relaciones_ajax.php?id_producto="+id_producto+"&id_categoria_producto="+id_categoria_producto+"&id_tema_producto="+id_tema_producto, true);
            oXmlHttp.onreadystatechange =	function () {
			if (oXmlHttp.readyState ==	4) {
				if (oXmlHttp.status ==	200) {
					mostrarRelacionarCatagoriaTemaProducto(oXmlHttp.responseText);
					}
			else	{
				mostrarRelacionarCatagoriaTemaProducto("Ha ocurrido un error: " + oXmlHttp.statusText);
				}
                }            
            };
            oXmlHttp.send(null);
			}
        
function	mostrarRelacionarCatagoriaTemaProducto(sText) {
			var divCustomerInfo			= document.getElementById("mostrarRelaciones");
			divCustomerInfo.innerHTML	= sText;
			}


function	mostrarCuerpoPedido(id_pedido, id_estado_linea_pedido, id_linea_venta) {
          //  var id_pedido					=	document.getElementById("id_pedido").value;
            var oXmlHttp					=	zXmlHttp.createRequest();
            oXmlHttp.open("get", "../../modulos/PA/cambiarEstadoLineaVenta.php?id_pedido="+id_pedido+"&id_estado_linea_pedido="+id_estado_linea_pedido+"&id_linea_venta="+id_linea_venta, true);
            oXmlHttp.onreadystatechange 	=	function () {
			if (oXmlHttp.readyState 		==	4) {
				if (oXmlHttp.status 		==	200) {
					mostrarLineasPedido(oXmlHttp.responseText);
					}
			else	{
				mostrarLineasPedido("Ha ocurrido un error: " + oXmlHttp.statusText);
				}
                }            
            };
            oXmlHttp.send(null);
			}
        
function	mostrarLineasPedido(sText) {
			var divCustomerInfo				=	document.getElementById("mostrarLineasPedido");
			divCustomerInfo.innerHTML		=	sText;
			}
			
			
function	marcarProductoRelacionProductos(id_producto, id_producto_relacionado) {
            var oXmlHttp					=	zXmlHttp.createRequest();
            oXmlHttp.open("get", "../../modulos/GCP/GCP_producto_relacion_productos_ajax.php?id_producto="+id_producto+"&id_producto_relacionado="+id_producto_relacionado, true);
            oXmlHttp.onreadystatechange =	function () {
			if (oXmlHttp.readyState ==	4) {
				if (oXmlHttp.status ==	200) {
					mostrarProductoRelacionProductos(oXmlHttp.responseText);
					}
			else	{
				mostrarProductoRelacionProductos("Ha ocurrido un error: " + oXmlHttp.statusText);
				}
                }            
            };
            oXmlHttp.send(null);
			}
        
function	mostrarProductoRelacionProductos(sText) {
			var divCustomerInfo			= document.getElementById("mostrarRelaciones");
			divCustomerInfo.innerHTML	= sText;
			}
			
function	crearCuerpoPedido(id_producto, i, esteDocumento) {
			var cantidad_linea				=	esteDocumento.eval("cantidad_"+i).value;
            var oXmlHttp					=	zXmlHttp.createRequest();
            oXmlHttp.open("get", "../../clases/GPP_cl/GPP_crear_cuerpo_pedido_ajax.php?id_producto="+id_producto+"&cantidad_"+i+"="+cantidad_linea+"i="+i, true);
            oXmlHttp.onreadystatechange =	function () {
			if (oXmlHttp.readyState ==	4) {
				if (oXmlHttp.status ==	200) {  
					mostrarCuerpoPedidosWebPublica(oXmlHttp.responseText);
					}
			else	{
				mostrarCuerpoPedidosWebPublica('<span class="color06">Ha ocurrido un error: </span>' + oXmlHttp.statusText);
				}
                }            
            };
            oXmlHttp.send(null);
			}
        
function	mostrarCuerpoPedidosWebPublica(sText) {
			var divCustomerInfo			= document.getElementById("mostrarResultado");
			divCustomerInfo.innerHTML	= sText;
			}
			
function	recorrerCarrusel(id_estudio, numFoto, ancho) {
            var oXmlHttp					=	zXmlHttp.createRequest();
            oXmlHttp.open("get", "../../modulos/CMS_casos_exito/CMS_carrusel_fotos_ajax.php?id_estudio="+id_estudio+"&numFoto="+numFoto+"&ancho="+ancho);
            oXmlHttp.onreadystatechange =	function () {
			if (oXmlHttp.readyState ==	4) {
				if (oXmlHttp.status ==	200) {  
					mostrarFotoCarrusel(oXmlHttp.responseText, id_estudio);
					}
			else	{
				mostrarFotoCarrusel('<span class="color06">Ha ocurrido un error: </span>' + oXmlHttp.statusText, id_estudio);
				}
                }            
            };
            oXmlHttp.send(null);
			}
        
function	mostrarFotoCarrusel(sText, id_estudio) {
			var divCustomerInfo			= document.getElementById(id_estudio);
			divCustomerInfo.innerHTML	= sText;
			}
			
			
function	hacerMenuActividades() {
            var id_tipo_caso			=	document.getElementById("id_tipo_caso").value;
            var oXmlHttp				=	zXmlHttp.createRequest();
            oXmlHttp.open("get", "modulos/CMS_casos_exito/hacerMenuActividadesCaso.php?id_tipo_caso=" + id_tipo_caso, true);
            oXmlHttp.onreadystatechange =	function () {
				if (oXmlHttp.readyState ==	4) {
					if (oXmlHttp.status ==	200) {
						mostrarMenuActividades(oXmlHttp.responseText);
						}
				else	{
						mostrarMenuActividades("Ha ocurrido un error: " + oXmlHttp.statusText);
						}
					}            
				};
            oXmlHttp.send(null); 
        	}
        
function	mostrarMenuActividades(sText) {
			var divCustomerInfo = document.getElementById("menuNivel2");
			divCustomerInfo.innerHTML = sText;
			}
			
