var isDOM = document.getElementById?1:0;
var isIE = document.all?1:0;
var isNS4 = (navigator.appName=='Netscape' && !isDOM)?1:0;
var isIE4 = (isIE && !isDOM)?1:0;
var isDyn = (isDOM||isIE4||isNS4);
function getRef(id, par)
{
 par = (!par ? document : (par.navigator ? par.document : par));
 return (isIE ? par.all[id] :
  (isDOM ? (par.getElementById?par:par.ownerDocument).getElementById(id) :
  par.layers[id]));
}
function getSty(id, par)
{
 return (isNS4 ? getRef(id, par) : getRef(id, par).style)
}
if (!window.LayerObj) var LayerObj = new Function('id', 'par',
 'this.ref=getRef(id, par); this.sty=getSty(id, par); return this');
function getLyr(id, par) { return new LayerObj(id, par) }
function LyrFn(fn, fc)
{
 LayerObj.prototype[fn] = new Function('var a=arguments,p=a[0]; with (this) { '+fc+' }');
}
LyrFn('x','if (!isNaN(a[0])) sty.left=p; else return parseInt(sty.left)');
LyrFn('y','if (!isNaN(a[0])) sty.top=p; else return parseInt(sty.top)');
LyrFn('vis','sty.visibility=p');
LyrFn('bgColor','if (isNS4) sty.bgColor=(p?p:null); ' +
 'else sty.backgroundColor=(p?p:"transparent") ');
LyrFn('bgImage','if (isNS4) sty.background.src=(p?p:null); ' + 
  'else sty.backgroundImage=(p?"url("+p+")":"") ');
LyrFn('write','if (isNS4) with (ref.document) {write(p);close()} else ref.innerHTML=p');
function setLyr(lVis, docW, par)
{
 if (!this.seq) seq = 0;
 if (!docW) docW = 0;
 var obj = (!par ? (isNS4 ? window : document.body) :
  (!isNS4 && par.navigator ? par.document.body : par));
 var newID = '_js_layer_' + seq++;
 if (isIE) obj.insertAdjacentHTML('beforeEnd', '<div id="' + newID +
  '" style="position:absolute"></div>');
 else if (isDOM)
 {
  var newL = document.createElement('div');
  obj.appendChild(newL);
  with (newL) { id = newID; style.position='absolute' }
 }
 else if (isNS4)
 {
  var newL = new Layer(docW, obj);
  newID = newL.id;
 }
 var lObj = getLyr(newID, par);
 with (lObj) { vis(lVis); x(0); y(0); sty.width=docW }
 return lObj;
}
function popOver(mN, iN) { with (this)
{
 clearTimeout(hideTimer);
 overM = mN;
 overI = iN;
 var thisI = menu[mN][iN];
 if (iN && this.onmouseover) this.onmouseover();
 litOld = litNow;
 litNow = new Array();
 var litM = mN, litI = iN;
 while(1)
 {
  litNow[litM] = litI;
    if (litM == 'root') break;
   litI = menu[litM][0].parentItem;
  litM = menu[litM][0].parentMenu;
 }
 var same = true;
 for (var z in menu) if (litNow[z] != litOld[z]) same = false;
 if (same) return;
 for (thisM in menu)
 {
  if (!menu[thisM][0].lyr) continue;
  litI = litNow[thisM];
  oldI = litOld[thisM];
   if (litI && (litI != oldI)) changeCol(thisM, litI, true);
  if (oldI && (oldI != litI)) changeCol(thisM, oldI, false);
  if (isNaN(litI)) { menu[thisM][0].lyr.vis('hidden') }
 }
 clearTimeout(showTimer);
 nextMenu = '';
 if (thisI.type == 'sm:')
 {
  var targ = thisI.href, lyrM = menu[mN][0].lyr;
  with (menu[targ][0])
  {
   if (!lyr) update(targ);
   lyr.x(eval(offX) + (typeof(offX)=='number' ? lyrM.x() + thisI.lyr.x() : 0));
   lyr.y(eval(offY) + (typeof(offY)=='number' ? lyrM.y() + thisI.lyr.y() : 0));
   showStr = myName + '.menu.' + targ + '[0].lyr.vis("visible")';
   nextMenu = targ;
   if (showDelay) showTimer = setTimeout(showStr, showDelay);
   else eval(showStr);
  }
 }
}}
function popChangeCol(mN, iN, isOver) { with (this.menu[mN][iN])
{
 var col = isOver ? overCol : outCol;
 if (col.indexOf('.') == -1) lyr.bgColor(col);
 else lyr.bgImage(col);
 if ((overClass == outClass) && (outBorder == overBorder)) return;
 if (isNS4) lyr.write(this.getHTML(mN, iN, isOver));
 else with (lyr.ref)
 {
  className = (isOver ? overBorder : outBorder);
  var chl = (isDOM ? childNodes : children)
  for (var i = 0; i < chl.length; i++) chl[i].className = (isOver ? overClass : outClass);
 }
}}
function popOut(mN, iN) { with (this)
{
 if ((mN != overM) || (iN != overI)) return;
 if (this.onmouseout) this.onmouseout();
 var thisI = menu[mN][iN];
 if (thisI.href != nextMenu) clearTimeout(showTimer);
 if (hideDelay)
 {
  var delay = ((mN == 'root') && (thisI.type != 'sm:')) ? 50 : hideDelay;
  hideTimer = setTimeout(myName + '.over("root", 0)', delay);
 }
 overM = 'root';
 overI = 0;
}}
function popClick(evt) { with (this)
{
 if (overI)
 {
  if (this.onclick) this.onclick();
  var thisI = menu[overM][overI];
  with (thisI) switch (type)
  {
   case 'sm:': return;
   case 'js:': { eval(href); break }
   case '': type = 'window';
   default: if (href) eval(type + '.location.href = "' + href + '"');
  }
 }
 over('root', 0);
}}
function popClearLyr(wN) { with (this)
{
 for (mN in menu) with (menu[mN][0]) if (par == wN) lyr = null;
}}
function addProps(obj, data, names, addNull)
{
 for (var i = 0; i < names.length; i++) if(i < data.length || addNull) obj[names[i]] = data[i];
}

