///FLASH NAVIGATION
function flashLoad(nivel,nome){
   var movie = parent.up.document.start;
   //movie.GotoFrame(nivel);
   movie.LoadMovie(nivel, nome);
}
///
var tmp='';
var src_tmp = '';

function PreloadImg() { 
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=PreloadImg.arguments; for(i=0; i < a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function activa(este) {
      if ((tmp != '') && (tmp != este)) tmp.src = src_tmp;
	  tmp = este;
tmp.src=tmp.src.replace(/over/g,'on');
}

function nada(imagem,nova) {
      if (tmp != imagem) {
      imagem.src=nova;
      } else {src_tmp = nova};
}

function limpa() {
	if (tmp != '') tmp.src = src_tmp;
	tmp = '';
}

// Mostra uma layer
// lay - string contendo o ID da layer
function lshow (lay)
{
        if (document.getElementById) {
            document.getElementById(lay).style.visibility="visible";
        }
        else    if ( document.all ) {
                        document.all[lay].style.visibility="visible";
                }
                else {
                        document.layers[lay].visibility="visible";
                }
}

// Esconde uma layer
// lay - string contendo o ID da layer
function lhidde (lay)
{
        if (document.getElementById) {
            document.getElementById(lay).style.visibility="hidden";
        }
        else    if ( document.all ) {
                        document.all[lay].style.visibility="hidden";
                }
                else {
                        document.layers[lay].visibility="hidden";
                        // Alternativa é usar
                        // Algumas fontes dizer que no NN4.x se tem de usar 'show' e 'hide'
                        //eval('document.'+lay+'.visibility="hidden"');

                }
}


// layer activa
tmp_l = "";

//
tmp_z = "";

// Se a layer não estiver activa, esconde-a e troca a imagem.src pela nova
function nada_layer(layer) {
      if (tmp_l != layer) {
        lhidde(layer);
        tmp_l = "";
      };
}

// Esconde a layer que está agora activa e troca a imagem para off
function activa_layer(layer) {
      if (tmp_l != '') {
	  if(tmp_l != layer)
	  {
	lhidde(tmp_l);
	}
      }
      if (layer != tmp_l) {
	 tmp_l = layer;
	 lshow(layer);
       }
}

// Mostra a layer actual e esconde a que estiver activa
function mostra_layer(layer) {
      if ((tmp_l != '') && (tmp_l != layer)) {
		lhidde(tmp_l);
                tmp_l = '';
		}
      lshow(layer);
}

/*
// Se a layer não estiver activa, esconde-a e troca a imagem.src pela nova
function nada_layer(layer,imagem,nova) {
      if (tmp_l != layer) {
      lhidde(layer);
      if (imagem != false) imagem.src = nova;
      tmp_l = ""; tmp_z = "";
      };
}

// Esconde a layer que está agora activa e troca a imagem para off
function activa_layer(layer, imagem) {
      if (tmp_l != '') {
	  	if (tmp_z != '')
                   tmp_z.src=tmp_z.src.replace(/_on/g,'_off');
	  	lhidde(tmp_l);
		}
      if (layer != tmp_l) {
	      tmp_l = layer;
	      lshow(layer);
	      if (imagem != false) tmp_z = imagem;
       } else {
          tmp_l = "";
          tmp_z = "";
       }
}

// Mostra a layer actual e esconde a que estiver activa
function mostra_layer(layer) {
      if ((tmp_l != '') && (tmp_l != layer)) {
	  	if (tmp_z != '') {tmp_z.src = tmp_z.src.replace(/_on/g,'_off');}
		lhidde(tmp_l);
		}
      lshow(layer);
}


// Activa elementos
document.tmp = "";
document.src_tmp = "";
tmp2 = "";
src_tmp2 = "";

// Torna um elemento activo
function activa(este) {
      if (document.tmp != '') document.tmp.src = document.src_tmp;
      document.tmp = este;
      if (tmp2 != '') tmp2.src = src_tmp2;
      tmp2 = "";
}
// Outra versão
function activa(este) {
      if ((tmp != '') && (tmp != este)) tmp.src = src_tmp;
	  tmp = este;
	tmp.src=tmp.src.replace(/over/g,'on');
}


// Esconde um elemento apenas se este não estiver activo
function nada(imagem,nova) {
      if (document.tmp != imagem) {
      imagem.src=nova;
      } else {document.src_tmp = nova};
}



// Descativa o elemento activo
function limpa() {
	if (tmp != '') tmp.src = src_tmp;
	tmp = '';
}
  
*/