// Keenspace dropdown originally by Steve Tonks
// Additional code by Brian West
// This code is freely distributable but is prohibited from being resold for profit

// The following variables setup the dropdown caption, logo, and signup page

	var caption="OpenKeen"
	var signup="www.keenspace.com/forums/Forum158/HTML/000024.html"
	var logo="gear.keenspace.com/images/scripts/openkeen.gif"

// 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://stalag99.keenspace.com","Stalag99")
comic1 = new Array("http://dm.keenspace.com","dragonmage")
comic2 = new Array("http://kippa.keenspace.com","Kippa")

// This should be the number of comics on your list.

comictotal=3



function goto_URL(object)
{
	window.location.href=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 i,r,tmp;
for (i=0; i<(comictotal-1); i++)
{
	r=Math.round(Math.random(comictotal-i))+i
	temp = randarray[r]
	randarray[r] = randarray[i]
	randarray[i] = temp;
}

document.write('<FORM><TABLE BORDER="0" CELLSPACING="0" CELLPADDING="0"><TR><TD ALIGN="CENTER"><FORM>');
document.writeln('<A HREF="http://',signup,'"><IMG SRC="http://',logo,'" border=0></a>');
document.writeln('<TR><TD ALIGN="center"><SELECT NAME="selectName" onChange="goto_URL(this.form.selectName)">');
document.writeln('<OPTION VALUE="" SELECTED>Select a ',caption,' strip!<\/OPTION>');

for (var i=0; i<(comictotal); i++)
{
	showcomic=eval("comic"+randarray[i])
	document.writeln('<OPTION VALUE="',showcomic[0],'">',showcomic[1],'<\/OPTION>');
}


document.writeln('<\/SELECT><\/TD><\/TR><\/FORM><\/TABLE>')