// PRE INCLUDES: lib.js

// Data format: ID, Name, Date Written, Date Published, Author, Email, Language
lineLen = 7;

lovePoems = [	
				"petals.js", "Life hanging from petals", MakeDate(2003,8,5), MakeDate(2003,8,7), , , "eng",
				"yoursky.js", "Around the corner under your sky", MakeDate(2000,5,21), MakeDate(2001,5,21), , , "eng",
				"empty.js", "Sharing emptiness (What love is about)", MakeDate(2000,1,25), MakeDate(2001,4,14), , , "eng",
				"givetime.html", "Give it time", MakeDate(1998,10,18), MakeDate(1998,10,18), , , "eng",
				"alie.html", "A Lie (to myself)", MakeDate(1998,9,22), , , , "eng",
				"short1.html", "Short Poem 1", MakeDate(1998,9,22), , , , "eng",
				"flower.html", "Blooming flower", MakeDate(1998,6,8), , , , "eng",
				"beach.html", "A beach made of sand, not dust", MakeDate(1998,6,26), , , , "eng",
				"flyheart.html", "Where will my heart fly me now?", MakeDate(1998,5), , , , "eng",
				"wsilk.html", "A Laughter of Wings of Silk", MakeDate(1998,4,22), , , , "eng",
				"macross.html", "Macross High", MakeDate(1998,4,21), , , , "eng",
				"mist.html", "Misty Thoughts", MakeDate(1998,3,20), , , , "eng",
				"crashin.html", "Crash into . . .", MakeDate(1998,3,12), , , , "eng",
				"festivity.html", "An Isolated festivity of Meditation", MakeDate(1998,3,8), , , , "eng",
				"nostalgic.html", "Pieces of Nostalgic Feelings in Fuge from my heart", MakeDate(1998,2,12), , , , "eng",
				"glimpse.html", "A glimpse of the future", MakeDate(1998,2,1), , , , "eng",
				"ghosts.html", "A tale of ghosts and chains", MakeDate(1997,11,null), , , , "eng",
				"untitled1.html", "Untitled poem", MakeDate(1997,8,null), , , , "eng",
				"brown_coat.html", "The Girl in the Brown Coat", MakeDate(1997,7,24), , , , "eng",
				"down.htm", "Falling Down", MakeDate(1997,6,null), , , , "eng",
				"maybe.htm", "Maybe a Shine of Love", MakeDate(1997,5,31), , , , "eng",
				"create.htm", "Create", MakeDate(1996,12,18), , , , "eng",
				"joyfligh.htm", "The Joy of Flight", MakeDate(1996,12,18), , , , "eng",
				"dagger.htm", "Dagger of Passion", MakeDate(1996,12,4), , , , "eng",
				"spreads.htm", "Love Spreads", MakeDate(1996,11,14), , , , "eng",
				"toannie.htm", "To Annie", MakeDate(1996,null,null), , , , "eng",
				"abtlove.js", "Afraid of love?", MakeDate(1996,null,null), , , , "eng",
				"love1.htm", "Love?!", MakeDate(1996,null,null), , , , "eng"]; 

