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 isOp=window.opera?1:0;
var isDyn = (isDOM||isIE||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(p)) sty.left=p; else return parseInt(sty.left)');
LyrFn('y','if (!isNaN(p)) sty.top=p; else return parseInt(sty.top)');
LyrFn('vis','sty.visibility=p');
LyrFn('bgColor','if (isNS4) sty.bgColor=(p?p:null); ' +
 'else sty.background=p?p:"transparent"');
LyrFn('bgImage','if (isNS4) sty.background.src=(p?p:null); ' + 
 'else sty.background=(p?"url("+p+")":"") ');
LyrFn('clip','if (isNS4) with(sty.clip) { left=a[0]; top=a[1]; right=a[2]; bottom=a[3] } ' +
 'else sty.clip="rect("+a[1]+"px "+a[2]+"px "+a[3]+"px "+a[0]+"px)" ');
LyrFn('write','if (isNS4) with (ref.document) {write(p);close()} else ref.innerHTML=p');
LyrFn('alpha','var f=ref.filters; if (f) {' +
 'if (sty.filter.indexOf("alpha")==-1) sty.filter+="alpha()"; ' +
 'if (f.length&&f.alpha) f.alpha.opacity=p } else if (isDOM) sty.MozOpacity=(p/100)');


function setLyr(lVis, docW, par)
{
 if (!setLyr.seq) setLyr.seq=0;
 if (!docW) docW=0;
 var obj = (!par ? (isNS4 ? window : document.body) :
  (!isNS4 && par.navigator ? par.document.body : par));
 var newID='_js_layer_'+setLyr.seq++;

 if (isIE&&!window.opera) obj.insertAdjacentHTML('beforeEnd', '<div id="'+newID+
  '" style="position:absolute"></div>');
 else if (isDOM)
 {
  var newL=document.createElement('div');
  obj.appendChild(newL);
  newL.id=newID; newL.style.position='absolute';
 }
 else if (isNS4)
 {
  var newL=new Layer(docW, obj);
  newID=newL.id;
 }

 var lObj=getLyr(newID, par);
 with (lObj.sty) { visibility=lVis; left=0; top=0; width=docW }
 return lObj;
}


if (!window.page) var page = { win: window, minW: 0, minH: 0, MS: isIE&&!window.opera }

page.winW=function()
 { with (this) return Math.max(minW, MS?win.document.body.clientWidth:win.innerWidth) }
page.winH=function()
 { with (this) return Math.max(minH, MS?win.document.body.clientHeight:win.innerHeight) }

page.scrollX=function()
 { with (this) return MS?win.document.body.scrollLeft:win.pageXOffset }
page.scrollY=function()
 { with (this) return MS?win.document.body.scrollTop:win.pageYOffset }

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) with (menu[thisM][0])
 {

  if (!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 (litI && !visNow && (thisM != 'root'))
  {
   showMenu(thisM);
   visNow = true;
  }

  if (isNaN(litI) && visNow)
  {
   hideMenu(thisM);
   visNow = false;
  }
 }


 clearTimeout(showTimer);
 nextMenu = '';
 if (thisI.type == 'sm:')
 {

  var targ = thisI.href, lyrM = menu[mN][0].lyr;


  with (menu[targ][0])
  {

   if (!lyr || !lyr.ref) return;
   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 + '.showMenu("' + targ + '"); ' +
    myName + '.menu.' + targ + '[0].visNow = true';
   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);

 var doFX = ((overClass != outClass) || (outBorder != overBorder));

 if (doFX && isNS4) lyr.write(this.getHTML(mN, iN, isOver));

 else if (doFX) with (lyr)
 {
  ref.className = (isOver ? overBorder : outBorder);
  var chl = (isDOM ? ref.childNodes : ref.children)
  if (chl) for (var i = 0; i < chl.length; i++)
   chl[i].className = (isOver ? overClass : outClass);
 }

 if (typeof(outAlpha)=='number') lyr.alpha(isOver ? overAlpha : outAlpha);
}}


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 = "_borders/' + 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', 'outAlpha', 'overAlpha'];
 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', 'visNow', 'menuW', 'menuH'];
 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',
  'pad', 'outCol', 'overCol', 'outClass', 'overClass', 'outBorder', 'overBorder',
  'outAlpha', 'overAlpha', '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 (aI.outBorder)
 {
  if (isNS4) 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(docWrite, upMN) { with (this)
{

 if (!isDyn) return;

 for (mN in menu) with (menu[mN][0])
 {

  if (upMN && (upMN != mN)) 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;

   var targM = menu[href];
   if (targM && (type == 'sm:'))
   {
    targM[0].parentMenu = mN;
    targM[0].parentItem = iN;
   }

   var shrink = (outBorder && ((isDOM && !isIE) || window.opera) ? 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 + '; background: ' + (isImg ? 'url('+outCol+')' : outCol) +
     ((typeof(outAlpha)=='number') ? '; filter: alpha(opacity='+ outAlpha + '); -moz-opacity: ' +
      (outAlpha/100) : '') +
     '; cursor: ' + ((type!='sm:' && href) ? (isIE ? 'hand' : 'pointer') : 'default') + '" ';
   }
   else 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;

  }
  
  menuW = isVert ? width : iX;
  menuH = isVert ? iY : width;
  
  var eP = eval(par);

  setTimeout(myName + '.setupRef("' + mN + '")', 50);
  
  if (docWrite)
  {
   var targFr = (eP && eP.navigator ? eP : window);
   targFr.document.write('<div id="' + myName + '_' + mN + '_Div" style="position: absolute; ' +
    'visibility: hidden; width: ' + menuW + '; height: ' + menuH + '; z-index: 1000">' +
    str + '</div>');
  }
  else
  {
   if (!lyr) lyr = setLyr('hidden', menuW, eP);
   else if (isIE4) setTimeout(myName + '.menu.' + mN + '[0].lyr.sty.width=' + (menuW+2), 50);

   with (lyr) { sty.zIndex = 1000; write(str) }
  }

 }
}}