function ItemStyle()
{
  var names = ['len', 'spacing', 'popInd', 'popPos', 'pad', 'outCol', 'overCol', 'outClass',
  'overClass', 'outBorder', 'overBorder'];
 addProps(this, arguments, names, true);
}

function popStartMenu(mName) { with (this)
{
 if (!menu[mName]) { menu[mName] = new Array(); menu[mName][0] = new Object(); }
 actMenu = mName;
 menu[mName].length = 1;
 nextItem = 1;
 var aM = menu[mName][0];
 var names = ['isVert', 'isVert', 'offX','offY', 'width', 'itemSty', 'par', 'parentMenu',
  'parentItem'];
 addProps(aM, arguments, names, true);
 if (!aM.lyr) aM.lyr = null;
}}
function popAddItem() { with (this)
{
 var aI = menu[actMenu][nextItem++] = new Object();
 var names = ['text', 'href', 'type', 'itemSty', 'len', 'spacing', 'popInd', 'popPos',
  'iW', 'iH', 'lyr'];
 addProps(aI, arguments, names, true);
 var iSty = (arguments[3] ? arguments[3] : menu[actMenu][0].itemSty);
 for (prop in iSty) if (aI[prop] == window.UnDeFiNeD) aI[prop] = iSty[prop];
 if (isNS4 && aI.outBorder) aI.pad++;
}}
function popGetHTML(mN, iN, isOver) { with (this)
{
 var itemStr = '';
 with (menu[mN][iN])
 {
  var textClass = (isOver ? overClass : outClass);
    if ((type == 'sm:') && popInd)
  {
   if (isNS4) itemStr += '<layer class="' + textClass + '" left="'+ ((popPos+iW) % iW) +
    '" top="' + pad + '">' + popInd + '</layer>';
   else itemStr += '<div class="' + textClass + '" style="position: absolute; left: ' +
    ((popPos+iW) % iW) + '; top: ' + pad + '">' + popInd + '</div>';
  }

  if (isNS4) itemStr += (outBorder ? '<span class="' + (isOver ? overBorder : outBorder) +
   '"><spacer type="block" width="' + (iW - 8) + '" height="' + (iH - 8) + '"></span>' : '') +
   '<layer left="' + pad + '" top="' + pad + '" width="' + (iW - (2 * pad)) + '" height="' +
   (iH - (2 * pad)) + '"><a class="' + textClass + '" href="#" ' +
   'onClick="return false" onMouseOver="status=\'\'; ' + myName + '.over(\'' + mN + '\',' +
   iN + '); return true">' + text + '</a></layer>';
  else itemStr += '<div class="' + textClass + '" style="position: absolute; left: ' + pad +
   '; top: ' + pad + '; width: ' + (iW - (2 * pad)) + '; height: ' + (iH - (2 * pad)) +
   '">' + text + '</div>';
 }
 return itemStr;
}}
function popUpdate(upMN) { with (this)
{
 if (!isDyn) return;
 for (mN in menu) with (menu[mN][0])
 {
  if (upMN && (upMN != mN)) continue;
  var eP = eval(par);
  if (eP && eP.navigator && (eP.document.readyState != 'complete')) continue;
  var str = '', iX = 0, iY = 0;
  for (var iN = 1; iN < menu[mN].length; iN++) with (menu[mN][iN])
  {
   var itemID = myName + '_' + mN + '_' + iN;
   if (type == 'sm:')
   {
    menu[href][0].parentMenu = mN;
    menu[href][0].parentItem = iN;
   }
   var shrink = (outBorder && isDOM && !isIE ? 2 : 0)
   iW = (isVert ? width : len) - shrink;
   iH = (isVert ? len : width) - shrink;
   var isImg = (outCol.indexOf('.') != -1) ? true : false;
   if (isDOM || isIE4)
   {
    str += '<div id="' + itemID + '" ' + (outBorder ? 'class="' + outBorder + '" ' : '') +
     'style="position: absolute; left: ' + iX + '; top: ' + iY + '; width: ' + iW + '; height: ' +
     iH + '; ' + (outCol ? 'background: ' + (isImg ? 'url('+ outCol+')' : outCol) : '') + '" ';
   }
   if (isNS4)
   {
    str += '<layer id="' + itemID + '" left="' + iX + '" top="' + iY + '" width="' +
     iW + '" height="' + iH + '" ' + (outCol ? (isImg ? 'background="' : 'bgcolor="') +
     outCol + '" ' : '');
   }
   str += 'onMouseOver="' + myName + '.over(\'' + mN + '\',' + iN + ')" ' +
     'onMouseOut="' + myName + '.out(\'' + mN + '\',' + iN + ')">' +
     getHTML(mN, iN, false) + (isNS4 ? '</layer>' : '</div>');
   var spc = (outBorder ? 1 : 0)
   if (isVert) iY += len + spacing - spc;
   else iX += len + spacing - spc;
  }
  if (!lyr) lyr = setLyr('hidden', 3, eval(par));
  else if (isIE4) setTimeout(myName + '.menu.' + mN + '[0].lyr.sty.width=9', 50);
  with (lyr) { sty.zIndex = 1000; write(str); sty.cursor = (isIE ? 'hand' : 'pointer') }
  for (var i = 1; i < menu[mN].length; i++)
   menu[mN][i].lyr = getLyr(myName + '_' + mN + '_' + i, lyr.ref);
 }
 position();
 menu.root[0].lyr.vis('visible');
}}
function popPosition(wN) { with (this)
{
 for (mN in menu) if (!wN || menu[mN][0].par == wN) with (menu[mN][0])
 {
  if (!lyr) return;
  if (typeof(offX)!='number' || mN=='root') lyr.x(eval(offX));
  if (typeof(offY)!='number' || mN=='root') lyr.y(eval(offY));
 }
}}
function PopupMenu(myName)
{
 this.myName = myName;
 this.showTimer = 0;
 this.hideTimer = 0;
 this.showDelay = 0;
 this.hideDelay = 500;
 this.showMenu = '';
 this.menu =  new Array();
 this.litNow = new Array();
 this.litOld = new Array();
 this.overM = 'root';
 this.overI = 0;
 this.actMenu = '';
 this.nextItem = 1;
 this.over = popOver;
 this.changeCol = popChangeCol;
 this.out = popOut;
 this.click = popClick;
 this.clearLyr = popClearLyr;
 this.startMenu = popStartMenu;
 this.addItem = popAddItem;
 this.getHTML = popGetHTML;
 this.update = popUpdate;
 this.position = popPosition;
}
var hBar = new ItemStyle(100, 10, '', 0, 0, '', '#3ec14f', '', 'itemText', 'itemText', '');
var subM = new ItemStyle(22, 0, '>', -15, 3, '#0080ff', '#3EC14F', 'itemText', 'itemHover',
 'itemBorder', 'itemBorder');
