// The following variables setup the dropdown caption, logo, and signup page

	var spot=new Array()

	var caption="Elven"

	var signup="forums.keenspace.com/viewtopic.php?t=63951"

	var homepage="http://theelven.com/keenelven/"

	var q = "'";

	var gpath="";



// Add your comics here, use this as a guide:

//	comicX=new Array("url","name of comic")

//    Replace X with the next number

//    Replace url with the address of the comic

//    Replace the name with the name of the comic



	comic0 = new Array("http://theelven.com/keenelven/","Keenelven Member Page","http://www.theelven.com/keenelven/keenelven1.png","The Keenelven Home Page")

comic1 = new Array("http://dungeondamage.keenspace.com/","Dungeon Damage","http://www.theelven.com/keenelven/ddbutton.gif","Visit a different, fantastic Europe. In the 12th Century, four adventurers band together to fight evil. Now if they could just stop bickering... Features gorgeous art and violent content.")

comic2 = new Array("http://legendoffour.keenspace.com","Legend of the Four","http://www.theelven.com/keenelven/keenelven_L4.JPG","Storm and Undine are suddenly learning that they're not normal... A non-human past life is slowly resurfacing, and the people they once knew are coming back to find them. Everything that was never real... IS.")

	comic3 = new Array("http://www.runewoods.com/wildhunt/","WildHunt","http://www.runewoods.com/wildhunt/WildHunt_banner1.jpg","A trio of bounty hunters find that even happiness can carry a price, that some bonds can never be undone, and that even darkness has its own nightmares.")

comic4 = new Array("http://motdw.keenspace.com/","Misadven of Drow Wizard","http://www.theelven.com/keenelven/motdwbanner.jpg","Misadventures of the Drow Wizard: As the title says, it's about the misadventures of the young clumsy dark elf wizard by the name of Lym'ree Kil'rahel. Drama, adventure, and humor")

comic5 = new Array("http://elvenfate.keenspace.com/","Elven Fate","http://www.theelven.com/keenelven/elvenfate.gif","An elven prince must decide to either follow his heart, or let duty stand in the way of eternal happiness with the one he loves.")

comic6 = new Array("http://elvendeities.keenspace.com/","Elven Deities","http://www.theelven.com/keenelven/elvendeities.jpg","The Elven race has been divided for thousands of years. The ''Dark Elves'' live above ground and are the general ''good guys'' and the ''Light Elves'' live underground and are the general ''bad guys''(although as in with any race, you get good with bad). The gods are pissed at everyone and plan to do something about it. Some gods are in favor, others aren't so keen on the idea.")

comic7 = new Array("http://toliveinemeralds.keenspace.com/","To Live in Emeralds","http://www.theelven.com/keenelven/toliveinemeraldsKeenElven.gif","Two elves in a world of magic and science travel around the world trying to save what they hold dear.")

	comic8 = new Array("http://lleugarnock.comicgenesis.com/", "The Elves of LleuGarnock", "http://www.comicgenesis.com/IXP/M/lleugarnock_lg%20med%20banner.jpg", "The story of two grumpy teenage elves, a twin brother and sister, who must work together to save their world.")

comic9 = new Array("http://theelven.keenspace.com","The Elven","http://www.theelven.com/keenelven/banner.gif","A ragtag group of young cute elven explorers struggling to battle their way past the dangerous villains and demons that want to end their mission at the edge of a knife or claw.")

comic10 = new Array("http://dragonmail.keenspace.com/","Dragon Mail","http://www.theelven.com/keenelven/DragonMailBannerMini.gif","An epic story told in a comedic way, but it took itself seriously! �Una historia �pica contada en clave de humor, pero que se toma a si misma en serio!")

comic11 = new Array("http://darken.keenspace.com/","Darken","http://www.theelven.com/keenelven/komibanner.gif","Following the adventures of a dark knight, an evil priestess, an unfortunate drow, a thief and a Duchess in their quest to take over the world, or at least the parts with money in.")

	comic12 = new Array("http://elvenlacryment.com/","Elven Lacryment","http://elvenlacryment.com/ELbutton4.jpg","A world where magic and technology is a bastardized, hybrid joke of itself.\nA triad of Elves take up weapons for and against fate.\nThe Soldier. The Sociopath. The Executioner.\nElven Lacryment\nWritten by Q\nIllustrated by Alex Moore")

