// index.html scripts

// quote of the day

Inf     = new Array;
Url     = new Array;
Inf[0] = "'Good evening, little master!' he breathed companionably. He reached half a dry loaf of bread from the pouch and scattered crumbs in the grass. The mouse hesitated a moment before settling down to eat between the high leather boots.";
Url[0] = "r31wizard.html";
Inf[1] = "How many are there? In the past few months I have met ... Kai, Ellen, Jon, Forge and Rose. Then there are Kai and Ellen's parents who were at the Green Festival ... that's seven. Sounds a lot - like I'm surrounded by Elves, doesn't it? It does make you think, though.";
Url[1] = "r17away.html";
Inf[2] = "A large wooden sphere that hovered an inch or two above the sand. An onyx pyramid. A block of green marble six feet by four by three. Upon this unlikely bed (or was it an altar?) Galadriel lay, naked and outstretched, beneath the tortured sky.";
Url[2] = "r21poser.html";
Inf[3] = "That woman has a positively elven air about her, I thought, and suddenly wondered at myself. Elves, with short, blue hair?";
Url[3] = "r27elven.html";
Inf[4] = "How is Galadriel, then, able to shut out Sauron seeing HER thoughts? Simple: Nenya is mightier than the Nine. That must absolutely infuriate Sauron, too, don't you think?";
Url[4] = "r23ring.html";
Inf[5] = "But what are we to make of Hundred's first-hand accounts of the ylfe: his assertion that the West Country, 'the ancient realm of Dumnonia, that men now call Wessex', was in his day the last mainland habitation of elven kind?";
Url[5] = "r4trescoms.html";
Inf[6] = "She felt them marring her face, cutting, shaping, slicing<BR>Then her body was broken and held to heal in broken posture<BR>She wept in garbled sorrow - They laughed<BR>And then she saw him";
Url[6] = "r31broken.html";
Inf[7] = "Since reaching the age of discretion I have served the Mother Goddess as well as learning and circumstances have allowed, and am Pagan, and Brother to Dragons and Companion of Owls.";
Url[7] = "r3testament.html";
Inf[8] = "A dumpy little woman in a retro tweed suit taking two steps for every one of the tall, bony archosauroid beside her, whose featherfurred tail peeked out from under his overcoat.";
Url[8] = "r22oxon.html";
Inf[9] = "Officially, Tolkorp venerated the Professor's works in the very act of appropriating them to the corporate cause. So far as docrine ran, Tolkorp's vision of Middle-earth was indistinguishable from Tolkien's own.";
Url[9] = "r26josef.html";

now = new Date;
xxx = now.getDate() % 10 ;
if (now.getDate() == 31) { xxx = 6 }

// xxx = 0

todaysQuote = Inf[xxx];
todaysUrl   = Url[xxx];
quoteStr = "<SPAN CLASS='quote'><TABLE BORDER=0 WIDTH=100% CELLSPACING=0 CELLPADDING=5><TR><TD COLSPAN=2><P><B>Quote for today ...<\/B><\/P><\/TD><\/TR><TR><TD COLSPAN=2 ALIGN=left><P><I>"+todaysQuote+"<\/I><\/P><\/TD><\/TR><TR><TD COLSPAN=2><P CLASS=small><A HREF='"+todaysUrl+"'>Read more<\/A> ~ something new tomorrow<\/P><\/TD></TR><\/TABLE><\/SPAN>";


// site of the week

Site = new Array;
Site[0] = '<B>Renewal, Healing, Enduring hope<\/B> "The earthquake and tsunami disaster along the coasts of the Indian Ocean have wreaked unimaginable devastation and chaos. <A HREF="http://www.whitetreefund.org" TARGET="_blank">The White Tree Fund<\/A> has been formed by the Tolkien/Lord of the Rings community to respond to the need of victims."'
Site[1] = 'An Imaginary Island in the Real World: Antony Swithin\'s <A HREF="http://www.lights.com/rockall" TARGET="_blank">Rockall<\/A>'
Site[2] = 'Kent Krumviesa\'s <A HREF="http://www.dreamborn.com/m_guide.html" TARGET="_blank">Middle-earth Angling guide<\/A>, Fly Book and ongoing Fishing Journal reveal his vision of the waterways of Middle-earth.  Don\'t let this one get away!'
Site[3] = 'Amazing <A HREF="http://www.japan.co.jp/~snllbl/" TARGET="_blank">hand-painted boxes<\/A>, crafted by Spencer Lee to contain his collection of Middle-earth gaming miniatures. Sublime.'
Site[4] = '<A HREF="http://suite101.com/welcome.cfm/tolkien" TARGET="_blank">JRR Tolkien &amp; Middle-earth<\/A>: early essays at this Suite101 site are by Michael Martinez, author of "Visualizing Middle-earth". The site is now run by Douglas Charles Rapier.'
Site[5] = 'Don\'t be sheepish - visit <A HREF="http://www.stansborough.co.nz/index.cfm?fuseaction=catalogue.category&category_id=1" target="_blank">Stansborough\'s<\/A> website for their excusive range of woollen merchandise including limited edition Elven cloaks as worn in the movies! Also ties, wraps &amp;c in the same glorious fabric.'

yyy = 5 ;
if (now.getDate() <= 26) { yyy = 4 }
if (now.getDate() <= 20) { yyy = 3 }
if (now.getDate() <= 15) { yyy = 2 }
if (now.getDate() <= 10) { yyy = 1 }
if (now.getDate() <=  5) { yyy = 0 }