var puuc = new ItemStyle('itemText', 'itemText');
var croute=new ItemStyle ('itemText', 'itemText');
var eroute=new ItemStyle ('itemText', 'itemText');
var wroute=new ItemStyle ('itemText', 'itemText');
var nroute=new ItemStyle ('itemText', 'itemText');
var bec=new ItemStyle ('itemText', 'itemText');
var accomm = new ItemStyle('itemText', 'itemText');
var cars = new ItemStyle('itemText', 'itemText');
var dtours= new ItemStyle('itemText', 'itemText');
var playa= new ItemStyle ('itemText', 'itemText');
var isla= new ItemStyle ('itemText', 'itemText');
var akumal= new ItemStyle ('itemText', 'itemText');
var tulum= new ItemStyle ('itemText', 'itemText');
var bacalar= new ItemStyle ('itemText', 'itemText');
var chetumal= new ItemStyle ('itemText','itemText');
var holbox= new ItemStyle ('itemText', 'itemText');
var valla= new ItemStyle ('itemText', 'itemText');
var chichen= new ItemStyle ('itemText', 'itemText');
var merida= new ItemStyle ('itemText', 'itemText');
var campeche= new ItemStyle ('itemText', 'itemText');
var uxmal= new ItemStyle ('itemText', 'itemText');
var chica= new ItemStyle ('itemText', 'itemText');
var celestun= new ItemStyle ('itemText', 'itemText');
var progreso= new ItemStyle ('itemText', 'itemText');
var merida= new ItemStyle ('itemText', 'itemText');
var pMenu = new PopupMenu('pMenu');
with (pMenu)
{
startMenu('root', false, 10, 0, 17, hBar);
addItem('<b><center>Business profile</b></center>', 'mBiz', 'sm:');
addItem('<b><center>Mayan Routes</b></center>', 'mRoute', 'sm:');
addItem('<b><center>Accommodations</b></center>', 'mServ',  'sm:');
addItem('<b><center>Car rentals</b></center>', 'Mcar',  'sm:');
addItem('<b><center>Day tours</b></center>', 'Dtours',  'sm:');
addItem('<b><center>Home Page</b></center>', 'http://www.yucatantravel.com/', '', hBar, 80);
startMenu('mBiz', true, 0, 22, 110, subM);
addItem('About jop', 'http://www.yucatantravel.com/ejop.html', '');
addItem('Reservation policy', 'http://www.yucatantravel.com/ytrespolicy.html', '');
addItem('Testimonial', 'http://www.yucatantravel.com/Guestbook/guestbook.html', '');
addItem('Faq section', 'http://www.yucatantravel.com/Faq.html', '');
addItem('Email', 'mailto:jop@yucatantravel.com', '');
addItem('Call/Fax: Mexico<br>52(999)987-4451 and 52 (999)285-7467','#', '', subM, 90);
startMenu('mRoute', true, 0, 22, 100, subM);
addItem('Puuc route', 'Mpuuc', 'sm:', subM, 22, 0, '', 3);
addItem('Conventos route', 'Croute', 'sm:', subM, 22, 0, '', 3);
addItem('Eternal East', 'Eroute', 'sm:', subM, 22, 0, '', 3);
addItem('Tradition & Eco..', 'Wroute', 'sm:', subM, 22, 0, '', 3);
addItem('Towards the sea', 'Nroute', 'sm:', subM, 22, 0, '', 3);
addItem('Bec route', 'Broute', 'sm:', subM, 22, 0, '', 3);
startMenu('mServ', true, 0, 22, 100, subM);
addItem('Locations', 'Maccomm', 'sm:', subM, 22, 0, '', 3);
startMenu('Maccomm', true, 100, 0, 80, accomm);
addItem('Playa del Carmen', 'Mplaya', 'sm:', subM);
addItem('Isla Mujeres', 'Misla', 'sm:', subM);
addItem('Akumal', 'Makumal', 'sm:', subM);
addItem('Tulum', 'Mtulum', 'sm:', subM);
addItem('Bacalar', 'Mbacalar', 'sm:', subM);
addItem('Chetumal', 'Mchet', 'sm:', subM);
addItem('Holbox', 'Mholbox', 'sm:', subM);
addItem('Valladolid', 'Mvalla', 'sm:', subM);
addItem('Chichen', 'Mchichen', 'sm:', subM);
addItem('Merida', 'Mid', 'sm:', subM);
addItem('Campeche', 'Mcam', 'sm:', subM);
addItem('Uxmal', 'Muxmal', 'sm:', subM);
addItem('Rio Bec', 'Mchica', 'sm:', subM);
addItem('Celestun', 'Celestun', 'sm:', subM);
startMenu('Mcar', true, 0, 22, 100, subM);
addItem('Cancun', 'http://www.mayanroutes.com/rentals/cancun/rentacar.html', '', subM);
addItem('Merida', 'http://www.mayanroutes.com/rentacar.html', '', subM);
addItem('Chetumal', 'http://www.yucatantravel.com/rentals/chetumal/cheturentacar.html', '', subM);
startMenu('Dtours', true, 0, 22, 100, subM);
addItem('Merida', 'Merida', 'sm:', subM, 22, 0, '', 3);
addItem('Progreso', 'Progreso', 'sm:', subM, 22, 0, '', 3);
startMenu('Mplaya', true, 80, 0, 130, playa);
addItem('Shangri La cabanas', 'http://www.mayanroutes.com/hotels/playadelcarmen/index.html', '', subM);
startMenu('Misla', true, 80, 0, 130, isla);
addItem('Posada del Mar hotel', 'http://www.yucatantravel.com/hotels/islamujeres/pdmfactsheet.html', '', subM);
startMenu('Makumal', true, 80, 0, 180, akumal);
addItem('Hacienda Tortuga condos', 'http://www.yucatantravel.com/condominiums/akumal/suites.htm', '', subM);
addItem('Iguana 5, private condo', 'http://www.yucatantravel.com/condominiums/akumal/iguana.htm', '', subM);
addItem('Clickable map', 'http://www.yucatantravel.com/condominiums/akumal/index.html', '', subM);
startMenu('Mtulum', true, 80, 0, 160, tulum);
addItem('Piedra Escondida cabanas', 'http://www.yucatantravel.com/hotels/tulum/piesfactsheet.html', '', subM);
addItem('Los Lirios cabanas', 'http://www.yucatantravel.com/hotels/tulum/liriosfactsheet.html', '', subM);
addItem('Cabanas Tulum bungalows', 'http://www.yucatantravel.com/hotels/tulum/ctfactsheet.html', '', subM, 35);
addItem('Clickable map', 'http://www.yucatantravel.com/hotels/tulum/index.html', '', subM);
startMenu('Mbacalar', true, 80, 0, 140, bacalar);
addItem('Hotel Laguna', 'http://www.yucatantravel.com/hotels/bacalar/index.html', '', subM);
startMenu('Mchet', true, 80, 0, 140, chetumal);
addItem('Hotel Noor', 'http://www.yucatantravel.com/hotels/chetumal/index.html', '', subM);
startMenu('Mholbox', true, 80, 0, 140, holbox);
addItem('Villa Delfines cabanas', 'http://www.mayanroutes.com/hotels/holbox/index.html', '', subM);
startMenu('Mvalla', true, 80, 0, 150, valla);
addItem('Meson del Marques hotel', 'http://www.mayanroutes.com/hotels/valladolid/index.html', '', subM);
startMenu('Mchichen', true, 80, 0, 150, chichen);
addItem('Felix Inn', 'http://www.mayanroutes.com/hotels/chichen/felixinn.html', '', subM);
addItem('Mayaland hotel', 'http://www.mayanroutes.com/hotels/chichen/mlandfactsheet.html', '', subM);
addItem('Villas Arqueologicas hotel', 'http://www.mayanroutes.com/hotels/chichen/varfactsheet.html', '', subM);
addItem('Clickable map', 'http://www.yucatantravel.com/hotels/chichen/chichenmap.html', '', subM);
startMenu('Mid', true, 80, 0, 140, merida);
addItem('Caribe hotel', 'http://www.mayanroutes.com/hotels/merida/hcfactsheet.html', '', subM);
addItem('Fray Diego hotel', 'http://www.mayanroutes.com/hotels/merida/fdfactsheet.html', '', subM);
addItem('The Studio (long term)', 'http://www.yucatantravel.com/rentals/merida/studio.html', '', subM);
startMenu('Mcam', true, 80, 0, 140, campeche);
addItem('Castelmar hotel', 'http://www.yucatantravel.com/hotels/campeche/index.html', '', subM);
startMenu('Muxmal', true, 80, 0, 150, uxmal);
addItem('Hacienda Uxmal hotel', 'http://www.mayanroutes.com/hotels/uxmal/haufactsheet.html', '', subM);
addItem('The Lodge Uxmal hotel', 'http://www.mayanroutes.com/hotels/uxmal/lodgefactsheet.html', '', subM);
addItem('Clickable map', 'http://www.mayanroutes.com/hotels/uxmal/index.html', '', subM);
startMenu('Mchica', true, 80, 0, 120, chica);
addItem('Chicanna Ecovillage', 'http://www.mayanroutes.com/hotels/calakmul/index.html', '', subM, 40);
addItem('Debliz Xpujil hotel', 'http://www.yucatantravel.com/hotels/xpujil/index.html', '', subM, 40);
addItem('Puerta Calakmul jungle lodge', 'http://www.yucatantravel.com/hotels/calakmul/index.html', '', subM, 40);
startMenu('Celestun', true, 80, 0, 120, celestun);
addItem('The Flamingo Playa hotel', 'http://www.yucatantravel.com/hotels/celestun/fpfactsheet.html', '', subM);
addItem('The Manglares  hotel', 'http://www.yucatantravel.com/hotels/celestun/manglares.html', '', subM);
startMenu('Mpuuc' , true, 100, 0, 100, puuc);
addItem('Clickable map', 'http://www.mayanroutes.com/puuc.html', '', subM);
addItem('Mérida', 'http://www.mayanroutes.com/midinfo.html', '', subM);
addItem('Umán', 'http://www.mayanroutes.com/uman.html', '', subM);
addItem('Chocholá', 'http://www.mayanroutes.com/chochola.html', '', subM);
addItem('Maxcanú', 'http://www.mayanroutes.com/maxcanu.html', '', subM);
addItem('Oxkintok', 'http://www.mayanroutes.com/oxkintok.html', '', subM);
addItem('Calcehtok', 'http://www.mayanroutes.com/calcehtok.html', '', subM);
addItem('Muna', 'http://www.mayanroutes.com/muna.html', '', subM);
addItem('Uxmal', 'http://www.mayanroutes.com/uxmal.html', '', subM);
addItem('Kabáh', 'http://www.mayanroutes.com/kabah.html', '', subM);
addItem('Sayil', 'http://www.mayanroutes.com/sayil.html', '', subM);
addItem('Xlapak', 'http://www.mayanroutes.com/xlapak.html', '', subM);
addItem('Labná', 'http://www.mayanroutes.com/labna.html', '', subM);
addItem('Loltún', 'http://www.mayanroutes.com/loltun.html', '', subM);
addItem('Oxcutzcab', 'http://www.mayanroutes.com/oxcutzcab.html', '', subM);
addItem('Maní', 'http://www.mayanroutes.com/mani.html', '', subM);
addItem('Ticul', 'http://www.mayanroutes.com/ticul.html', '', subM);
startMenu('Croute' , true, 100, 0, 100, croute);
addItem('Clickable map', 'http://www.mayanroutes.com/croute.html', '', subM);
addItem('Mérida', 'http://www.mayanroutes.com/midinfo.html', '', subM);
addItem('Umán', 'http://www.mayanroutes.com/uman.html', '', subM);
addItem('Yaxcopoil', 'http://www.mayanroutes.com/yaxcopoil.html', '', subM);
addItem('Muna', 'http://www.mayanroutes.com/muna.html', '', subM);
addItem('Ticul', 'http://www.mayanroutes.com/ticul.html', '', subM);
addItem('Oxcutzcab', 'http://www.mayanroutes.com/oxcutzcab.html', '', subM);
addItem('Maní', 'http://www.mayanroutes.com/mani.html', '', subM);
addItem('Tipikal', 'http://www.mayanroutes.com/tipikal.html', '', subM);
addItem('Teabo', 'http://www.mayanroutes.com/teabo.html', '', subM);
addItem('Chumayel', 'http://www.mayanroutes.com/chumayel.html', '', subM);
addItem('Mama', 'http://www.mayanroutes.com/mama.html', '', subM);
addItem('Tekit', 'http://www.mayanroutes.com/tekit.html', '', subM);
addItem('Mayapán', 'http://www.mayanroutes.com/mayapan.html', '', subM);
addItem('Telchaquillo', 'http://www.mayanroutes.com/telchaquillo.html', '', subM);
addItem('Tekóh', 'http://www.mayanroutes.com/tecoh.html', '', subM);
addItem('Acancéh', 'http://www.mayanroutes.com/acanceh.html', '', subM);
addItem ('Kanasín', 'http://www.mayanroutes.com/kanasin.html', '', subM);
startMenu('Eroute' , true, 100, 0, 100, eroute);
addItem('Clickable map', 'http://www.mayanroutes.com/eroute.html', '', subM);
addItem('Mérida', 'http://www.mayanroutes.com/midinfo.html', '', subM);
addItem('Teyá', 'http://www.mayanroutes.com/teya.html', '', subM);
addItem('Katanchel', 'http://www.mayanroutes.com/katanchel.html', '', subM);
addItem('Izamal', 'http://www.mayanroutes.com/izamal.html', '', subM);
addItem('Chichén Itzá', 'http://www.mayanroutes.com/chichen.html', '', subM);
addItem('Balamkanché', 'http://www.mayanroutes.com/balamkanche.html', '', subM);
addItem('Valladolid', 'http://www.mayanroutes.com/valladolid.html', '', subM);
addItem('Ekbalam', 'http://www.mayanroutes.com/ekbalam.html', '', subM);
addItem('Tizimín', 'http://www.mayanroutes.com/tizimin.html', '', subM);
addItem('Río Lagartos', 'http://www.mayanroutes.com/riolagartos.html', '', subM);
addItem('San Felipe', 'http://www.mayanroutes.com/snfel.html', '', subM);
startMenu('Wroute' , true, 100, 0, 100, wroute);
addItem('Clickable map', 'http://www.mayanroutes.com/wroute.html', '', subM);
addItem('Mérida', 'http://www.mayanroutes.com/midinfo.html', '', subM);
addItem('Caucel', 'http://www.mayanroutes.com/caucel.html', '', subM);
addItem('Hunucmá', 'http://www.mayanroutes.com/hunucma.html', '', subM);
addItem('Sisal', 'http://www.mayanroutes.com/sisal.html', '', subM);
addItem('El Palmar', 'http://www.mayanroutes.com/palmar.html', '', subM);
addItem('Celestún', 'http://www.mayanroutes.com/celestun.html', '', subM);
addItem('Umán', 'http://www.mayanroutes.com/uman.html', '', subM);
startMenu('Nroute' , true, 100, 0, 100, nroute);
addItem('Map', 'http://www.mayanroutes.com/nroute.html', '', subM);
addItem('Mérida', 'http://www.mayanroutes.com/midinfo.html', '', subM);
addItem ('Dzibilchaltún', 'http://www.mayanroutes.com/dzibilchaltun.html', '', subM);
startMenu('Broute' , true, 100, 0, 100, bec);
addItem('Clickable map', 'http://www.mayanroutes.com/bec.html', '', subM);
addItem('Balamkú', 'http://www.mayanroutes.com/balamku.html', '', subM);
addItem('Hormiguero', 'http://www.mayanroutes.com/hormiguero.html', '', subM);
addItem('Calakmul', 'http://www.mayanroutes.com/calakmul.html', '', subM);
addItem('Becán', 'http://www.mayanroutes.com/becan.html', '', subM);
addItem('Chicanná', 'http://www.mayanroutes.com/chicanna.html', '', subM);
addItem('Dzibanché', 'http://www.mayanroutes.com/dzibanche.html', '', subM);
addItem('Kohunlich', 'http://www.mayanroutes.com/kohunlich.html', '', subM);
addItem('Xcalak', 'http://www.mayanroutes.com/xcalak.html', '', subM);
addItem('Majahual', 'http://www.mayanroutes.com/mahahual.html', '', subM);
startMenu('Merida' , true, 100, 0, 100, merida);
addItem('City tour and shopping', 'http://www.mayanroutes.com/tours/merida/midtour.html', '', subM, 40);
addItem('Chichen Itza', 'http://www.mayanroutes.com/tours/merida/midchi.html', '', subM);
addItem('Uxmal', 'http://www.mayanroutes.com/tours/merida/miduxmal.html', '', subM);
addItem('City tour & Dzibilchaltun', 'http://www.mayanroutes.com/tours/merida/midzibtour.html', '', subM, 40);
addItem('More tours....', 'http://www.mayanroutes.com/tours/merida/index.html', '', subM);
startMenu('Progreso' , true, 100, 0, 100, progreso);
addItem('Chichen Itza', 'http://www.mayanroutes.com/tours/progreso/prochi.html', '', subM);
addItem('Uxmal', 'http://www.mayanroutes.com/tours/progreso/prouxmal.html', '', subM);
addItem('Dzibichaltun', 'http://www.mayanroutes.com/tours/progreso/progdzibilchaltun.html', '', subM);
addItem('Merida city tour and shopping', 'http://www.mayanroutes.com/tours/progreso/promidtour.html', '', subM, 40);
addItem('Dzibichaltun & Merida city tour and shopping', 'http://www.mayanroutes.com/tours/progreso/prodzibmidtour.html', '', subM, 50);
addItem('Sotuta de Peon Live Hacienda', 'http://www.mayanroutes.com/tours/progreso/prosp.html', '', subM, 50);
}
var scrWin = parent, pMenu = scrWin.pMenu, isIE = scrWin.isIE, isNS4 = scrWin.isNS4;
if (isNS4) document.captureEvents(Event.CLICK);
document.onclick = new Function('evt', 'pMenu.click(); ' +
 'if (isNS4) return document.routeEvent(evt)');
