


function hideLayer(layerid) {

var layer = document.getElementById(layerid);

layer.style.visibility = "hidden";

}





                                                                 

                                                                                             

var thresholdY = 0;                // in pixels; threshold for vertical repositioning of a layer

var ordinata_margin = 205;        // to start the layer a bit above the mouse vertical coordinate 

                                                                                       

DOM = (document.getElementById) ? 1 : 0;                                             

NS4 = (document.layers) ? 1 : 0;                                                    

IE4 = (document.all) ? 1 : 0;                                                      

var loaded = 0;        // to avoid stupid errors of Microsoft browsers            

                                                                       

                                                                                

                                                                          

                                                                              

// it works with NS4, Mozilla, NS6, Opera 5, IE                               

currentY = -1;                                                                

function grabMouse(e) {                                                       

        if (DOM && !IE4) {                                                    

                currentY = e.clientY;                                         

        } else if (NS4) {                                                     

                currentY = e.pageY;                                           

        } else {                                                              

                currentY = event.y;                                           

        }                                                                     

        if (DOM && !IE4 && navigator.appName != "Opera") {                    

                currentY += window.pageYOffset;                               

        } else if (IE4 && DOM) {                                              

                currentY += document.body.scrollTop;                          

        }


myRE = new RegExp("http://www.tropicaldiscovery.com", "i");

var topUrl = top.location.href;

if (topUrl.match(myRE) && parent.frames.length!=0){

xMousePos = 0; // Horizontal position of the mouse on the screen

yMousePos = 0; // Vertical position of the mouse on the screen

xMousePosMax = 0; // Width of the page

yMousePosMax = 0; // Height of the page

    if (document.layers) {

        xMousePos = e.pageX;

        yMousePos = e.pageY;

        xMousePosMax = window.innerWidth+window.pageXOffset;

        yMousePosMax = window.innerHeight+window.pageYOffset;

    } else if (document.all) { 

        xMousePos = window.event.x+document.body.scrollLeft;

        yMousePos = window.event.y+document.body.scrollTop;

        xMousePosMax = document.body.clientWidth+document.body.scrollLeft;

        yMousePosMax = document.body.clientHeight+document.body.scrollTop;

    } else if (document.getElementById) {

        xMousePos = e.pageX;

        yMousePos = e.pageY;

        xMousePosMax = window.innerWidth+window.pageXOffset;

        yMousePosMax = window.innerHeight+window.pageYOffset;

    } 

        window.status = "Pos x =" + xMousePos + ", Pos y =" + yMousePos;

}


                                                                            

}
                                                                             

if ((DOM || NS4) && !IE4) {                                                   

        document.captureEvents(Event.MOUSEDOWN | Event.MOUSEMOVE);            

}                                                                             

document.onmousemove = grabMouse;                                             

                                                                              

function popUp(menuName,on) {                                                 

        if (loaded) {        // to avoid stupid errors of Microsoft browsers   

                if (on) {      

//                        moveLayers(); 

                        if (DOM) {     

                                document.getElementById(menuName).style.visibility = "visible";

                        } else if (NS4) {                                    

                                document.layers[menuName].visibility = "show";

                        } else { 

                                document.all[menuName].style.visibility = "visible";

                        }

                } else {

                        if (DOM) {

                                document.getElementById(menuName).style.visibility = "hidden";

                        } else if (NS4) {

                                document.layers[menuName].visibility = "hide";

                        } else {

                                document.all[menuName].style.visibility = "hidden";

                        }

                }

        }

}


