
/*
Menu
PorClarence Eldefors (http://www.freebox.com/cereweb) con modificaciones de Wsabstract.com
Visita http://www.fearhill.cjb.net para obtener mas scripts gratuitos
*/


function movein(which,titol,text,imatge){
	if (!imatge) imatge ='espacio.gif'
	if (!text) text = 'Falta definir aquest text'
	which.style.background=''
	if (document.getElementById) {
		document.getElementById("titol").innerHTML=titol
		document.getElementById("text").innerHTML=text
		document.getElementById("imatge").innerHTML='<img src=../images/'+imatge+'>'
	}

	else {
		titol.innerHTML=titol
		text.innerHTML=text
		imatge.innerHTML='<img src=../images/'+imatge+'>'
	}
}

function moveout(which){
	which.style.background=''
	if (document.getElementById) {
		document.getElementById("titol").innerHTML='&nbsp;'
		document.getElementById("text").innerHTML='&nbsp;'
		document.getElementById("imatge").innerHTML='&nbsp;'
	}
	else
		titol.innerHTML='&nbsp;'
		text.innerHTML='&nbsp;'
		imatge.innerHTML='&nbsp;'
	}




// Precarga de imágenes
if (document.images) {

  var boton1_off = new Image();
  boton1_off.src = "../images/es/b_introduccion1.gif";
  var boton1_on = new Image();
  boton1_on.src = "../images/es/b_introduccion2.gif";

  var boton2_off = new Image();
  boton2_off.src = "../images/es/b_serviciodiferenciado1.gif";
  var boton2_on = new Image();
  boton2_on.src = "../images/es/b_serviciodiferenciado2.gif";

  var boton3_off = new Image();
  boton3_off.src = "../images/es/b_auditoria1.gif";
  var boton3_on = new Image();
  boton3_on.src = "../images/es/b_auditoria2.gif";

  var boton4_off = new Image();
  boton4_off.src = "../images/es/b_consultoria1.gif";
  var boton4_on = new Image();
  boton4_on.src = "../images/es/b_consultoria2.gif";

  var boton5_off = new Image();
  boton5_off.src = "../images/es/b_normativa1.gif";
  var boton5_on = new Image();
  boton5_on.src = "../images/es/b_normativa2.gif";

  var boton6_off = new Image();
  boton6_off.src = "../images/es/b_enlaces1.gif";
  var boton6_on = new Image();
  boton6_on.src = "../images/es/b_enlaces2.gif";

  var boton7_off = new Image();
  boton7_off.src = "../images/es/b_contactar1.gif";
  var boton7_on = new Image();
  boton7_on.src = "../images/es/b_contactar2.gif";

  var boton8_off = new Image();
  boton8_off.src = "../images/es/b_calendario1.gif";
  var boton8_on = new Image();
  boton8_on.src = "../images/es/b_calendario2.gif";

  var boton9_off = new Image();
  boton9_off.src = "../images/es/b_boletin1.gif";
  var boton9_on = new Image();
  boton9_on.src = "../images/es/b_boletin2.gif";
}

// Carga de imagen cuando el ratón pasa por encima
function entra(boton) {
  if (document.images) {
    if (boton == 'boton1') {
      document.images[boton].src = boton1_on.src;
    }
    if (boton == 'boton2') {
      document.images[boton].src = boton2_on.src;
    }
    if (boton == 'boton3') {
      document.images[boton].src = boton3_on.src;
    }
    if (boton == 'boton4') {
      document.images[boton].src = boton4_on.src;
    }
    if (boton == 'boton5') {
      document.images[boton].src = boton5_on.src;
    }
    if (boton == 'boton6') {
      document.images[boton].src = boton6_on.src;
    }
    if (boton == 'boton7') {
      document.images[boton].src = boton7_on.src;
    }
    if (boton == 'boton8') {
      document.images[boton].src = boton8_on.src;
    }
    if (boton == 'boton9') {
      document.images[boton].src = boton9_on.src;
    }
  }
}

// Carga de imagen cuando el ratón abandona el área de la imagen
function sale(boton) {
  if (document.images) {
    if (boton == 'boton1') {
      document.images[boton].src = boton1_off.src;
    }
    if (boton == 'boton2') {
      document.images[boton].src = boton2_off.src;
    }
    if (boton == 'boton3') {
      document.images[boton].src = boton3_off.src;
    }
    if (boton == 'boton4') {
      document.images[boton].src = boton4_off.src;
    }
    if (boton == 'boton5') {
      document.images[boton].src = boton5_off.src;
    }
    if (boton == 'boton6') {
      document.images[boton].src = boton6_off.src;
    }
    if (boton == 'boton7') {
      document.images[boton].src = boton7_off.src;
    }
    if (boton == 'boton8') {
      document.images[boton].src = boton8_off.src;
    }
    if (boton == 'boton9') {
      document.images[boton].src = boton9_off.src;
    }
  }
}

function foto_principal(foto) {
	document.principal.src = '../images/'+foto;
}
function foto_idioma(foto) {
	document.idioma.src = '../images/'+foto;
}

function showLAYER(layName){
  if(document.layers)document.layers[layName].visibility='block'
  if(document.all)document.all(layName).style.display='block'
}
function hideLAYER(layName){
  if(document.layers)document.layers[layName].display='none'
  if(document.all)document.all(layName).style.display='none'
  if(document.all)document.all(layName).style.display='none'
}


var ns6=document.getElementById&&!document.all
var ie=document.all

function show_text(thetext, whichdiv){
if (ie) eval("document.all."+whichdiv).innerHTML=thetext
else if (ns6) document.getElementById(whichdiv).innerHTML=thetext
}

function resetit(whichdiv){
if (ie) eval("document.all."+whichdiv).innerHTML=' '
else if (ns6) document.getElementById(whichdiv).innerHTML=' '
}
