﻿
/******************************************/
/**** inicio del codigo para el menú   ***/
/*****************************************/
ImageIn = new Array();
ImageOut = new Array();
/**************************************/
ImageIn[0] = new Image();
ImageIn[0].src = "css/Menu/Inicio_In.png";
ImageOut[0] = new Image();
ImageOut[0].src = "css/Menu/Inicio.png";
/**************************************/
ImageIn[1] = new Image();
ImageIn[1].src = "css/Menu/Reserva_In.png";
ImageOut[1] = new Image();
ImageOut[1].src = "css/Menu/Reserva.png";
/**************************************/
ImageIn[2] = new Image();
ImageIn[2].src = "css/Menu/Paquete_In.png";
ImageOut[2] = new Image();
ImageOut[2].src = "css/Menu/Paquete.png";
/**************************************/
ImageIn[3] = new Image();
ImageIn[3].src = "css/Menu/Crucero_In.png";
ImageOut[3] = new Image();
ImageOut[3].src = "css/Menu/Crucero.png";
/**************************************/
ImageIn[4] = new Image();
ImageIn[4].src = "css/Menu/Destino_In.png";
ImageOut[4] = new Image();
ImageOut[4].src = "css/Menu/Destino.png";
/**************************************/
/**************************************/
ImageIn[5] = new Image();
ImageIn[5].src = "css/Menu/Oferta_In.png";
ImageOut[5] = new Image();
ImageOut[5].src = "css/Menu/Oferta.png";
/**************************************/
ImageIn[6] = new Image();
ImageIn[6].src = "css/Menu/ViajeTv_In.png";
ImageOut[6] = new Image();
ImageOut[6].src = "css/Menu/ViajeTv.png";
/**************************************/
ImageIn[7] = new Image();
ImageIn[7].src = "css/Menu/Contacto_In.png";
ImageOut[7] = new Image();
ImageOut[7].src = "css/Menu/Contacto.png";
/**************************************/
/**************************************/
ImageIn[8] = new Image();
ImageIn[8].src = "css/Menu/Canada_In.png";
ImageOut[8] = new Image();
ImageOut[8].src = "css/Menu/Canada.png";
/**************************************/
/**************************************/
ImageIn[9] = new Image();
ImageIn[9].src = "css/Menu/Espectacular_In.png";
ImageOut[9] = new Image();
ImageOut[9].src = "css/Menu/Espectacular.png";
/******************************************/
/**** Fin del codigo para el menú      ***/
/*****************************************/
function over(refer, index) {
    document.images[refer].src = ImageIn[index].src
};

function out(refer, index) {
    document.images[refer].src = ImageOut[index].src
};      

 function BackgroundImage(_image, _src) {
     //document.getElementById(_table).background = img;
     document.getElementById(_image).src = _src;
 }


 function pant_pop() {
     var hWnd = window.open(url, "", "width=710,height=430,top=20,left=50,status=no,resizable=no,scrollbars=no");
     if ((document.window != null) && (!hWnd.opener))
         hWnd.opener = document.window;
 }

function abrir(pagina) {
	window.open(pagina,'window','params');}


 /**************************** Efectos de Texto***************************/
                              /* TEXTO ONDULANTE*/
 /*************************************************************************/
 var theText = "";
 function nextSize(i, incMethod, textLength) {
     if (incMethod == 1) return (72 * Math.abs(Math.sin(i / (textLength / 3.14))));
     if (incMethod == 2) return (255 * Math.abs(Math.cos(i / (textLength / 3.14))));
 }

 function sizeCycle(text, method, dis) {
     output = "";
     for (i = 0; i < text.length; i++) {
         size = parseInt(nextSize(i + dis, method, text.length));
         output += "<font style='font-size: " + size + "pt'>" + text.substring(i, i + 1) + "</font>";
     }
     tdOferta.innerHTML = output;
 }
   
 function doWave(n) {
     sizeCycle(theText, 1, n);
     if (n > theText.length) { n = 0 }
     setTimeout("doWave(" + (n + 1) + ")", 50);
 }
 
 function myWave(mtext){
    theText=mtext;
    doWave(0);
}  
 
/************************************************************************/
/************************************************************************/
function popImage(img,title){
foto = new Image();
foto.src = (img);
ancho = foto.width;
alto = foto.height;
izquierda = (screen.width - ancho) / 2;
arriba = (screen.height - alto) / 2;
cadena = "width =" + ancho + ", height = " + alto + ",top =" + arriba + ",left=" + izquierda ;
window.open(img,'title',cadena);
}

/************************************************************************/
/************************************************************************/
function mygalery(image,thumb) {
    foto = document.images(image);
    foto.src = thumb;
}
/************************************************************************/
/************************************************************************/
    function flasher() {
        if (document.getElementById("flashMe")) {
            var d = document.getElementById("flashMe");
            d.style.color = (d.style.color == 'navy' ? 'orange' : 'navy');
            setTimeout('flasher()', 600);
       }

   }

/* Cerrar capa y abrir otra con otro color de fondo */
function cambiar(capa_superior,color_fondo)
{ 
 document.getElementById(capa_superior).style.display = 'none'; /* Ocultar capa superior */
 document.body.style.background= color_fondo; /* Cambiar color de página */
}


