
// Diversas funciones para trabajar con capas

function generarCapa(id, izquierdo, arriba, ancho, alto){
  if (document.all){
    document.writeln('<DIV ID="' + id +
      '" STYLE="position:absolute; overflow:none; left:' + izquierdo +
      'px; top:' + arriba + 'px; width:' + ancho + 'px; hight:' + alto +
      'px;' + 'visibility: show"> </DIV>')
  }
}



function escribirEnCapa(idCapa, texto){
  if (document.all){
    document.all[idCapa].innerHTML=texto;
  }
}



function mostrarCapa(idCapa){
  if (document.all){
    document.all[idCapa].style.visibility='visible';
  }
}



function ocultarCapa(idCapa){
  if (document.all){
    document.all[idCapa].style.visibility='hidden';
  }
}





// Variables y funciones para evitar que se descarguen imágenes con el boton izquierdo

var clickmessage="Función no disponible"

function disableclick(e) {
if (document.all) {
if (event.button==2||event.button==3) {
if (event.srcElement.tagName=="IMG"){
alert(clickmessage);
return false;
}
}
}
else if (document.layers) {
if (e.which == 3) {
alert(clickmessage);
return false;
}
}
else if (document.getElementById){
if (e.which==3&&e.target.tagName=="IMG"){
alert(clickmessage);
return false
}
}
}

function associateimages(){
for(i=0;i<document.images.length;i++)
document.images[i].onmousedown=disableclick;
}




