// JavaScript Document

var activa;;

function agregar(){
   if ((navigator.appName=="Microsoft Internet Explorer") && (parseInt(navigator.appVersion)>=4)){
	  window.external.AddFavorite("http://www.infoser.es", "Infoser Sistemas");
   } else { 
      if(navigator.appName == "Netscape") 
         alert("Presione Crtl+D para agregar este sitio en sus Bookmarks"); 
   }
} 


function ampliar(name, width, height)
{
    var left=(screen.width-width) / 2;
    var top=(screen.height-height) / 2;
	var opciones="left="+left+",top="+top+",width="+width+",height="+height;
	var url = '../cgi-bin/ampliar.asp?name='+name;
	var newwindow = window.open(url,"",opciones);
}

function mostrarCapa(id,capas){
	activa = id;
	ocultarCapas(capas);
	e = 'C'+id;
	if (document.getElementById) { 
		document.getElementById(e).style.display = '';
		document.getElementById(e).style.visibility = 'visible';
		document.getElementById(id).style.color = "#FF3300";
	}else {
		if (document.layers) { 
			document.e.visibility = 'visible';
		}else {
			document.all.e.style.visibility = 'visible';
		}
	}
}

function ocultarCapas(capas){
	if (document.getElementById){ 
		for(id=1;id<=capas;id++){
			e = 'C'+id;
			document.getElementById(e).style.display = 'none';
			document.getElementById(id).style.color = "#000066";
		}
	}else {
		if (document.layers) { 
			for(id=1;id<=capas;id++){
				e = 'C'+id;
				document.e.visibility = 'collapse';
			}
		}else {
			for(id=1;id<=capas;id++){
				e = 'C'+id;
				document.e.style.visibility = 'hidden';
			}
		}
	}
}

function quitColor(capas){
	if (document.getElementById){ 
		for(id=1;id<=capas;id++){
			if(id!=activa)
				document.getElementById(id).style.color = "#000066";	
		}
	}else {
		if (document.layers) { 
			for(id=1;id<=capas;id++){
				if(id!=activa)
					document.id.color = "#000066";
			}
		}else {
			for(id=1;id<=capas;id++){
				if(id!=activa)
					document.id.style.color = "#000066";
			}
		}
	}
}

function changeColor(id,capas){
	quitColor(capas);
	if(id!=activa)	
		if (document.getElementById) { 
			document.getElementById(id).style.color = "#0066FF";
		}else {
			if (document.layers) { 
				document.id.color = "#0066FF";
			}else {
				document.all.id.style.color = "#0066FF";
			}
		}
}