function popUpL2() {
shutdown();
popUp('L2',true);
}
function popUpL10() {
shutdown();
popUp('L10',true);
}
function popUpL13() {
shutdown();
popUp('L10',true);
popUp('L13',true);
}
function popUpL18() {
shutdown();
popUp('L10',true);
popUp('L18',true);
}
function popUpL27() {
shutdown();
popUp('L27',true);
}
function popUpL30() {
shutdown();
popUp('L27',true);
popUp('L30',true);
}
function popUpL39() {
shutdown();
popUp('L27',true);
popUp('L39',true);
}
function popUpL48() {
shutdown();
popUp('L48',true);
}
function popUpL51() {
shutdown();
popUp('L48',true);
popUp('L51',true);
}
function popUpL58() {
shutdown();
popUp('L48',true);
popUp('L58',true);
}
function popUpL77() {
shutdown();
popUp('L48',true);
popUp('L77',true);
}
function popUpL82() {
shutdown();
popUp('L82',true);
}
function popUpL85() {
shutdown();
popUp('L82',true);
popUp('L85',true);
}
function popUpL89() {
shutdown();
popUp('L82',true);
popUp('L89',true);
}
function popUpL99() {
shutdown();
popUp('L99',true);
}
function popUpL102() {
shutdown();
popUp('L99',true);
popUp('L102',true);
}
function popUpL110() {
shutdown();
popUp('L99',true);
popUp('L110',true);
}
function popUpL125() {
shutdown();
popUp('L125',true);
}
function popUpL128() {
shutdown();
popUp('L125',true);
popUp('L128',true);
}
function popUpL131() {
shutdown();
popUp('L125',true);
popUp('L131',true);
}
function popUpL136() {
shutdown();
popUp('L136',true);
}
function popUpL139() {
shutdown();
popUp('L136',true);
popUp('L139',true);
}
function popUpL145() {
shutdown();
popUp('L136',true);
popUp('L145',true);
}
function popUpL151() {
shutdown();
popUp('L151',true);
}
function popUpL155() {
shutdown();
popUp('L155',true);
}

