<!--
function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}
//-->

function mostrar(capa){
  var obj = document.getElementById(capa)
  if(obj.style.display == "block") obj.style.display = "none"
  else obj.style.display = "block"
}


//Funcion que crea el objeto ajax
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;
}

//funcion que actualiza la zona dinamica

function update_zona_dinamica(capades,datos){
	zona = document.getElementById(capades);
	ajax=objetoAjax();
	ajax.open("GET", datos);
	ajax.onreadystatechange=function() {
		if (ajax.readyState==4) {
			zona.innerHTML = ajax.responseText
		}
	}
	ajax.send(null)
}




function nuevoAjax(){ 
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 cargarContenido(datasource,divID,ide2){ 
var contenedor; 
var otro; 
contenedor = document.getElementById(divID); 
                        
ajax=nuevoAjax(); 

var tipo =document.getElementById("nueva"+ide2).value //Esta variable obtiene el valor de lo q puso el usuario en el textbox nombre
var idpro =document.getElementById("ide"+ide2).value //Esta variable obtiene el valor de la ide 

ajax.open("GET", datasource+"?idpro="+idpro+"&tipo="+tipo,true); 
ajax.onreadystatechange=function() { 
if (ajax.readyState==4) { 
contenedor.innerHTML = ajax.responseText 
} 
} 
ajax.send(null) 
}