window.onload = new Function('updateVars(); ' +
 'if (!isIE) { setInterval("if (scrollYpos!=pageYOffset || scrollXpos!=pageXOffset) ' +
 'window.onscroll()", 50); document.readyState = "complete" }');
window.onunload = new Function('pMenu.clearLyr("'+window.name+'")');
var scrollXpos, scrollYpos, winWidth, winHeight;
function updateVars()
{
 winWidth = (isIE ? document.body.clientWidth : window.innerWidth);
 winHeight = (isIE ? document.body.clientHeight : window.innerHeight);
 scrollYpos = (isIE ? document.body.scrollTop : window.pageYOffset);
 scrollXpos = (isIE ? document.body.scrollLeft : window.pageXOffset);
}
window.onscroll = new Function('updateVars(); pMenu.position("'+window.name+'")');
window.onresize = updateVars;
var popOldOL = window.onload;
window.onload = new Function('if (popOldOL) popOldOL(); updateVars(); pMenu.update()');
window.onresize = new Function('ns4BugCheck(); updateVars(); pMenu.position()');
window.onscroll = new Function('updateVars(); pMenu.position()');
if (isNS4) document.captureEvents(Event.CLICK);
document.onclick = new Function('evt', 'pMenu.click(); ' +
 'if (isNS4) return document.routeEvent(evt)');