function moveLayers() {

if (DOM) {

document.getElementById('L2').style.left = 155;
document.getElementById('L2').style.top = 135;
document.getElementById('L10').style.left = 155;
document.getElementById('L10').style.top = 150;
document.getElementById('L13').style.left = 300;
document.getElementById('L13').style.top = 202.5;
document.getElementById('L18').style.left = 300;
document.getElementById('L18').style.top = 217.5;
document.getElementById('L27').style.left = 155;
document.getElementById('L27').style.top = 165;
document.getElementById('L30').style.left = 300;
document.getElementById('L30').style.top = 217.5;
document.getElementById('L39').style.left = 300;
document.getElementById('L39').style.top = 232.5;
document.getElementById('L48').style.left = 155;
document.getElementById('L48').style.top = 180;
document.getElementById('L51').style.left = 300;
document.getElementById('L51').style.top = 232.5;
document.getElementById('L58').style.left = 300;
document.getElementById('L58').style.top = 247.5;
document.getElementById('L77').style.left = 300;
document.getElementById('L77').style.top = 262.5;
document.getElementById('L82').style.left = 155;
document.getElementById('L82').style.top = 195;
document.getElementById('L85').style.left = 300;
document.getElementById('L85').style.top = 247.5;
document.getElementById('L89').style.left = 300;
document.getElementById('L89').style.top = 262.5;
document.getElementById('L99').style.left = 155;
document.getElementById('L99').style.top = 210;
document.getElementById('L102').style.left = 300;
document.getElementById('L102').style.top = 262.5;
document.getElementById('L110').style.left = 300;
document.getElementById('L110').style.top = 277.5;
document.getElementById('L125').style.left = 155;
document.getElementById('L125').style.top = 225;
document.getElementById('L128').style.left = 300;
document.getElementById('L128').style.top = 277.5;
document.getElementById('L131').style.left = 300;
document.getElementById('L131').style.top = 292.5;
document.getElementById('L136').style.left = 155;
document.getElementById('L136').style.top = 240;
document.getElementById('L139').style.left = 300;
document.getElementById('L139').style.top = 292.5;
document.getElementById('L145').style.left = 300;
document.getElementById('L145').style.top = 307.5;
document.getElementById('L151').style.left = 155;
document.getElementById('L151').style.top = 255;
document.getElementById('L155').style.left = 155;
document.getElementById('L155').style.top = 270;


} else if (NS4) {

document.layers['L2'].left = 155;
document.layers['L2'].top = 135;
document.layers['L10'].left = 155;
document.layers['L10'].top = 150;
document.layers['L13'].left = 300;
document.layers['L13'].top = 202.5;
document.layers['L18'].left = 300;
document.layers['L18'].top = 217.5;
document.layers['L27'].left = 155;
document.layers['L27'].top = 165;
document.layers['L30'].left = 300;
document.layers['L30'].top = 217.5;
document.layers['L39'].left = 300;
document.layers['L39'].top = 232.5;
document.layers['L48'].left = 155;
document.layers['L48'].top = 180;
document.layers['L51'].left = 300;
document.layers['L51'].top = 232.5;
document.layers['L58'].left = 300;
document.layers['L58'].top = 247.5;
document.layers['L77'].left = 300;
document.layers['L77'].top = 262.5;
document.layers['L82'].left = 155;
document.layers['L82'].top = 195;
document.layers['L85'].left = 300;
document.layers['L85'].top = 247.5;
document.layers['L89'].left = 300;
document.layers['L89'].top = 262.5;
document.layers['L99'].left = 155;
document.layers['L99'].top = 210;
document.layers['L102'].left = 300;
document.layers['L102'].top = 262.5;
document.layers['L110'].left = 300;
document.layers['L110'].top = 277.5;
document.layers['L125'].left = 155;
document.layers['L125'].top = 225;
document.layers['L128'].left = 300;
document.layers['L128'].top = 277.5;
document.layers['L131'].left = 300;
document.layers['L131'].top = 292.5;
document.layers['L136'].left = 155;
document.layers['L136'].top = 240;
document.layers['L139'].left = 300;
document.layers['L139'].top = 292.5;
document.layers['L145'].left = 300;
document.layers['L145'].top = 307.5;
document.layers['L151'].left = 155;
document.layers['L151'].top = 255;
document.layers['L155'].left = 155;
document.layers['L155'].top = 270;


} else {

document.all['L2'].style.pixelLeft = 155;
document.all['L2'].style.pixelTop = 135;
document.all['L2'].style.pixelWidth = 145;
document.all['L10'].style.pixelLeft = 155;
document.all['L10'].style.pixelTop = 150;
document.all['L10'].style.pixelWidth = 145;
document.all['L13'].style.pixelLeft = 300;
document.all['L13'].style.pixelTop = 202.5;
document.all['L13'].style.pixelWidth = 145;
document.all['L18'].style.pixelLeft = 300;
document.all['L18'].style.pixelTop = 217.5;
document.all['L18'].style.pixelWidth = 145;
document.all['L27'].style.pixelLeft = 155;
document.all['L27'].style.pixelTop = 165;
document.all['L27'].style.pixelWidth = 145;
document.all['L30'].style.pixelLeft = 300;
document.all['L30'].style.pixelTop = 217.5;
document.all['L30'].style.pixelWidth = 145;
document.all['L39'].style.pixelLeft = 300;
document.all['L39'].style.pixelTop = 232.5;
document.all['L39'].style.pixelWidth = 145;
document.all['L48'].style.pixelLeft = 155;
document.all['L48'].style.pixelTop = 180;
document.all['L48'].style.pixelWidth = 145;
document.all['L51'].style.pixelLeft = 300;
document.all['L51'].style.pixelTop = 232.5;
document.all['L51'].style.pixelWidth = 145;
document.all['L58'].style.pixelLeft = 300;
document.all['L58'].style.pixelTop = 247.5;
document.all['L58'].style.pixelWidth = 145;
document.all['L77'].style.pixelLeft = 300;
document.all['L77'].style.pixelTop = 262.5;
document.all['L77'].style.pixelWidth = 145;
document.all['L82'].style.pixelLeft = 155;
document.all['L82'].style.pixelTop = 195;
document.all['L82'].style.pixelWidth = 145;
document.all['L85'].style.pixelLeft = 300;
document.all['L85'].style.pixelTop = 247.5;
document.all['L85'].style.pixelWidth = 145;
document.all['L89'].style.pixelLeft = 300;
document.all['L89'].style.pixelTop = 262.5;
document.all['L89'].style.pixelWidth = 145;
document.all['L99'].style.pixelLeft = 155;
document.all['L99'].style.pixelTop = 210;
document.all['L99'].style.pixelWidth = 145;
document.all['L102'].style.pixelLeft = 300;
document.all['L102'].style.pixelTop = 262.5;
document.all['L102'].style.pixelWidth = 145;
document.all['L110'].style.pixelLeft = 300;
document.all['L110'].style.pixelTop = 277.5;
document.all['L110'].style.pixelWidth = 145;
document.all['L125'].style.pixelLeft = 155;
document.all['L125'].style.pixelTop = 225;
document.all['L125'].style.pixelWidth = 145;
document.all['L128'].style.pixelLeft = 300;
document.all['L128'].style.pixelTop = 277.5;
document.all['L128'].style.pixelWidth = 145;
document.all['L131'].style.pixelLeft = 300;
document.all['L131'].style.pixelTop = 292.5;
document.all['L131'].style.pixelWidth = 145;
document.all['L136'].style.pixelLeft = 155;
document.all['L136'].style.pixelTop = 240;
document.all['L136'].style.pixelWidth = 145;
document.all['L139'].style.pixelLeft = 300;
document.all['L139'].style.pixelTop = 292.5;
document.all['L139'].style.pixelWidth = 145;
document.all['L145'].style.pixelLeft = 300;
document.all['L145'].style.pixelTop = 307.5;
document.all['L145'].style.pixelWidth = 145;
document.all['L151'].style.pixelLeft = 155;
document.all['L151'].style.pixelTop = 255;
document.all['L151'].style.pixelWidth = 145;
document.all['L155'].style.pixelLeft = 155;
document.all['L155'].style.pixelTop = 270;
document.all['L155'].style.pixelWidth = 145;


}

}

