<!--
function showlayer(layer){
var myLayer=document.getElementById(layer);
if(myLayer.style.display=="none" || myLayer.style.display==""){
myLayer.style.display="block";
} else {
myLayer.style.display="none";
 }
}


function showlayer2(layer){

 layer2=layer=='sm_1'?'sm_2':'sm_1';

 var myLayer=document.getElementById(layer);
 var myLayer2=document.getElementById(layer2);
 if(myLayer.style.display=="none" || myLayer.style.display==""){
 myLayer.style.display="block";
// myLayer2.style.display="none";
 } else {
 myLayer.style.display="none";
 }
}

function mostrar(nombreCapa){
	document.getElementById(nombreCapa).style.display="block";
	//document.getElementById('myGallery2').style.zIndex="1";
}

function ocultar(nombreCapa){
	document.getElementById(nombreCapa).style.display="none";
} 
function displayWindow(theURL,winName,width,height,features) { //v3.1
// Made by Eddie Traversa modified from Macromedia Code
// http://nirvana.media3.net/
    var window_width = width;
    var window_height = height;
    var newfeatures= features;
    var window_top = (screen.height-window_height)/2;
    var window_left = (screen.width-window_width)/2;
    newWindow=window.open(''+ theURL + '',''+ winName + '','width=' + window_width + ',height=' + window_height + ',top=' + window_top + ',left=' + window_left + ',features=' + newfeatures + '');
    newWindow.focus();
}

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 ajx_vaciar(d)
{
	var c;
	c=document.getElementById(d);
	c.innerHTML="";
}

function cargarContenido(url,id_contenedor) {
	var contenedor;
	contenedor = document.getElementById(id_contenedor);
	contenedor.innerHTML ="<img src=\"/images/loading.gif\" width=\"16\" height=\"16\" border=\"0\" /> <i>Cargando datos ...</i>";
	ajax=nuevoAjax();
	if (window.XMLHttpRequest) {
		ajax.onreadystatechange=function() 
		{
			if (ajax.readyState==4) {
				contenedor.innerHTML = ajax.responseText
			}
		}
		ajax.open("GET", url);
		ajax.send(null);
		// branch for IE/Windows ActiveX version
		} else if (window.ActiveXObject) {
			if (ajax) {
			ajax.onreadystatechange=function() 
			{
				if (ajax.readyState==4) {
					contenedor.innerHTML = ajax.responseText
				}
			}
			ajax.open("GET", url, null);
			ajax.send();
		}
	}
}

function cargarContenido2(url,id_contenedor,funcionfin) {
	var contenedor;
	contenedor = document.getElementById(id_contenedor);
	contenedor.innerHTML ="<div style=\"height:15px; padding:3px;\"><i>Enviando ...</i></div>";
	ajax=nuevoAjax();
	if (window.XMLHttpRequest) {
		ajax.onreadystatechange=function() 
		{
			if (ajax.readyState==4) {
				contenedor.innerHTML = ajax.responseText;
				eval(funcionfin);
			}
		}
		ajax.open("GET", url);
		ajax.send(null);
		// branch for IE/Windows ActiveX version
		} else if (window.ActiveXObject) {
			if (ajax) {
			ajax.onreadystatechange=function() 
			{
				if (ajax.readyState==4) {
					contenedor.innerHTML = ajax.responseText;
					eval(funcionfin);
				}
			}
			ajax.open("GET", url, null);
			ajax.send();
		}
	}
}
