// alt-tolkien.com

// popup function
popW =""
function pop(link,w,h,l,t){
  // eg <A HREF="javascript:pop('pix:pam.jpg','300','400','20','c')">Test</A>

  h = parseInt(h)+20
  w = parseInt(w)
  topPos  = parseInt(t);
  leftPos = parseInt(l); 

  // center popup window if asked for
  if (t == 'c') {
    if (screen) {topPos = (screen.height - h)/2}
    if (topPos <0) {topPos = 10}
  }
  if (l == 'c') {
    if (screen) {leftPos = (screen.width - w)/2}
    if (leftPos <0) {leftPos = 10}
  }

  if (popW && !popW.closed){
    popW.close()
  }

  evalStr = "popW = open('popup.html?close.html&"+link+"','popW','status=no,menubar=no,toolbar=no,location=no,resizable=no,left="+leftPos+",top="+topPos+",height="+h+",width="+w+"');"
  eval(evalStr);
  popW.focus();

} // end of pop() function

// alternative popup
function altW(){
   evalStr = "newWindow = open('alt.html','NewW','status=no,location=no,resizable=no,left=200,top=10,height=450,width=400');"
   eval(evalStr);
   newWindow.document.close();
   newWindow.focus();
}

// above menu bar
aoStr = '<SPAN CLASS="footer">:: <A HREF="gateway.html">members<\/A> :: <A HREF="search.html">search<\/A> :: <\/SPAN>&nbsp;&nbsp;&nbsp;<SPAN CLASS="aohead"><A HREF="index.html">middle-earth reunion : the alternative tolkien society<\/A><\/SPAN>&nbsp;&nbsp;&nbsp;<SPAN CLASS="footer"> :: <A HREF="contactus.html">contact us<\/A> :: <A HREF="index.html">home<\/A> ::<\/SPAN><BR>'

// footer
var lastMod = document.lastModified ; 
footerStr = '<HR><CENTER><P CLASS="menuNN"><A HREF="#top">top</A> ~ <A HREF="index.html">home</A> ~ <A HREF="sitemap.html">map</A> ~ <A HREF="preview.html">preview</A></P></CENTER><P CLASS="footer">This page was last changed on '+lastMod+'. This website is crafted for <A HREF="mer.html">Middle-earth Reunion</A> by <A HREF="meetmb.html">Martin Baker</A> and hosted at <A HREF="http://alt-tolkien.com">http://alt-tolkien.com</A>. If you have any problems please contact Martin at <A HREF="mailto:webmaster@alt-tolkien.com">webmaster@alt-tolkien.com</A>. The views and opinions expressed here are those of the individual authors and are not necessarily those of Middle-earth Reunion.</P><P CLASS="footer">Please support <a href="http://www.whitetreefund.org" target="_blank">The White Tree Fund</a> ~ Tolkien fans for survivors of the tsunami disaster</P></CENTER>'

// add stats to footer
footerStr+='<img src="/cgi-bin/axs/ax.pl?mode=img&ref='+escape(document.referrer)+'" height="1" width="1" style="display:none" alt=""/>'


// menus
menuStr = '<CENTER><A NAME="top"></A><FORM NAME="menubar" CLASS="menuNN">'+aoStr

// menu 1
menuStr+='<SELECT NAME="m1" CLASS="menuIE" onChange="jumpPage(this.form.m1)">'
menuStr+='<OPTION CLASS="firstitem" VALUE="" SELECTED>Explore&nbsp;&nbsp;</OPTION>'

menuStr+='<OPTION VALUE="backissues.html">Back issues</OPTION>'

// menuStr+='<OPTION VALUE="gateway.html">Members\' area</OPTION>'
// menuStr+='<OPTION VALUE="http://alt-tolkien.com/cgi-bin/ikonboard/ikonboard.cgi">Discussions</OPTION>'

menuStr+='<OPTION VALUE="preview.html">Preview</OPTION>'
menuStr+='<OPTION VALUE="sitemap.html">Site map</OPTION>'
menuStr+='<OPTION VALUE="new.html">New/changes</OPTION>'
menuStr+='<OPTION VALUE="random.html">Random page</OPTION>'
menuStr+='<OPTION VALUE="search.html">Search engine</OPTION>'
menuStr+='<OPTION VALUE="links.html">Links</OPTION>'
menuStr+='<OPTION VALUE="index.html">Home page</OPTION>'
menuStr+='</SELECT>'

// menu 2
menuStr+='<SELECT NAME="m2" CLASS="menuIE" onChange="jumpPage(this.form.m2)">'
menuStr+='<OPTION CLASS="firstitem" VALUE="" SELECTED>Perilous Realms&nbsp;&nbsp;</OPTION>'