function shutdown() {
popUp('L2',false);
popUp('L10',false);
popUp('L13',false);
popUp('L18',false);
popUp('L27',false);
popUp('L30',false);
popUp('L39',false);
popUp('L48',false);
popUp('L51',false);
popUp('L58',false);
popUp('L77',false);
popUp('L82',false);
popUp('L85',false);
popUp('L89',false);
popUp('L99',false);
popUp('L102',false);
popUp('L110',false);
popUp('L125',false);
popUp('L128',false);
popUp('L131',false);
popUp('L136',false);
popUp('L139',false);
popUp('L145',false);
popUp('L151',false);
popUp('L155',false);
}
if (NS4) {
document.onmousedown = function() { shutdown(); }
} else {
document.onclick = function() { shutdown(); } 
}




var ua=navigator.userAgent.toLowerCase();

temp=ua.indexOf("msie");

if(temp>0){var esie=1;}



function moveLayerY(menuName, ordinata) {


if(document.getElementById(menuName).style.visibility != "visible"){

if (loaded) {        // to avoid stupid errors of Microsoft browsers

if (ordinata != -1 && !isNaN(ordinata)) {        // The browser has detected the mouse position

if (DOM) {

if(esie){scrolldistance=document.body.scrollTop;}else{scrolldistance=0;}

        appoggio = parseInt(document.getElementById(menuName).style.top);

        if (isNaN(appoggio)) appoggio = 0;

        if (Math.abs(appoggio + ordinata_margin - ordinata) > thresholdY)

                document.getElementById(menuName).style.top = ordinata - ordinata_margin - scrolldistance;

} else if (NS4) {

        if (Math.abs(document.layers[menuName].top + ordinata_margin - ordinata) > thresholdY)

                document.layers[menuName].top = ordinata - ordinata_margin;

} else {

        if (Math.abs(document.all[menuName].style.pixelTop + ordinata_margin - ordinata) > thresholdY)

                document.all[menuName].style.pixelTop = ordinata - ordinata_margin;

}

}

}

}

}

// -->