comic13 = new Array("http://princeofcastles.comicgenesis.com/","Prince of Castles","http://www.theelven.com/keenelven/princeofcastles.jpg","The Kingdom of Castles is in peril! Their Prince, the primary defense of the kingdom, has gone missing under a veil of political turmoil! Now Arashi, a powerful mage elf from the Kingdom of Forrests, and Drania, an amnesiac warrior drifting on the edge of the Kingdom of Castles, are called together to fight the imperial Kingdom of Blades and search for the Prince of Castles!")

	comic14 = new Array("http://drowloveistoughlove.comicgenesis.com/", "Drow Love is Tough Love", "http://i25.tinypic.com/dh9t20.png", "Four drow, two elves, a half elf, a human, and a halfling travel to the Underdark. What will happen, we do not know.")
	
	comic15 = new Array("http://betweenplaces.comicgenesis.com/", "Between Places", "http://i8.photobucket.com/albums/a10/angstypen/sigs/200x40.jpg", "The elements must band together to save the planet Mysada from extrodinary life forms, more commonly known to the people as elves...")


// Number of comics in the list.

comictotal=16



function goto_URL(object)

{

	open(object.options[object.selectedIndex].value);

}



// Create an array equal to the number of comics

var randarray=new Array()

for (i=0; i<comictotal; i++)

{

	randarray[i]=i

}





// Randomize the array

var j,k;

var tmp;

for (j = 1; j < (comictotal-1); j++) {

	k=Math.floor(Math.random()*(comictotal-1))+1;

	temp = randarray[k]

	randarray[k] = randarray[j]

	randarray[j] = temp;

}



k=Math.floor(Math.random()*(comictotal-1))+1;

spot=eval("comic"+k)



document.write('<FORM CLASS="keenelven_dropdown"><CENTER><A HREF="',spot[0],'" title="',spot[3],'" target="_blank">');

bannerize(spot);

document.write('</a>');



document.write('<SELECT NAME="selectName" style="font-family:monospace" onChange="goto_URL(this.form.selectName)">');

fSpace(comic0[1])

document.write('<OPTION style="font-family:monospace" VALUE="',comic0[0],'">',space,comic0[1],bspace,'<\/OPTION>\n');

fSpace('Select an '+caption+' strip!')

document.write('<OPTION style="font-family:monospace" SELECTED>',space,'Select an ',caption,' strip!',bspace,'<\/OPTION>\n');

for (var i=1; i<12; i++)

{

	var temparray = randarray.slice(1,14).sort(sortByName);

	showcomic=eval("comic"+temparray[i])

	fSpace(showcomic[1]);

	document.write('<OPTION style="font-family:monospace" VALUE="',showcomic[0],'">',space,showcomic[1],bspace,'<\/OPTION>');

}

fSpace("More")

document.write('<OPTION style="font-family:monospace" VALUE="',homepage,'">',space,'MORE',bspace,'<\/OPTION>\n');

fSpace("Click Here To Join")

document.write('<OPTION style="font-family:monospace" VALUE="http://',signup,'">',space,'Click HERE To Join',bspace,'<\/OPTION>\n');

document.write('<\/SELECT><\/CENTER><\/FORM>');



function sortByName(a,b){

	var aa = eval("comic"+a)

	var bb = eval("comic"+b)

	if (aa[1].charCodeAt(0)!=bb[1].charCodeAt(0))

	{return aa[1].charCodeAt(0)-bb[1].charCodeAt(0);}

	else

	{return aa[1].charCodeAt(1)-bb[1].charCodeAt(1);}

}



function bannerize(spott)

{		

	document.write('<img class="banner" src="');

	spott[2] = (spott[2].slice(0,4)=="http")?spott[2]:(spott[2]=="default")?(gpath+defaultimg):(gpath+spott[2]);

	document.write(spott[2],'" alt="',spott[1],'" border=0 width=200 height=40 /><br />\n');

}



function showList()

{

	randarray.sort(sortByName);

	for (var j = 0; j < (comictotal); j++) 

	{

		showcomic=eval("comic"+randarray[j])

		document.write('<div class="spot">');

		document.write('<A HREF="',showcomic[0],'" target=_new>');

		if (showcomic[2] != "default") { bannerize(showcomic); document.write(showcomic[1]); }

		else { document.write('\n<h3>',showcomic[1],'</h3>\n'); }

		document.write('<p>',showcomic[3],'</p>');

		document.write('</a></div>\n');

	}

}



function fSpace(strinj)

{	spaces = (22 - strinj.length) / 2;

	spacer = "-"; space = ""; bspace = "";

	for (var j=0; j < spaces; j++) {space = space+spacer;}

	bspace = space;

	if (bspace.length + space.length + strinj.length != 23) space=space+spacer

	if (strinj.length >= 23) {space="";bspace="";}

}