var winWidth, winHeight, scrollYpos, scrollXpos;
function updateVars()
{
 winWidth = (isIE ? document.body.clientWidth : window.innerWidth);
 winHeight = (isIE ? document.body.clientHeight : window.innerHeight);
 scrollYpos = (isIE ? document.body.scrollTop : window.pageYOffset);
 scrollXpos = (isIE ? document.body.scrollLeft : window.pageXOffset);
}

var origWinWidth = window.innerWidth;
function ns4BugCheck()
{
 if (isNS4 && origWinWidth != window.innerWidth) location.reload()
}

if (!isIE) setInterval('if (scrollYpos!=pageYOffset || scrollXpos!=pageYOffset) ' +
 'window.onscroll()', 50);


/*
pMenu.onclick = function() { with (this)
{
  if (overM == 'root' && overI == 1) status = 'Congratulations, you\'ve mastered clicking!';
 if (overM == 'root' && overI == 2) location.href = 'edit.html';
}}

pMenu.onmouseover = function() { with (this)
{
 // By now, you either have my JS Object Browser script from my site or you want it... try
 // embedding in an IFrame and typing 'pMenu' into its Go To field to see the menu internals.
 with (menu[overM][overI]) if (!type) status = href;
}}
pMenu.onmouseout = function() { status = '' }
*/

function changeMenu() { with (pMenu)
{
 over('root', 0);
 menu.root[0].lyr.vis('hidden');
  update();
}}

moveRoot = new Function('with(pMenu.menu.root[0].lyr) x( (x()<100) ? 100 : 5);');
  
 