darkPoems = [	
				"expecting.js", "Expecting (waiting to see)", MakeDate(2003,8,5), MakeDate(2003,8,7), , , "eng",
				"slowards.js", "Rushing things slowards", MakeDate(2002,7,26), MakeDate(2002,7,26), , , "eng",
				"dep.js", "Departure", MakeDate(2001,4,13), MakeDate(2001,4,13), , , "eng",
				"swirl.html", "A swril and curl away from fate", MakeDate(1999,12,16), , , , "eng",
				"cleardreams.js", "A Momentary clearance in one's dreams", MakeDate(1999,2,16), MakeDate(2001,4,14), , , "eng",
				"timetofall.js", "It's time to Fall", MakeDate(1999,2,16), MakeDate(2001,4,14), , , "eng",
				"livebubble.html", "I live in a Bubble", MakeDate(1998,5,8), , , , "eng",
				"semibound.html", "The Semi-Transparent Boundary", MakeDate(1998,2,4), , , , "eng",
				"uninertia.html", "Un-Inertia", MakeDate(1998,2,3), , , , "eng",
				"holding.html", "Holding onto a faint phantom of glory", MakeDate(1997,12,18), , , , "eng",
				"eternity.html", "Waiting for eternity", MakeDate(1997,11,null), , , , "eng", // (Beginning of November 97)
				"my_killer.html", "My Killer", MakeDate(1997,7,24), , , , "eng",
				"crash.htm", "The Crash", MakeDate(1997,1,25), , , , "eng",
				"csorrow.htm", "Our City of Sorrow", MakeDate(1996,12,21), , , , "eng",
				"anger.htm", "ANGER", MakeDate(1996,12,28), , , , "eng",
				"contrad.htm", "Contradictions", MakeDate(1996,11,19), , , , "eng",
				"fthought.htm", "Forgotten thoughts", MakeDate(1996,11,19), , , , "eng",
				"sdie.htm", "What if I should die?", MakeDate(1996,11,19), , , , "eng",
				"alive.htm", "Alive?", MakeDate(1996,11,14), , , , "eng",
				"end.htm", "The END", MakeDate(1996,11,14), , , , "eng",
				"nobody.htm", "Nobody", MakeDate(1996,null,null), , , , "eng",
				"never.htm", "NEVER", MakeDate(1996,null,null), , , , "eng",
				"un2.htm", "(untitled)", MakeDate(1996,null,null), , , , "eng",
				"un1.htm", "(untitled)", MakeDate(1996,null,null), , , , "eng",
				"killing.htm", "Killing Words", MakeDate(1996,null,null), , , , "eng",
				"fightt.htm", "Fight for Truth", MakeDate(1996,null,null), , , , "eng",
				"fading.htm", "Fading away...", MakeDate(1996,null,null), , , , "eng",
				"buried.htm", "Buried", MakeDate(1996,null,null), , , , "eng"]; 

portPoems = [	"mao.js", "Dá-me a tua mão", MakeDate(1999,1,16), MakeDate(2001,4,14), , , "pt",
				"frustracao2.js", "Frustração 2",  MakeDate(1998,12,22), , , , "pt",
				"domingo.js", "Nem todos os dias são Domingo (é tudo uma questão de tempo)", MakeDate(1998,11,22), MakeDate(2001,4,14), , , "pt",
				"outono.js", "Outono", MakeDate(1998,11,15), , , , "pt",
				"disforme.html", "Alma disforme/Fuga da Banalidade", MakeDate(1998,8,19), , , , "pt",
				"numpulo.html", "Num pulo", MakeDate(1998,6,25), , , , "pt",
				"frust.html", "Frustração - Preciso de morrer", MakeDate(1998,6,24), , , , "pt",
				"respirar.html", "Dei por mim a respirar um ar que não me era destinado", MakeDate(1998,6,5), , , , "pt",
				"acordei_morto.html", "Acordei Morto", MakeDate(1998,2,26), , , , "pt",
				"hoje.htm", "Um dia, hoje!", MakeDate(1997,6,10), , , , "pt",
				"revolta.htm", "A Revolta", MakeDate(1997,6,10), , , , "pt",
				"castanho.htm", "Sombras de caminhos estilizados pela unha da estrela mãe", MakeDate(1997,3,13), , , , "pt",
				"traje.htm", "Traje", MakeDate(1996,12,13), , , , "pt",
				"aimprev.htm", "Amor, o imprevísivel!", MakeDate(1996,11,24), , , , "pt",
				"escuro.htm", "ESCURO", MakeDate(1996,11,24), , , , "pt",
				"olhando.htm", "Olhando para trás", MakeDate(1996,11,19), , , , "pt",
				"anoite.htm", "A Noite", MakeDate(1996,null,null), , , , "pt",
				"paraque.htm", "Para quê?", MakeDate(1996,null,null), , , , "pt",
				"folhas.htm", "Folhas", MakeDate(1996,null,null), , , , "pt"];

stories = [	"azul.html", "Azul", MakeDate(1998,8,19), , , , "pt",
			"gargoyles.html", "Gargoyles", MakeDate(1998,2,8), , , , "eng"];

