var empezar = false
var anclas = new Array ("ancla1","ancla2","ancla3")
var capas = new Array("e1","e2","e3")
var posx = new Array(3);
var posy
var retardo
var ocultar 	



function posiciona (){	
 for (i=0;i<capas.length;i++){
xMoveTo(capas[i],posx[i],posy)
} 
}
window.onload = function() {

var width = -1;
if (window.innerWidth)
{
    width = window.innerWidth;
    height = 160;
}
else if (document.getElementsByTagName)
{
    var html = document.getElementsByTagName('html');
    if (html[0].offsetWidth)
    {
        width = html[0].offsetWidth;
        height = 155;
    }
}


if(width < 924) { posx[0] = 64; posx[1] = 180; posx[2] = 306; } else {
posx[0] = 48 + (width - 924) / 2; posx[1] = 164 + (width - 924) / 2; posx[2] = 306 + (width - 924) / 2;
}
posy = height;		

posiciona()
empezar = true
}
window.onresize = function() {

var width = -1;
if (window.innerWidth)
{
    width = window.innerWidth;
    height = 160;
}
else if (document.getElementsByTagName)
{
    var html = document.getElementsByTagName('html');
    if (html[0].offsetWidth)
    {
        width = html[0].offsetWidth;
        height = 155;
    }
}



if(width < 924) { posx[0] = 64; posx[1] = 180; posx[2] = 306; } else {
posx[0] = 48 + (width - 924) / 2; posx[1] = 164 + (width - 924) / 2; posx[2] = 306 + (width - 924) / 2;
}
posy = height;		


posiciona()
}
function muestra_coloca(capa){
if (empezar){
for (i=0;i<capas.length;i++){
if (capas[i] != capa) xHide(capas[i])
}
clearTimeout(retardo)
xShow(capa)
}
}

function oculta_retarda(capa){
if (empezar){
ocultar =capa
clearTimeout(retardo)
retardo = setTimeout("xHide('" + ocultar + "')",200)
}
}

function muestra_retarda(ind){
if (empezar){
clearTimeout(retardo)
}
} 