menuStr+='<OPTION VALUE="prealms.html">Overview</OPTION>'
menuStr+='<OPTION VALUE="darkness.html">Nature of darkness</OPTION>'
menuStr+='<OPTION VALUE="fey.html">Fey meetings</OPTION>'
menuStr+='<OPTION VALUE="places.html">Other places</OPTION>'
menuStr+='<OPTION VALUE="lore.html">Middle-earth lore</OPTION>'
menuStr+='<OPTION VALUE="tms.html">The Tresco MS</OPTION>'
menuStr+='<OPTION VALUE="tms.html">Life, Leaf &amp; Stone</OPTION>'
menuStr+='</SELECT>'

// menu 3
menuStr+='<SELECT NAME="m3" CLASS="menuIE" onChange="jumpPage(this.form.m3)">'
menuStr+='<OPTION CLASS="firstitem" VALUE="" SELECTED>By Hand &amp; Heart&nbsp;&nbsp;</OPTION>'
menuStr+='<OPTION VALUE="byauthor.html">Writing by author</OPTION>'
menuStr+='<OPTION VALUE="byissue.html">Writing by issue</OPTION>'
menuStr+='<OPTION VALUE="art.html">Art gallery</OPTION>'
menuStr+='</SELECT>'

// menu 4
menuStr+='<SELECT NAME="m4" CLASS="menuIE" onChange="jumpPage(this.form.m4)">'
menuStr+='<OPTION CLASS="firstitem" VALUE="" SELECTED>Games</OPTION>'
menuStr+='<OPTION VALUE="quiztest.html">Take the quiz</OPTION>'
menuStr+='<OPTION VALUE="gametile.html">Crazy tiles</OPTION>'
menuStr+='<OPTION VALUE="mapgame.html">It\'s a drag!</OPTION>'
menuStr+='<OPTION VALUE="dowse0.html">Map dowsing</OPTION>'
menuStr+='</SELECT>'

// menu 5
menuStr+='<SELECT NAME="m5" CLASS="menuIE" onChange="jumpPage(this.form.m5)">'
menuStr+='<OPTION CLASS="firstitem" VALUE="" SELECTED>In Fellowship</OPTION>'
menuStr+='<OPTION VALUE="gateway.html">Members\' area</OPTION>'

// menuStr+='<OPTION VALUE="http://alt-tolkien.com/cgi-bin/ikonboard/ikonboard.cgi">Discussions</OPTION>'

menuStr+='<OPTION VALUE="mer.html">Who are we?</OPTION>'
menuStr+='<OPTION VALUE="contactus.html">Contact us</OPTION>'
//menuStr+='<OPTION VALUE="joinus.html">Join us!</OPTION>'
menuStr+='</SELECT><BR></FORM></CENTER>'

function jumpPage(subForm) {
  newPage = subForm.options[subForm.selectedIndex].value ;
  if (newPage != "") {
     window.location.href = newPage ;
  }
}

// flash randomiser
flashes = new Array;

flashes[0] = '<DIV CLASS="flash"><A HREF="new.html">What\'s new at this site?</A></DIV>'
flashes[1] = '<DIV CLASS="flash"><A HREF="art.html">The best original artwork</A></DIV>'
flashes[2] = '<DIV CLASS="flash"><A HREF="byauthor.html">Read the best authors here!</A></DIV>'
flashes[3] = '<DIV CLASS="flash"><A HREF="vcalc.html">What is <I>your</I> LIFE-vision?</A></DIV>'
flashes[4] = '<DIV CLASS="flash"><A HREF="random.html">Try a random page?</A></DIV>'
flashes[5] = '<DIV CLASS="flash"><A HREF="darkness.html">The Nature of Darkness</A></DIV>'
flashes[6] = '<DIV CLASS="flash"><A HREF="contactus.html">Tell us what you think of us</A></DIV>'
flashes[7] = '<DIV CLASS="flash"><A HREF="tms.html">What <I>is</I> the Tresco MS?</A></DIV>'
flashes[8] = '<DIV CLASS="flash"><A HREF="prealms.html">Enter the Perilous Realms</A></DIV>'
flashes[9] = '<DIV CLASS="flash"><A HREF="http://www.whitetreefund.org" target="_blank">Support the White Tree Fund</A></DIV>'
flashes[10] = '<DIV CLASS="flash"><A HREF="http://www.whitetreefund.org" target="_blank">TWTF for tsunami relief</A></DIV>'

randct = flashes.length
var randnum = Math.random();
randnum = Math.round( (randnum * randct) + 0.5 )-1 ;
flashStr = flashes[randnum];

// override
flashes2 = new Array;
flashes2[0] = '<DIV CLASS="flash"><A HREF="http://www.merrillvalleyphotography.co.uk">Merrill Valley Photography</A></DIV>'
flashes2[1] = '<DIV CLASS="flash"><A HREF="http://www.merrillvalleyphotography.co.uk">Photo restoration &amp; image engineering</A></DIV>'
flashes2[2] = '<DIV CLASS="flash"><A HREF="http://www.merrillvalleyphotography.co.uk">Selling gallery by Martin Baker</A></DIV>'

randct = flashes2.length
var randnum = Math.random();
randnum = Math.round( (randnum * randct) + 0.5 )-1 ;
flashStr = flashes2[randnum];




// end scripts.js