//yyy = 5

siteStr = '<P CLASS="mini" ALIGN="left"><I>Editor\'s choice:<\/I> '+Site[yyy]+'<\/P>'


// slideshow

myPix = new Array;
link = new Array;

myPix[0] = "pix/loop1.jpg";
link[0]  = "r21poser.html";

myPix[1] = "pix/loop2.jpg";
link[1]  = "r3erratic.html";

myPix[2] = "pix/loop3.jpg";
link[2]  = "r8gest.html";

myPix[3] = "pix/loopc.jpg";
link[3]  = "r27kindling.html";

myPix[4] = "pix/loop5.gif";
link[4]  = "r18hawthorn.html";

myPix[5] = "pix/loopa.jpg";    
link[5]  = "r26josef.html";

myPix[6] = "pix/loop7.gif";
link[6]  = "r20muse.html";

myPix[7] = "pix/loopb.gif";
link[7]  = "r24tinwen.html";

myPix[8] = "pix/loop9.gif";
link[8]  = "r16stars.html";

myPix[9] = "pix/loopd.jpg";
link[9]  = "r31wizard.html";

myPix[10] = "pix/loope.jpg";
link[10]  = "r26street.html";

myPix[11] = "pix/loopf.jpg";
link[11]  = "r35ditch.html";


imgCt = myPix.length - 1;

var zzz = Math.random();
thisPic = Math.round( (zzz * myPix.length) + 0.5 )-1 ;

function processPrevious() {
  if (document.images) {
    thisPic--
    if (thisPic <0) {
       thisPic = imgCt
    }
    document.myPicture.src = myPix[thisPic]
  }
}

function processNext() {
  if (document.images) {
    thisPic++
    if (thisPic > imgCt) {
       thisPic = 0
    }
    document.myPicture.src = myPix[thisPic]
  }
}

function newLocation() {
  document.location.href = link[thisPic]
}

galleryStr = '<DIV CLASS="footer" ALIGN="right"><A HREF="javascript:newLocation()"><IMG height=140 src="'+myPix[thisPic]+'" width=125 align=left name="myPicture" alt="Gallery" border="0"><\/A><BR CLEAR="left"><A HREF="javascript:processPrevious()">&lt;&lt;<\/A>&nbsp;&nbsp;<A HREF="javascript:processNext()">&gt;&gt;<\/A>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<A HREF="javascript:newLocation()">jump<\/A><\/DIV>'

function loadGallery() {
  if (document.images) {
    img1 = new Image ; img1.src = "pix/loop1.jpg";
    img2 = new Image ; img2.src = "pix/loop2.jpg";
    img3 = new Image ; img3.src = "pix/loop3.jpg";
    img4 = new Image ; img4.src = "pix/loopc.jpg";
    img5 = new Image ; img5.src = "pix/loop5.gif";
    img6 = new Image ; img6.src = "pix/loopa.jpg";    
    img7 = new Image ; img7.src = "pix/loop7.gif";
    img8 = new Image ; img8.src = "pix/loopb.gif";
    img9 = new Image ; img9.src = "pix/loop9.gif";
  }
}

// kudos

Kudos  = new Array;
Kudos[0] = "Thanks for working so hard on Middle-earth Reunion, and give my thanks to all the talented people who have been contributing to the magazine lately! - K"
Kudos[1] = "What a marvelous idea. The continuation of the saga. - C"
Kudos[2] = "I love this site because it's unusual and very well - organized. All the materials here are interesting and easy to get. - N"
Kudos[3] = "I really like the different angle that you guys are taking when you look at Tolkien's work. - N"
Kudos[4] = "Your community seems to be mad enough to join. - V"
Kudos[5] = "I am fascinated by the Middle-earth Reunion - I think it's an exciting way to meet other obsessive fans like myself and share my views with them! - S"
Kudos[6] = "I love your musings!  Although sometimes fanciful and at times hard to follow, I feel that there are some valid thoughts that should be followed through. - D"
Kudos[7] = "I like Middle-earth Reunion as it is different from the countless other Tolkien sites I come across. - P"
Kudos[8] = "I have always felt that there was something of ... not just truth, but reality, to what Prof Tolkien was saying. Reality masked as fiction. This group feels the same way, and what's more, seems to have collected evidence. And, to quote Samwise Gamgee 'I would dearly love to see ELVES, sir!' - R"
Kudos[9] = "Wow. I never expected to find anything like Middle-earth Reunion; I thought I was the only one. Thank you. - C"
Kudos[10] = "Some of the viewpoints presented here are very interesting and away from mainstream Tolkiendom. - E"
Kudos[11] = "I am a total lotr freak. Your fanfic is great!!! - R"
Kudos[12] = "I was absolutely spell bound by the beautiful words written on this site and want to know more, as I too love all things Tolkien. - N"
Kudos[13] = "I'm not sure i understand any of it but seems to interest me. - S"
Kudos[14] = "And what I like about this site is that you seem to let the first ages of Middle-earth live now without having to use the movies. - J"
Kudos[15] = "A beautiful place, somewhere between the realm of scholastic analysis and fan fiction. Well done! - J"

var zzz = Math.random();
thisK   = Math.round( (zzz * Kudos.length) + 0.5 )-1 ;

kudosStr = Kudos[thisK]

kudosStr = '<P CLASS="small" ALIGN="left"><SPAN class="blue"><I>The nice things people say:<\/SPAN><\/I> '+Kudos[thisK]+'<BR>&nbsp;<\/P>'