function popSetupRef(mN) { with (this) with (menu[mN][0])
{
 if (!lyr || !lyr.ref) lyr = getLyr(myName + '_' + mN + '_Div', eval(par));

 for (var i = 1; i < menu[mN].length; i++)
  menu[mN][i].lyr = getLyr(myName + '_' + mN + '_' + i, lyr.ref);

 if (mN == 'root')
 {
  position();
  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 || !lyr.ref) continue;

  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.setupRef = popSetupRef;
 this.position = popPosition;

 this.showMenu = function(mName) { this.menu[mName][0].lyr.vis('visible') }
 this.hideMenu = function(mName) { this.menu[mName][0].lyr.vis('hidden') }
}

var hBar = new ItemStyle(80, 0, '', 0, 0, '#000066', '#000066', 'itemText', 'itemHover', '', '',
 null, null);

var subM = new ItemStyle(22, 0, '<img src = "http://www.tamegoeswild.com/images/migi.gif">', -15, 3, '#333399', '#666699', 'itemText', 'itemHover',
 'itemBorder', 'itemBorder', null, null);

var crazy = new ItemStyle(22, 1, '>', -15, 2, '#333366', '#333333', 'crazyText', 'crazyHover',
 'crazyBorder', 'crazyBorderOver', null, null);

var pMenu = new PopupMenu('pMenu');
with (pMenu)
{

startMenu('root', false, 86, 108, 0, hBar);

addItem('<CENTER>Main</CENTER>', 'mMain', 'sm:', hBar, 50);
addItem('<CENTER>Blog: Daily Mumble</CENTER>', 'mMumble', 'sm:', hBar, 125);
addItem('<CENTER>Podcasts</CENTER>', 'mPodcasts', 'sm:', hBar, 70);
addItem('<CENTER>Photos</CENTER>', 'mPhotos', 'sm:', hBar, 60);
addItem('<CENTER>Travel Tales</CENTER>', 'mTales', 'sm:', hBar, 90);
addItem('<CENTER>Videos</CENTER>', 'mVideos', 'sm:', hBar, 60);
addItem('<CENTER>About the Tame</CENTER>', 'mAbouttame', 'sm:', hBar, 110);
addItem('<CENTER>My other sites</CENTER>', 'mOtherSites', 'sm:');

startMenu('mMain', true, 0, 25, 110, subM);

addItem('  <strong>Home</strong>', '../index.php', '');
addItem('  About TGW', '../extras/about.htm', '');
addItem('  Live Abroad', '../liveabroad.htm', '');
addItem('  Contact', '../contactdetails.htm', '');
addItem('  Japanese', '../j/index.php', '');


startMenu('mMumble', true, 0, 25, 130, subM);
addItem('  <strong>Latest Edition</strong>','../words/', '');
addItem('  2009', 'm2009mumble', 'sm:');
addItem('  2008', 'm2008mumble', 'sm:');
addItem('  2007', 'm2007mumble', 'sm:');
addItem('  2006', 'm2006mumble', 'sm:');
addItem('  2005', 'm2005mumble', 'sm:');
addItem('  2004', 'm2004mumble', 'sm:');
addItem('  2003', 'm2003mumble', 'sm:');
addItem('  2002', 'm2002mumble', 'sm:');

startMenu('mPodcasts', true, 0, 25, 200, subM);
addItem('  Podcast (2009): Japan Podshow', '../podcasts/japanpodshow/index.php', '');
addItem('  Podcast (2009): Japan Techshow', '../podcasts/japantechshow/index.php', '');
addItem('  Podcast (2007): A Year in Japan', '../podcasts/', '');

startMenu('mPhotos', true, 0, 25, 130, subM);
addItem('  <strong>INDEX</strong>', '../photos/index.htm', '');
addItem('  2009', 'm2009photos', 'sm:');
addItem('  2008', 'm2008photos', 'sm:');
addItem('  2007', 'm2007photos', 'sm:');
addItem('  2006', 'm2006photos', 'sm:');
addItem('  2005', 'm2005photos', 'sm:');
addItem('  2004', 'm2004photos', 'sm:');
addItem('  2003', 'm2003photos', 'sm:');
addItem('  2002', 'm2002photos', 'sm:');
addItem('  2001 and before', 'm2001b4photos', 'sm:');
addItem('  Joseph grows up', '../photos/josephpics/spacer/index.htm', '');
addItem('  <strong>Flickr</strong>', '../flickr/index.php', '');

startMenu('mTales', true, 0, 25, 160, subM);
addItem('  <strong>INDEX</strong>', '../tames_tales/index.htm', '');
addItem('  Japanese Travel Tales', 'mJapanese_tales', 'sm:');
addItem('  European Travel Tales', 'mEuropean_tales', 'sm:');
addItem('  Other Tales', 'mOther_tales', 'sm:');
addItem('  Live and Work Abroad', '../liveabroad.htm', '');

startMenu('mVideos', true, 0, 25, 155, subM);
addItem('  <strong>INDEX</strong>', '../av/index.htm', '');

startMenu('mAbouttame', true, 0, 25, 110, subM);
addItem('  <strong>INDEX</strong>', '../all_about_the_tame/index.htm', '');
addItem('  A Brief History', '../all_about_the_tame/briefhistory.htm', '');
addItem('  My Education', '../all_about_the_tame/myeducation.htm', '');
addItem('  The Rat race', '../all_about_the_tame/ratrace.htm', '');
addItem('  Epilepsy and I', '../all_about_the_tame/epilepsy.htm', '');
addItem('  Happiness is...', '../all_about_the_tame/happiness.htm', '');

startMenu('mOtherSites', true, -0, 25, 200, subM);
addItem('  Podcast (2009): Japan Podshow', '../podcasts/japanpodshow/index.php', '');
addItem('  Podcast (2009): Japan Techshow', '../podcasts/japantechshow/index.php', '');
addItem('  Podcast (2007): A Year in Japan', '../podcasts/', '');
addItem('  Mini Site: Trans-siberian', '../trans-siberian/index.html', '');
addItem('  Mini Site: OXFAM Trailwalker', '../trailwalker/index.htm', '');
addItem('  iPhoning Japan', '../iphone/', '');
addItem('  My Lifestream', '../lifestream/', '');




//sub menus


startMenu('m2009mumble', true, 110, 0, 90, crazy);
addItem('January', '../words/2009/01', '', crazy, 22);
addItem('February', '../words/2009/02', '', crazy, 22);
addItem('March', '../words/2009/03', '', crazy, 22);
addItem('April', '../words/2009/04', '', crazy, 22);
addItem('May', '../words/2009/05', '', crazy, 22);
addItem('June', '../words/2009/06', '', crazy, 22);
addItem('July', '../words/2009/07', '', crazy, 22);
addItem('August', '../words/2009/08', '', crazy, 22);
addItem('September', '../words/2009/09', '', crazy, 22);
addItem('October', '../words/2009/10', '', crazy, 22);
addItem('November', '../words/2009/11', '', crazy, 22);
addItem('December', '../words/2009/12', '', crazy, 22);


startMenu('m2008mumble', true, 110, 0, 90, crazy);
addItem('January', '../thedailymumble/archives/2008_01_01_archive.html', '', crazy, 22);
addItem('February', '../thedailymumble/archives/2008_02_01_archive.html', '', crazy, 22);
addItem('March', '../thedailymumble/archives/2008_03_01_archive.html', '', crazy, 22);
addItem('April', '../thedailymumble/archives/2008_04_01_archive.html', '', crazy, 22);;
addItem('May', '../thedailymumble/archives/2008_05_01_archive.html', '', crazy, 22);
addItem('June', '../thedailymumble/archives/2008_06_01_archive.html', '', crazy, 22);
addItem('July', '../thedailymumble/archives/2008_07_01_archive.html', '', crazy, 22);
addItem('August', '../thedailymumble/archives/2008_08_01_archive.html', '', crazy, 22); 
addItem('September', '../thedailymumble/archives/2008_09_01_archive.html', '', crazy, 22);
addItem('October', '../thedailymumble/archives/2008_10_01_archive.html', '', crazy, 22);
addItem('November', '../thedailymumble/archives/2008_11_01_archive.html', '', crazy, 22);
addItem('December', '../thedailymumble/archives/2008_12_01_archive.html', '', crazy, 22);



startMenu('m2007mumble', true, 110, 0, 90, crazy);
addItem('January', '../thedailymumble/archives/2007_01_01_archive.html', '', crazy, 22);
addItem('February', '../thedailymumble/archives/2007_02_01_archive.html', '', crazy, 22);
addItem('March', '../thedailymumble/archives/2007_03_01_archive.html', '', crazy, 22);
addItem('April', '../thedailymumble/archives/2007_04_01_archive.html', '', crazy, 22);
addItem('May', '../thedailymumble/archives/2007_05_01_archive.html', '', crazy, 22);
addItem('June', '../thedailymumble/archives/2007_06_01_archive.html', '', crazy, 22);
addItem('July', '../thedailymumble/archives/2007_07_01_archive.html', '', crazy, 22);
addItem('August', '../thedailymumble/archives/2007_08_01_archive.html', '', crazy, 22);
addItem('September', '../thedailymumble/archives/2007_09_01_archive.html', '', crazy, 22);
addItem('October', '../thedailymumble/archives/2007_10_01_archive.html', '', crazy, 22);
addItem('November', '../thedailymumble/archives/2007_11_01_archive.html', '', crazy, 22);
addItem('December', '../thedailymumble/archives/2007_12_01_archive.html', '', crazy, 22);


startMenu('m2006mumble', true, 110, 0, 90, crazy);
addItem('January', '../thedailymumble/archives/2006_01_01_archive.html', '', crazy, 22);
addItem('February', '../thedailymumble/archives/2006_02_01_archive.html', '', crazy, 22);
addItem('March', '../thedailymumble/archives/2006_03_01_archive.html', '', crazy, 22);
addItem('April', '../thedailymumble/archives/2006_04_01_archive.html', '', crazy, 22);
addItem('May', '../thedailymumble/archives/2006_05_01_archive.html', '', crazy, 22);
addItem('June', '../thedailymumble/archives/2006_06_01_archive.html', '', crazy, 22);
addItem('July', '../thedailymumble/archives/2006_07_01_archive.html', '', crazy, 22);
addItem('August', '../thedailymumble/archives/2006_08_01_archive.html', '', crazy, 22);
addItem('September', '../thedailymumble/archives/2006_09_01_archive.html', '', crazy, 22);
addItem('October', '../thedailymumble/archives/2006_10_01_archive.html', '', crazy, 22);
addItem('November', '../thedailymumble/archives/2006_11_01_archive.html', '', crazy, 22);
addItem('December', '../thedailymumble/archives/2006_12_01_archive.html', '', crazy, 22);

startMenu('m2005mumble', true, 110, 0, 90, crazy);
addItem('January', '../thedailymumble/2005/01.htm', '', crazy, 22);
addItem('February', '../thedailymumble/2005/02.htm', '', crazy, 22);
addItem('March', '../thedailymumble/2005/03.htm', '', crazy, 22);
addItem('April', '../thedailymumble/2005/04.htm', '', crazy, 22);
addItem('May', '../thedailymumble/2005/05.htm', '', crazy, 22);
addItem('June', '../thedailymumble/2005/06.htm', '', crazy, 22);
addItem('July', '../thedailymumble/2005/07.htm', '', crazy, 22);
addItem('August', '../thedailymumble/2005/08.htm', '', crazy, 22);
addItem('September', '../thedailymumble/2005/09.htm', '', crazy, 22);
addItem('October', '../thedailymumble/2005/10.htm', '', crazy, 22);
addItem('November', '../thedailymumble/2005/11.htm', '', crazy, 22);
addItem('December', '../thedailymumble/2005/12.htm', '', crazy, 22);

startMenu('m2004mumble', true, 110, 0, 90, crazy);
addItem('January', '../thedailymumble/2004/01.htm', '', crazy, 22);
addItem('February', '../thedailymumble/2004/02.htm', '', crazy, 22);
addItem('March', '../thedailymumble/2004/03.htm', '', crazy, 22);
addItem('April', '../thedailymumble/2004/04.htm', '', crazy, 22);
addItem('May', '../thedailymumble/2004/05.htm', '', crazy, 22);
addItem('June', '../thedailymumble/2004/06.htm', '', crazy, 22);
addItem('July', '../thedailymumble/2004/07.htm', '', crazy, 22);
addItem('August', '../thedailymumble/2004/08.htm', '', crazy, 22);
addItem('September', '../thedailymumble/2004/09.htm', '', crazy, 22);
addItem('October', '../thedailymumble/2004/10.htm', '', crazy, 22);
addItem('November', '../thedailymumble/2004/11.htm', '', crazy, 22);
addItem('December', '../thedailymumble/2004/12.htm', '', crazy, 22);

startMenu('m2003mumble', true, 110, 0, 90, crazy);
addItem('January', '../thedailymumble/2003/01.htm', '', crazy, 22);
addItem('February', '../thedailymumble/2003/02-1.htm', '', crazy, 22);
addItem('March', '../thedailymumble/2003/03.htm', '', crazy, 22);
addItem('April', '../thedailymumble/2003/04.htm', '', crazy, 22);
addItem('May', '../thedailymumble/2003/05.htm', '', crazy, 22);
addItem('June', '../thedailymumble/2003/06.htm', '', crazy, 22);
addItem('July', '../thedailymumble/2003/07.htm', '', crazy, 22);
addItem('August', '../thedailymumble/2003/08.htm', '', crazy, 22);
addItem('September', '../thedailymumble/2003/09.htm', '', crazy, 22);
addItem('October', '../thedailymumble/2003/10.htm', '', crazy, 22);
addItem('November', '../thedailymumble/2003/11.htm', '', crazy, 22);
addItem('December', '../thedailymumble/2003/12.htm', '', crazy, 28);

startMenu('m2002mumble', true, 110, 0, 90, crazy);
addItem('February', '../thedailymumble/2002/02.htm', '', crazy, 22);
addItem('March', '../thedailymumble/2002/03.htm', '', crazy, 22);
addItem('April', '../thedailymumble/2002/04.htm', '', crazy, 22);
addItem('May', '../thedailymumble/2002/05.htm', '', crazy, 22);
addItem('June', '../thedailymumble/2002/06.htm', '', crazy, 22);
addItem('July', '../thedailymumble/2002/07.htm', '', crazy, 22);
addItem('August', '../thedailymumble/2002/08.htm', '', crazy, 22);
addItem('September', '../thedailymumble/2002/09.htm', '', crazy, 22);
addItem('October', '../thedailymumble/2002/10.htm', '', crazy, 22);
addItem('November', '../thedailymumble/2002/11.htm', '', crazy, 22);
addItem('December', '../thedailymumble/2002/12.htm', '', crazy, 28);



startMenu('m2009photos', true, 110, 0, 140, crazy);
addItem('View on Flickr', '../flickr', '', crazy, 22);

startMenu('m2008photos', true, 110, 0, 140, crazy);
addItem('01: January, UK', '../photos/coppermine/thumbnails.php?album=24', '', crazy, 22);
addItem('02: February, UK', '../photos/coppermine/thumbnails.php?album=25', '', crazy, 22);
addItem('03: March, UK', '../photos/coppermine/thumbnails.php?album=26', '', crazy, 22);
addItem('04: April, UK', '../photos/coppermine/thumbnails.php?album=31', '', crazy, 22); 
addItem('05: May, UK', '../photos/coppermine/thumbnails.php?album=32', '', crazy, 22);
addItem('06: June, UK', '../photos/coppermine/thumbnails.php?album=33', '', crazy, 22);
addItem('07: July, UK', '../photos/coppermine/thumbnails.php?album=34', '', crazy, 22);
addItem('07b: Our Wedding, UK', '../photos/coppermine/thumbnails.php?album=35', '', crazy, 22);
addItem('08: August, UK', '../photos/coppermine/thumbnails.php?album=36', '', crazy, 22);
addItem('09a: September, UK', '../../photos/coppermine/thumbnails.php?album=37', '', crazy, 22);
addItem('09b: September, Japan', '../../photos/coppermine/thumbnails.php?album=38', '', crazy, 22);
addItem('10: October, Japan', '../../photos/coppermine/thumbnails.php?album=39', '', crazy, 22);
addItem('11: November, Japan', '../../photos/coppermine/thumbnails.php?album=40', '', crazy, 22);

startMenu('m2007photos', true, 110, 0, 140, crazy);
addItem('01: January, Japan', '../photos/coppermine/thumbnails.php?album=1', '', crazy, 22);
addItem('02: February, Japan', '../photos/coppermine/thumbnails.php?album=2', '', crazy, 22);
addItem('03: March, Japan', '../photos/coppermine/thumbnails.php?album=3', '', crazy, 22);
addItem('04: April, Japan', '../photos/coppermine/thumbnails.php?album=4', '', crazy, 22);
addItem('05: May, Japan', '../photos/coppermine/thumbnails.php?album=5', '', crazy, 22);
addItem('05b: Trailwalker', '../photos/coppermine/thumbnails.php?album=6', '', crazy, 22);
addItem('06: June, Japan', '../photos/coppermine/thumbnails.php?album=7', '', crazy, 22);
addItem('07: July, Japan', '../photos/coppermine/thumbnails.php?album=8', '', crazy, 22);
addItem('08a: August, Japan', '../photos/coppermine/thumbnails.php?album=15', '', crazy, 22);
addItem('08b: August, China', '../photos/coppermine/thumbnails.php?album=9', '', crazy, 22);
addItem('08c: August, Mongolia', '../photos/coppermine/thumbnails.php?album=10', '', crazy, 22);
addItem('08d: Aug-Sep, Russia', '../photos/coppermine/thumbnails.php?album=11', '', crazy, 22);
addItem('09a: September, Europe', '../photos/coppermine/thumbnails.php?album=13', '', crazy, 22);
addItem('09b: September, UK', '../photos/coppermine/thumbnails.php?album=14', '', crazy, 22);
addItem('10: October, UK', '../photos/coppermine/thumbnails.php?album=21', '', crazy, 22);
addItem('11: November, UK', '../photos/coppermine/thumbnails.php?album=22', '', crazy, 22);
addItem('12: Deceber, UK', '../photos/coppermine/thumbnails.php?album=23', '', crazy, 22);

startMenu('m2006photos', true, 110, 0, 140, crazy);
addItem('01: January, England', '../photos/2006/01/index.htm', '', crazy, 22);
addItem('02: February, England', '../photos/2006/02/index.htm', '', crazy, 22);
addItem('03: March, England', '../photos/2006/03/index.htm', '', crazy, 22);
addItem('04: April, England', '../photos/2006/04/index.htm', '', crazy, 22);
addItem('05: May, England', '../photos/2006/05/index.htm', '', crazy, 22);
addItem('06: June, England & Wales', '../photos/2006/06/index.htm', '', crazy, 38);
addItem('07: July, England & Wales', '../photos/2006/07/index.htm', '', crazy, 38);
addItem('08: August, England & Wales', '../photos/2006/08/index.htm', '', crazy, 38);
addItem('09: September, Japan', '../photos/2006/09/index.htm', '', crazy, 22);
addItem('10: October, Japan', '../../photos/2006/10/index.htm', '', crazy, 22);
addItem('11: November, Japan', '../photos/2006/11/index.htm', '', crazy, 22);
addItem('12: December, Japan', '../photos/2006/12/index.htm', '', crazy, 22);

startMenu('m2005photos', true, 110, 0, 140, crazy);
addItem('01: January, England', '../photos/2005/01/index.htm', '', crazy, 22);
addItem('02: February, England', '../photos/2005/02/index.htm', '', crazy, 22);
addItem('03: March, England', '../photos/2005/03/index.htm', '', crazy, 22);
addItem('04: April, England', '../photos/2005/04/index.htm', '', crazy, 22);
addItem('05: May, England', '../photos/2005/05/index.htm', '', crazy, 22);
addItem('06: June, Japan & UK', '../photos/2005/06/index.htm', '', crazy, 22);
addItem('07: July, Japan', '../photos/2005/07/index.htm', '', crazy, 22);
addItem('08: August, UK', '../photos/2005/08/index.htm', '', crazy, 22);
addItem('09: September, UK', '../photos/2005/09/index.htm', '', crazy, 22);
addItem('10: October, UK', '../photos/2005/10/index.htm', '', crazy, 22);
addItem('11: November, UK', '../photos/2005/11/index.htm', '', crazy, 22);
addItem('12: December, UK', '../photos/2005/12/index.htm', '', crazy, 22);

startMenu('m2004photos', true, 110, 0, 140, crazy);
addItem('01: January, England', '../photos/2004/01/index.htm', '', crazy, 22);
addItem('02: February, England', '../photos/2004/02/index.htm', '', crazy, 22);
addItem('03: March, England', '../photos/2004/03/index.htm', '', crazy, 22);
addItem('04: April, England', '../photos/2004/04/index.htm', '', crazy, 22);
addItem('05: May, England', '../photos/2004/05/index.htm', '', crazy, 22);
addItem('06: June, England', '../photos/2004/06/index.htm', '', crazy, 22);
addItem('07: July, England', '../photos/2004/07/index.htm', '', crazy, 22);
addItem('08: August, England', '../photos/2004/08/index.htm', '', crazy, 22);
addItem('09: September, England', '../photos/2004/09/index.htm', '', crazy, 22);
addItem('10: October, England', '../photos/2004/10/index.htm', '', crazy, 22);
addItem('11: November, England', '../photos/2004/11/index.htm', '', crazy, 22);
addItem('12: December, England', '../photos/2004/12/index.htm', '', crazy, 22);

startMenu('m2003photos', true, 110, 0, 140, crazy);
addItem('01: January, Tokyo', '../photos/japan2003/01/index.htm', '', crazy, 22);
addItem('02: February, Tokyo', '../photos/japan2003/02/index.htm', '', crazy, 22);
addItem('03: February, Seoul', '../photos/korea2003/02/index.htm', '', crazy, 22);
addItem('04: March, Tokyo', '../photos/japan2003/03/index.htm', '', crazy, 22);
addItem('05: April, England', '../photos/england2003/04/index.htm', '', crazy, 22);
addItem('06: May, England', '../photos/england2003/05/index.htm', '', crazy, 22);
addItem('07: June, England', '../photos/england2003/06/index.htm', '', crazy, 22);
addItem('08: July, England', '../photos/england2003/07/index.htm', '', crazy, 22);
addItem('09: August, England', '../photos/england2003/08/index.htm', '', crazy, 22);
addItem('10: September, England', '../photos/england2003/09/index.htm', '', crazy, 22);
addItem('11: October, England', '../photos/england2003/10/index.htm', '', crazy, 22);
addItem('12: November, England', '../photos/england2003/11/index.htm', '', crazy, 22);
addItem('13: December, England', '../photos/england2003/12/index.htm', '', crazy, 28);

startMenu('m2002photos', true, 110, 0, 210, crazy);
addItem('01: January, Tokyo', '../photos/japan2002/01/index.htm', '', crazy, 22);
addItem('02: February, Tokyo', '../photos/japan2002/02/index.htm', '', crazy, 22);
addItem('03: March, Tokyo', '../photos/japan2002/03/index.htm', '', crazy, 22);
addItem('04: March, OBC Leaving party, Tokyo', '../photos/japan2002/obc/index.htm', '', crazy, 34);
addItem('05: March, AI Leaving Party, Tokyo', '../photos/japan2002/ai/index.htm', '', crazy, 22);
addItem('06: April, Kansai and Hokkaido, Japan', '../photos/japan2002/04/index.htm', '', crazy, 34);
addItem('07: May, Hokkaido, Japan', '../photos/japan2002/05/index.htm', '', crazy, 22);
addItem('08: June, Hokkaido, Japan', '../photos/japan2002/06/index.htm', '', crazy, 22);
addItem('09: July, Hokkaido, Japan', '../photos/japan2002/07/index.htm', '', crazy, 22);
addItem('10: August, Hokkaido, Japan', '../photos/japan2002/08/index.htm', '', crazy, 22);
addItem('11: September, Italy', '../photos/europe2002/italy_sep/index.htm', '', crazy, 22);
addItem('12: September, England', '../photos/europe2002/england_sep/index.htm', '', crazy, 22);
addItem('13: September, Jessies and Dannys wedding', '../photos/japan2002/06/index.htm', '', crazy, 36);
addItem('14: October & November, Italy', '../photos/wedding/photos/index.htm', '', crazy, 22);
addItem('15: December, Tokyo', '../photos/japan2002/12/index.htm', '', crazy, 28);

startMenu('m2001b4photos', true, 110, 0, 210, crazy);
addItem('01: Tame Family Archives: 1978 - 1980', '../photos/tame_archive/1978-1980/index.htm', '', crazy, 32);
addItem('02: Herefordshire Archive, 1985 - 2001', '../photos/hereford_archive/hereford1/index.htm', '', crazy, 32);
addItem('03: Holiday on Islay, 1991', '../photos/holidays/islay/index.htm', '', crazy, 22);
addItem('04: Holiday in Crete, 1996', '../photos/holidays/crete/index.htm', '', crazy, 22);
addItem('05: Switzerland, Winter 96 - 97', '../photos/switzerland/swiss_win00-01_1/index.htm', '', crazy, 22);
addItem('06: America, Summer 1997', '../photos/america97/america1/index.htm', '', crazy, 22);
addItem('07: Switzerland, Summer 2000', '../photos/switzerland/summer2000/index.htm', '', crazy, 22);
addItem('08: Japan, Nov / Dec 2000 ', '../photos/japan_2000/japan_00_1/index.htm', '', crazy, 22);
addItem('09: Switzerland, Winter 2000/01 ', '../photos/switzerland/swiss_win00-01_1/index.htm', '', crazy, 22);
addItem('10: Paris, February 2001', '../photos/europe2001/paris/index.htm', '', crazy, 22);
addItem('11: Berlin, February 2001 ', '../photos/europe2001/berlin/index.htm', '', crazy, 22);
addItem('12: Istanbul, March 2001', '../photos/europe2001/istanbul/index.htm', '', crazy, 22);
addItem('13: Italy, March 2001 ', '../photos/europe2001/italy/index.htm', '', crazy, 22);
addItem('14: Switzerland, Summer 2001 ', '../photos/switzerland/swiss_sum01_1/index.htm', '', crazy, 22);
addItem('15: Japan, October 2001 ', '../photos/japan2001/10/index.htm', '', crazy, 22);
addItem('16: Japan, November 2001 ', '../photos/japan2001/11/index.htm', '', crazy, 22);
addItem('17: Japan, December 2001  ', '../photos/japan2001/12/index.htm', '', crazy, 28);

startMenu('mJapanese_tales', true, 140, 0, 200, crazy);
addItem('Solo volcano night climb', '../thedailymumble/2002/08.htm#yotei', '', crazy, 22);
addItem('Earthquake ', '../thedailymumble/2002/02.htm#earthquake', '', crazy, 22);
addItem('Japanese hot springs: a users guide', '../tames_tales/sento.htm', '', crazy, 36);
addItem('Calling all feminists!', '../tames_tales/calling_all_feminists.htm', '', crazy, 22);;
addItem('Modern fashions', '../tames_tales/harajuku_horrors.htm', '', crazy, 22);
addItem('Fried crickets anyone?', '../tames_tales/fried_cricket.htm', '', crazy, 22);
addItem('Joseph dons his suit ', '../tames_tales/office_worker.htm', '', crazy, 22);
addItem('Parasite museum', '../tames_tales/parasite_museum.htm', '', crazy, 22);
addItem('Electric Slippers', '../tames_tales/homecomforts.htm#slippers', '', crazy, 22);
addItem('Kabuki theatre', '../tames_tales/kabuki.htm', '', crazy, 22);
addItem('Electric toilet', '../tames_tales/electric_toilet.htm', '', crazy, 22);
addItem('Wwoofing at Milky House ', '../tames_tales/milky_summer.htm', '', crazy, 22);
addItem('My first 6 weeks in Japan', '../tames_tales/japan1p1.htm', '', crazy, 28);

startMenu('mEuropean_tales', true, 140, 0, 180, crazy);
addItem('Cow Hut Camp Fest', '../tames_tales/cowhutcampfest.htm', '', crazy, 22);
addItem('Broken bone train races', '../tames_tales/fractured_rib.htm', '', crazy, 22);
addItem('Get Rich Quick #294', '../tames_tales/get_rich_quick-beer.htm', '', crazy, 22);
addItem('Get Rich Quick #435', '../tames_tales/get_rich_quick-speakers.htm', '', crazy, 22);
addItem('Road trip', '../tames_tales/road_trip.htm', '', crazy, 22);
addItem('$2000 spent in Istanbul', '../tames_tales/istanbulnightlife.htm', '', crazy, 22);
addItem('Hitch-hiking by freight train', '../tames_tales/train_hiking.htm', '', crazy, 22);
addItem('Camping on a cathedral roof', '../tames_tales/cathedral_camping.htm', '', crazy, 22);
addItem('Interail Europe', '../tames_tales/interaileurope.htm', '', crazy, 22);
addItem('Switzerland 2001', '../tames_tales/switzerland2001.htm', '', crazy, 22);
addItem('Switzerland 1996', '../tames_tales/switzerland96.htm', '', crazy, 28);

startMenu('mOther_tales', true, 140, 0, 180, crazy);
addItem('Buying a house? Read this first!', '../tames_tales/domestic_bliss1998.htm', '', crazy, 36);
addItem('Our camping trip', '../tames_tales/camping1998.htm', '', crazy, 22);
addItem('Stolen passport', '../tames_tales/stolen_passport.htm', '', crazy, 22);
addItem('Physical violence', '../tames_tales/physical_violence.htm', '', crazy, 22);
addItem('Dear Diary: its not all laughter', '../tames_tales/its_not_all_laughter.htm', '', crazy, 22);
addItem('The Rat Race', '../all_about_the_tame/ratrace.htm', '', crazy, 22);
addItem('My old online diaries', '../tames_tales/latestnews1.htm', '', crazy, 28);

}

if (!isNS4)
{
 pMenu.update(true);

}
else
{
 var popOldOL = window.onload;
 window.onload = function()
 {
  if (popOldOL) popOldOL();
  pMenu.update();
 }
}

window.onresize = function()
{
 ns4BugCheck();
 pMenu.position();

}

window.onscroll = function()
{
 pMenu.position();

}

if (isNS4) document.captureEvents(Event.CLICK);
document.onclick = function(evt)
{
 pMenu.click();

 if (isNS4) return document.routeEvent(evt);
}



var nsWinW = window.innerWidth, nsWinH = window.innerHeight;
function ns4BugCheck()
{
 if (isNS4 && (nsWinW!=innerWidth || nsWinH!=innerHeight)) location.reload()
}


if (!isIE || window.opera)
{
 var nsPX=pageXOffset, nsPY=pageYOffset;
 setInterval('if (nsPX!=pageXOffset || nsPY!=pageYOffset) ' +
 '{ nsPX=pageXOffset; nsPY=pageYOffset; window.onscroll() }', 50);
}

function menuClip(menuObj, menuName, dir)
{

 var mD = menuObj.menu[menuName][0];

 if (!mD.timer) mD.timer = 0;
 if (!mD.counter) mD.counter = 0;
 with (mD)
 {

  clearTimeout(timer);

  if (!lyr || !lyr.ref) return;

  if (dir==1) lyr.vis('visible');

  lyr.sty.zIndex = 1001 + dir;

  lyr.clip(0, 0, menuW+2, (menuH+2)*Math.pow(Math.sin(Math.PI*counter/20),0.75) );

  counter += dir;
  if (counter==11) { counter = 10; if (isDOM&&!isIE) lyr.sty.clip='' }
  else if (counter<0) { counter = 0; lyr.vis('hidden') }
  else timer = setTimeout(menuObj.myName+'.'+(dir==1?'show':'hide')+'Menu("'+menuName+'")', 40);
 }
}

if (!window.opera)
{
 pMenu.showMenu = new Function('mN','menuClip(pMenu, mN, 1)');
 pMenu.hideMenu = new Function('mN','menuClip(pMenu, mN, -1)');
}