


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 popUpL1() {
shutdown();
popUp('L1',true);
}
function popUpL9() {
shutdown();
popUp('L9',true);
}
function popUpL12() {
shutdown();
popUp('L9',true);
popUp('L12',true);
}
function popUpL17() {
shutdown();
popUp('L9',true);
popUp('L17',true);
}
function popUpL26() {
shutdown();
popUp('L26',true);
}
function popUpL29() {
shutdown();
popUp('L26',true);
popUp('L29',true);
}
function popUpL38() {
shutdown();
popUp('L26',true);
popUp('L38',true);
}
function popUpL47() {
shutdown();
popUp('L47',true);
}
function popUpL50() {
shutdown();
popUp('L47',true);
popUp('L50',true);
}
function popUpL57() {
shutdown();
popUp('L47',true);
popUp('L57',true);
}
function popUpL76() {
shutdown();
popUp('L47',true);
popUp('L76',true);
}
function popUpL81() {
shutdown();
popUp('L81',true);
}
function popUpL84() {
shutdown();
popUp('L81',true);
popUp('L84',true);
}
function popUpL88() {
shutdown();
popUp('L81',true);
popUp('L88',true);
}
function popUpL98() {
shutdown();
popUp('L98',true);
}
function popUpL101() {
shutdown();
popUp('L98',true);
popUp('L101',true);
}
function popUpL109() {
shutdown();
popUp('L98',true);
popUp('L109',true);
}
function popUpL124() {
shutdown();
popUp('L124',true);
}
function popUpL127() {
shutdown();
popUp('L124',true);
popUp('L127',true);
}
function popUpL130() {
shutdown();
popUp('L124',true);
popUp('L130',true);
}
function popUpL135() {
shutdown();
popUp('L135',true);
}
function popUpL138() {
shutdown();
popUp('L135',true);
popUp('L138',true);
}
function popUpL144() {
shutdown();
popUp('L135',true);
popUp('L144',true);
}
function popUpL150() {
shutdown();
popUp('L150',true);
}
function popUpL154() {
shutdown();
popUp('L154',true);
}