guests = [	"boneca.html", "Chamavam-lhe boneca", , , "Sara Gancho", "mikano@clix.pt", "pt",
			"spook1.html", "Untitled", , , "SpookShow_Baby", "a10926@lei.di.fct.unl.pt", "eng",
			"kalidora1.html", "Untitled", , , "Kalidora", "Kalidora@aol.com", "eng",
			"vegence.html", "Vengence", , , "Dawn T. and Kalidora", "CaitInRain@aol.com", "eng",
			"lostl.html", "A poem for a lost love", , , "Ladyfairchild", "tlmiller@pop.tgtel.com", "eng",
			"dep.html", "Depression", , , "Stephanie Homme", "steffy@bellsouth.net", "eng",
			"tracy.html", "3 Poems - Kill Me Tonight, Gone and Twisted", , , "Tracy", "Clumsy2713@aol.com", "eng",
			"finalw.html", "Final Words", , , "Linda van der Zande", "poems16@hotmail.com", "eng",
			"realb.html", "REALITY BREAK", , , "Shane S. Cox", "FUTURETCORP@webtv.net", "eng", // brother's email
			"prepax.html", "Presa à paixão", , , "Sandra Araújo", "isabel2876@hotmail.com", "pt",
			"vivpax.html", "Viver da Paixão", , , "Sandra Araújo", "isabel2876@hotmail.com", "pt",
			"gulls.html", "Gulls", , , "deunicorn", "deunicorn@usa.net", "eng",
			"music1.html", "Music", , , "deunicorn", "deunicorn@usa.net", "eng",
			"borges1.html", "A poem in English from Canada", , , "Miguel Borges", "nuno_borges@hotmail.com", "eng",
			"aroad.html", "Another Road", , , "Vahannus", "Vahannus@aol.com", "eng",
			"alove.html", "\"A Love\"", , , "Kathleen Esther Ware", "PureStar77@aol.com", "eng",
			"soulmate.html", "soul mate; i await", , , "ann horey", "annie@horey.silver-springs.nv.us", "eng",
			"crucible.html", "Crucible", , , "Gus", "lorain@execpc.com", "eng",
			"blackw.htm", "Wedding in Black", , , "RtlnBoy", "RtlnBoy@aol.com", "eng",
			"hitme.htm", "And Then He Hit Me", , , "Holly Day", "yves@orbiter.com", "eng",
			"guybrook.htm", "To Some Guy in Brooklyn", , , "Holly Day", "yves@orbiter.com", "eng",
			"transc.htm", "It Of Transcendental (buried starlight)", , , "Holly Day", "yves@orbiter.com", "eng",
			"mindst.htm", "Minds Touch", , , "Kathleen Esther Ware", "PureStar77@aol.com", "eng",
			"danca.htm", "Dan&ccedil;a", , , "Myrkr", "metalslave@mail.telepac.pt", "pt", // (Spring 1997)
			"loss.htm", "LOSS", , , "Myrkr", "metalslave@mail.telepac.pt", "eng"]; // (Winter 1997)

phrases = [];


function WriteLink(lnk, label, url)
{
  // URL
  if (lnk != null) {
	document.write('<a href="');
	if (lnk.substring(lnk.length - 5, lnk.length) == ".html" || lnk.substring(lnk.length - 4, lnk.length) == ".htm")
		document.write('texts/' + lnk + '">');
	else
		document.write(url+lnk+'">');
  }

  // Label
  if (label != null)
  	document.write(label);

  if (lnk != null)
  	document.write('</a>');
}


// options: new, sort, dispLang
lists = [lovePoems, darkPoems, portPoems, stories, guests, phrases];

function List(n, limit, txt_limit)
{
  list = lists[n-1];
  listLen = list.length / lineLen;

  if (limit != null)
	limit = min(limit, listLen);
  else
	limit =  listLen;

  for (var i = 0; i < limit; i++)
  {
	// Name
	WriteLink(list[lineLen*i], IntroString(list[lineLen*i+1], txt_limit), 'read.shtml?'+n+','+i+',');

	// Date
	if (list[lineLen*i+2] != null)
	{
		document.write(' <font color=#cccccc>(');
		WriteDate(list[lineLen*i+2]);
		document.write(')</font>');
	}

	// New
	if (list[lineLen*i+3] != null && list[lineLen*i+3].getTime() > ((new Date()).getTime() - 90*86400000))
		document.write(' new');

	// Author
	if (list[lineLen*i+4] != null)
	{
		document.write(' <font color=#cccccc>(<span class=author>');
		WriteLink(list[lineLen*i+5], list[lineLen*i+4], 'mailto:');
		document.write('</span>)</font>');
	}

	// BR
	if (list[lineLen*i] != null) {
		document.write('<br>');
	}

  }

  if (listLen > limit)
	document.write('<a href="list.shtml?'+n+'">(more)</a>');
}