/*
ScrollBar
*****************************************
onMouseOver and onMousePut are the javascript events to use this functions
*/
function verScroll(dir, spd, loop) {
	loop = true;
	direction = "up";
	speed = 10;
	scrolltimer = null;
	if (document.layers){
		var page = eval(document.CapaProblemas);
	}else{
		if (document.getElementById) {
			var page= eval("document.getElementById('CapaProblemas').style");
		}else {
			if (document.all) {
				var page = eval('document.all.CapaProblemas.style');
	    }
  	}
	}
	direction = dir;
	speed = parseInt(spd);
	var y_pos = parseInt(page.top);
	if (loop == true){
		if (direction == "dn"){
			page.top = (y_pos - (speed));
			} else {
			if (direction == "up" && y_pos < 95) {
				page.top = (y_pos + (speed));
			} else {
				if (direction == "top") {
					page.top = 95;
		    }
		  }
		}
	scrolltimer = setTimeout("verScroll(direction,speed)", 1);
	}
}

function stopScroll() {
	loop = false;
	clearTimeout(scrolltimer);
}

/*
Cajas
********************************

*/
 n4 = (document.layers)? true:false
 ie = (document.all)? true:false
 n6 = (document.getElementById)? true:false

 function show(id)
    {
     if (n4)
            document.ventana.document.layers[id].visibility = "show"
     else if (ie)
            document.all[id].style.visibility = "visible"
        else if (n6)
            document.getElementById(id).style.visibility = "visible"
 }
   
 function hide(id)
    {
 if (n4)
        document.ventana.document.layers[id].visibility = "hide"
 else if (ie)
        document.all[id].style.visibility = "hidden"
    else if (n6)
            document.getElementById(id).style.visibility = "hidden"
 }
   
function Problemas(){
  show('CapaProblemas');
  hide('CapaContacto');
  hide('CapaServicios');
  hide('CapaLocalizacion');
  hide('CapaMapa');
}
function Contacto(){
  hide('CapaProblemas');
  show('CapaContacto');
  hide('CapaServicios');
  hide('CapaLocalizacion');
  hide('CapaMapa');
}
function Servicios(){
  hide('CapaProblemas');
  hide('CapaContacto');
  show('CapaServicios');
  hide('CapaLocalizacion');
  hide('CapaMapa');
}
function Localizacion(){
  hide('CapaProblemas');
  hide('CapaContacto');
  hide('CapaServicios');
  show('CapaLocalizacion');
  hide('CapaMapa');
}
function MapaAbrir(){
  show('CapaMapa');
}
function MapaCerrar(){
  hide('CapaMapa');
}
/*
********** Funciones Generales
*/

function novaFinestra(url, nom){

	window.open(url,nom,'toolbar=no,location=no,directories=no,status=yes,menubar=no,scrollbars=yes,resizable=yes'); 

/*,width=400,height=300,left=20,top=20*/
}