function moveLayers() {

if (DOM) {

document.getElementById('L1').style.left = 155;
document.getElementById('L1').style.top = 120;
document.getElementById('L9').style.left = 155;
document.getElementById('L9').style.top = 135;
document.getElementById('L12').style.left = 300;
document.getElementById('L12').style.top = 187.5;
document.getElementById('L17').style.left = 300;
document.getElementById('L17').style.top = 202.5;
document.getElementById('L26').style.left = 155;
document.getElementById('L26').style.top = 150;
document.getElementById('L29').style.left = 300;
document.getElementById('L29').style.top = 202.5;
document.getElementById('L38').style.left = 300;
document.getElementById('L38').style.top = 217.5;
document.getElementById('L47').style.left = 155;
document.getElementById('L47').style.top = 165;
document.getElementById('L50').style.left = 300;
document.getElementById('L50').style.top = 217.5;
document.getElementById('L57').style.left = 300;
document.getElementById('L57').style.top = 232.5;
document.getElementById('L76').style.left = 300;
document.getElementById('L76').style.top = 247.5;
document.getElementById('L81').style.left = 155;
document.getElementById('L81').style.top = 180;
document.getElementById('L84').style.left = 300;
document.getElementById('L84').style.top = 232.5;
document.getElementById('L88').style.left = 300;
document.getElementById('L88').style.top = 247.5;
document.getElementById('L98').style.left = 155;
document.getElementById('L98').style.top = 195;
document.getElementById('L101').style.left = 300;
document.getElementById('L101').style.top = 247.5;
document.getElementById('L109').style.left = 300;
document.getElementById('L109').style.top = 262.5;
document.getElementById('L124').style.left = 155;
document.getElementById('L124').style.top = 210;
document.getElementById('L127').style.left = 300;
document.getElementById('L127').style.top = 262.5;
document.getElementById('L130').style.left = 300;
document.getElementById('L130').style.top = 277.5;
document.getElementById('L135').style.left = 155;
document.getElementById('L135').style.top = 225;
document.getElementById('L138').style.left = 300;
document.getElementById('L138').style.top = 277.5;
document.getElementById('L144').style.left = 300;
document.getElementById('L144').style.top = 292.5;
document.getElementById('L150').style.left = 155;
document.getElementById('L150').style.top = 240;
document.getElementById('L154').style.left = 155;
document.getElementById('L154').style.top = 255;


} else if (NS4) {

document.layers['L1'].left = 155;
document.layers['L1'].top = 120;
document.layers['L9'].left = 155;
document.layers['L9'].top = 135;
document.layers['L12'].left = 300;
document.layers['L12'].top = 187.5;
document.layers['L17'].left = 300;
document.layers['L17'].top = 202.5;
document.layers['L26'].left = 155;
document.layers['L26'].top = 150;
document.layers['L29'].left = 300;
document.layers['L29'].top = 202.5;
document.layers['L38'].left = 300;
document.layers['L38'].top = 217.5;
document.layers['L47'].left = 155;
document.layers['L47'].top = 165;
document.layers['L50'].left = 300;
document.layers['L50'].top = 217.5;
document.layers['L57'].left = 300;
document.layers['L57'].top = 232.5;
document.layers['L76'].left = 300;
document.layers['L76'].top = 247.5;
document.layers['L81'].left = 155;
document.layers['L81'].top = 180;
document.layers['L84'].left = 300;
document.layers['L84'].top = 232.5;
document.layers['L88'].left = 300;
document.layers['L88'].top = 247.5;
document.layers['L98'].left = 155;
document.layers['L98'].top = 195;
document.layers['L101'].left = 300;
document.layers['L101'].top = 247.5;
document.layers['L109'].left = 300;
document.layers['L109'].top = 262.5;
document.layers['L124'].left = 155;
document.layers['L124'].top = 210;
document.layers['L127'].left = 300;
document.layers['L127'].top = 262.5;
document.layers['L130'].left = 300;
document.layers['L130'].top = 277.5;
document.layers['L135'].left = 155;
document.layers['L135'].top = 225;
document.layers['L138'].left = 300;
document.layers['L138'].top = 277.5;
document.layers['L144'].left = 300;
document.layers['L144'].top = 292.5;
document.layers['L150'].left = 155;
document.layers['L150'].top = 240;
document.layers['L154'].left = 155;
document.layers['L154'].top = 255;


} else {

document.all['L1'].style.pixelLeft = 155;
document.all['L1'].style.pixelTop = 120;
document.all['L1'].style.pixelWidth = 145;
document.all['L9'].style.pixelLeft = 155;
document.all['L9'].style.pixelTop = 135;
document.all['L9'].style.pixelWidth = 145;
document.all['L12'].style.pixelLeft = 300;
document.all['L12'].style.pixelTop = 187.5;
document.all['L12'].style.pixelWidth = 145;
document.all['L17'].style.pixelLeft = 300;
document.all['L17'].style.pixelTop = 202.5;
document.all['L17'].style.pixelWidth = 145;
document.all['L26'].style.pixelLeft = 155;
document.all['L26'].style.pixelTop = 150;
document.all['L26'].style.pixelWidth = 145;
document.all['L29'].style.pixelLeft = 300;
document.all['L29'].style.pixelTop = 202.5;
document.all['L29'].style.pixelWidth = 145;
document.all['L38'].style.pixelLeft = 300;
document.all['L38'].style.pixelTop = 217.5;
document.all['L38'].style.pixelWidth = 145;
document.all['L47'].style.pixelLeft = 155;
document.all['L47'].style.pixelTop = 165;
document.all['L47'].style.pixelWidth = 145;
document.all['L50'].style.pixelLeft = 300;
document.all['L50'].style.pixelTop = 217.5;
document.all['L50'].style.pixelWidth = 145;
document.all['L57'].style.pixelLeft = 300;
document.all['L57'].style.pixelTop = 232.5;
document.all['L57'].style.pixelWidth = 145;
document.all['L76'].style.pixelLeft = 300;
document.all['L76'].style.pixelTop = 247.5;
document.all['L76'].style.pixelWidth = 145;
document.all['L81'].style.pixelLeft = 155;
document.all['L81'].style.pixelTop = 180;
document.all['L81'].style.pixelWidth = 145;
document.all['L84'].style.pixelLeft = 300;
document.all['L84'].style.pixelTop = 232.5;
document.all['L84'].style.pixelWidth = 145;
document.all['L88'].style.pixelLeft = 300;
document.all['L88'].style.pixelTop = 247.5;
document.all['L88'].style.pixelWidth = 145;
document.all['L98'].style.pixelLeft = 155;
document.all['L98'].style.pixelTop = 195;
document.all['L98'].style.pixelWidth = 145;
document.all['L101'].style.pixelLeft = 300;
document.all['L101'].style.pixelTop = 247.5;
document.all['L101'].style.pixelWidth = 145;
document.all['L109'].style.pixelLeft = 300;
document.all['L109'].style.pixelTop = 262.5;
document.all['L109'].style.pixelWidth = 145;
document.all['L124'].style.pixelLeft = 155;
document.all['L124'].style.pixelTop = 210;
document.all['L124'].style.pixelWidth = 145;
document.all['L127'].style.pixelLeft = 300;
document.all['L127'].style.pixelTop = 262.5;
document.all['L127'].style.pixelWidth = 145;
document.all['L130'].style.pixelLeft = 300;
document.all['L130'].style.pixelTop = 277.5;
document.all['L130'].style.pixelWidth = 145;
document.all['L135'].style.pixelLeft = 155;
document.all['L135'].style.pixelTop = 225;
document.all['L135'].style.pixelWidth = 145;
document.all['L138'].style.pixelLeft = 300;
document.all['L138'].style.pixelTop = 277.5;
document.all['L138'].style.pixelWidth = 145;
document.all['L144'].style.pixelLeft = 300;
document.all['L144'].style.pixelTop = 292.5;
document.all['L144'].style.pixelWidth = 145;
document.all['L150'].style.pixelLeft = 155;
document.all['L150'].style.pixelTop = 240;
document.all['L150'].style.pixelWidth = 145;
document.all['L154'].style.pixelLeft = 155;
document.all['L154'].style.pixelTop = 255;
document.all['L154'].style.pixelWidth = 145;


}

}

function shutdown() {
popUp('L1',false);
popUp('L9',false);
popUp('L12',false);
popUp('L17',false);
popUp('L26',false);
popUp('L29',false);
popUp('L38',false);
popUp('L47',false);
popUp('L50',false);
popUp('L57',false);
popUp('L76',false);
popUp('L81',false);
popUp('L84',false);
popUp('L88',false);
popUp('L98',false);
popUp('L101',false);
popUp('L109',false);
popUp('L124',false);
popUp('L127',false);
popUp('L130',false);
popUp('L135',false);
popUp('L138',false);
popUp('L144',false);
popUp('L150',false);
popUp('L154',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;

}

}

}

}

}

// -->

