<!-- ShowList.js -->
<!--

function ShowList() {

	// variables
	this.shows = new Array();
	this.messages = new Array();
	this.numOfMessages = 5;
	
	//methods
	this.addShow = addShow;
	this.getShow = getShow;
	this.initList = initList;
	this.printTable = printTable;
	this.getCurrentMessages = getCurrentMessages;
	this.addMessage = addMessage;

	this.initList();
}

function addShow(show) {
	this.shows[this.shows.length] = show;
	this.shows.sort(compareDate);
}

function addMessage(mess) {
	this.messages[this.messages.length] = mess;
}

function getShow(showNum) {
	return(this.shows[showNum]);
}

function printTable() {
	converter = new ShowTableConverter(this.shows);
	converter.printTable();
}

function compareDate(a, b) {
	var splitDate = a.date.split(a.dateTokenizer);
	var aMonth = splitDate[0];
	var aDay = splitDate[1];
	var aYear = splitDate[2];
	
	splitDate = b.date.split(b.dateTokenizer);
	var bMonth = splitDate[0];
	var bDay = splitDate[1];
	var bYear = splitDate[2];

	var dif = aYear - bYear;
	if (dif != 0) return dif;

	dif = aMonth - bMonth;
	if (dif != 0) return dif;

	dif = aDay - bDay;
	if (dif != 0) return dif;

	return 0;
}

function getCurrentMessages(num) {
	var goodShow = null;
	var i = 0;
	var counter = 0;
	var retVal = new Array();

	while (i < this.shows.length) {
		if (!this.shows[i].isOld()) {
			goodShow = this.shows[i];
			break;
		}
		i++;
	}

	var selIndexes = new Array();
	while (selIndexes.length < num) {
		var rVal = 0;
		if (goodShow != null) {
			rVal = Math.floor((Math.random() * (this.messages.length + 1))) - 1;
		} else {
			rVal = Math.floor((Math.random() * (this.messages.length)));
		}
		if (!containsElement(selIndexes, rVal)) {
			selIndexes[selIndexes.length] = rVal;
		}
	}

	for (var i = 0; i < selIndexes.length; i++) {
		if ((selIndexes[i] == -1) && (goodShow != null)) {
			retVal[i] = "<font class='menuItemStrong'>upcoming show</font>: " + goodShow.getAsMessage();
		} else {
			retVal[i] = this.messages[selIndexes[i]];
		}
	}

	return retVal;
}

function containsElement(ar, ele) {
	var retVal = false;
	for (var i = 0; i < ar.length; i++) {
		if (ar[i] == ele) {
			retVal = true;
			break;
		}
	}
	return retVal;
}

function initList() {
	// bands
	var shiner = new Band("shiner", "http://www.shiner.net");
	var houston = new Band("houston", "http://www.onesimpleband.com");
	var sundayFlood = new Band("sunday flood", "http://villa.lakes.com/rock/sundayflood");
	var eniac = new Band("eniac", null);
	var parkLegend = new Band("the park legend", null);
	var cursive = new Band("cursive", "http://www.crankthis.com/cursive.htm");
	var recover = new Band("recover", null);
	var popUnknown = new Band("pop unknown", "http://www.popunknown.com");
	var smartyPants = new Band("smarty pants", "http://members.home.net/panther84/smartypants");
	var redAnimalWar = new Band("red animal war", "http://www.redanimalwar.com");
	var noMeansNo = new Band("NOMEANSNO", null);
	var g4c = new Band("glory for champions", null);
	var exumaSound = new Band("exuma sound", null);
	var glytch = new Band("glytch", null);
	var sonnet = new Band("sonnet", null);
	var dfb = new Band("dog face boy", "http://www.normanmusicscene.com/artists/dogfaceboy.htm");
	var ks = new Band("klipspringer", null);
	var nf = new Band("ninja finja", null);
	var q = new Band("q", null);
	var ros = new Band("riddle of steel", "http://www.riddleofsteel.org/");
	var rc = new Band("ring cicada", null);
	var ed = new Band("ester drang", null);
	var rtf = new Band("return to forever", null);
	var gunfighter = new Band("gunfighter", "http://www.gunfightermusic.com");
	var funWithDirt = new Band("fun with dirt", null);
	var tyko = new Band("tyko", null);
	var str = new Band("season to risk", "http://www.seasontorisk.com");
	var edTemple = new Band("ed temple", null);
	var movement = new Band("the movement", null);
	var doosu = new Band("doosu", "http://www.doosu.com");
	var pinkston = new Band("pinkston", "http://www.lastbeatrecords.com/bands/pinkston/");
	var sn = new Band("storied northwest", "http://www.thestoriednorthwest.com");
	var lc = new Band("lash casino", null);
	var dn = new Band("dirt nap", "http://www.dirt-nap.net/");
	var overstep = new Band("overstep", null);
	var fmoh = new Band("40 minutes of hell", "http://www.fortyminutesofhell.com");
	var disposables = new Band("the disposables", "http://www.homestead.com/thedisposablesonline/home.html");
	var maroon = new Band("maroon", "http://www.maroon.cjb.net");
	var mdt = new Band("mockingbird death threat", null);
	var bibowatts = new Band("bibowatts", null);
	var redSwitch = new Band("red switch", "http://www.redswitchmusic.com/");
	var knots = new Band("31 knots", null);
	var thistle = new Band("thistle", "http://www.thistlewired.com");
	var hols = new Band("house of large sizes", null);
	var fontaine = new Band("fontaine", null);
	var casketLottery = new Band("casket lottery", "http://www.thecasketlottery.com");
	var afa = new Band("anchors for arsenal", null);
	var sounder = new Band("sounder", null);
	var mandragora = new Band("mandragora", "http://www.mandragora-music.com/");
	var someplaceToHide = new Band("someplace to hide", "http://www.geocities.com/someplacetohide/");               
	var brandston = new Band("brandston", "http://www.brandtson.net/");
	var recliner = new Band("recliner", null);
	var skiesFallen = new Band("skies fallen", "http://www.skiesfallen.com");
	var omnichron = new Band("omnichron", null);
	var lifeAndTimes = new Band("the life and times", "http://thelifeandtimes.com");
	var roma79 = new Band("roma 79", "http://www.roma79.com");
	var nervousReturn = new Band("the nervous return", null);
	var the440s = new Band("the 440's", null);
	var lastCallBrawlers = new Band("the last call brawlers", null);
	var dropsonic = new Band("dropsonic", "http://www.dropsonic.com/");
	var lofe = new Band("lands of farther east", null);
	var fire1666 = new Band("the fire of 1666", "http://www.fireof1666.com");
	var daytimeHero = new Band("daytime hero", null);
	var buildingRocket = new Band("building a rocket", null);
	var pariahCaste= new Band("pariah caste", null);
	var blaked = new Band("blaked", null);
	var giddyMotors = new Band("the giddy motors", null);
	var thosePeabodys = new Band("those peabodys", null);
	var jordanMycoskie = new Band("jordan mycoskie", "http://www.jordanmycoskie.com/");
	var appleseedCast = new Band("appleseed cast", "http://www.theappleseedcast.com/");
	var chinUpChinDown = new Band("chin up chin down", "http://www.chinupchinup.com/");
	var moaningLisa = new Band("moaning lisa", null);
	var gps = new Band("gravity propulsion system", "http://gravitypropulsionsystem.com/");
	var v9r9d = new Band("V9R9D", "http://www.snackbag.com/v9r9d/");
	var necronomitron = new Band("necronomitron", null);
	var selfEvident = new Band("self evident", "http://www.self-evident.net");
	var stellaLink = new Band("the stella link", "http://www.stellalink.com");
	var schooled = new Band("schooled in victory", null);
	var crossedWires = new Band("crossed wires", null);
	var temperTemper = new Band("temper temper", null);
	var aimOfCommand = new Band("aim of command", null);
	var forms = new Band("the forms", null);
	var students = new Band("the fellowship students", null);
	var zildo = new Band("zildo", null);
	var aapa = new Band("ad astra per aspera", null);  
	var noMoreLies = new Band("no more lies", null); 
	var ampline = new Band("ampline", "http://www.ampline.net/"); 
	var theraphosa = new Band("theraphosas", null); 
	var ct = new Band("caterpillar tracks", null); 
	var desertFathers = new Band("desert fathers", "http://www.thedesertfathers.com/desertfathers/main.html"); 
	var lifeInBed = new Band("life in bed", null); 
	var haymarketRiot = new Band("haymarket riot", null);
	var inspectorOwl = new Band("inspector owl", null);
	var wjka = new Band("where's jimmy k at?", null);
	var donc = new Band("don caballero", null);
	var atr = new Band("always the runner", null);
	var manifold = new Band("manifold", null);
	var anchorsForArsenal = new Band("anchors for arsenal", null);
	var rollaTomasi = new Band("rolla tomasi", null);
	var losttoMetric = new Band("lostto metric", null);
	var casanatra = new Band("casanatra", null);
	var nokomis = new Band("nokomis", null);
	var mesaFalls = new Band("mesa falls to mephisto", null);
	var mandarin = new Band("mandarin", "http://www.m-a-n-d-a-r-i-n.com/");
	var leMepris = new Band("les mepris", null);
	var rolloTomasi = new Band("rollo tomasi");
	var pantherAttack = new Band("panther attack!");
	var spiderFighter = new Band("spider fighter");
	var ladyOfTheLake = new Band("the lady of the lake");
	var untilTheyArrive = new Band("until they arrive");
	var ccp = new Band("catch catch perfect");
	var phonocaptors = new Band("phonocaptors");
	var cbr = new Band("captured by robots");
	var robbSteele = new Band("robb steele");
	var romanNumerals = new Band("roman numerals");
	var actorsActresses = new Band("actors & actresses");

	var emos = new Venue("emo's", "http://www.emosaustin.com/", "603 red river", "austin", "TX");
	var ssBowl = new Venue("sixty six bowl", "http://www.66bowl.com/", "3810 N.W. 39th", "oklahoma city", "OK");
	var tba = new Venue(null, null, null, null, null);
	var vzds = new Venue("vzd's", "http://www.okclive.com/vzd", "4200 n. western", "oklahoma city", "OK");
	var rubbergloves = new Venue("rubbergloves", "http://www.rubberglovesdentontx.com", "411 e. sycamore st.", "denton", "TX"); 
	var medicineHall = new Venue("the medicine hall", null, "1311 jenkins ave.", "norman", "OK");
	var americanLegion = new Venue("american legion hall", null, "710 east main street", "norman", "OK");
	var club108 = new Venue("club 108", null, "108 1/2 s. broadway", "edmond", "OK");
	var pyro = new Venue("the pyro", null, null, "kansas city", "MO");
	var eighthNote = new Venue("the 8th note - UWM union", null, "2200 East Kenwood Boulevard", "milwaukee", "WI");
	var ssp = new Venue("springfield skate park",null, "945 w. meadowmere", "springfield", "MO");
	var hurricane = new Venue("the hurricane", "http://www.hurricanekc.com", "4048 broadway", "kansas city", "MO");
	var rocketBar = new Venue("the rocket bar", "http://www.rocketbar.net/", "2001 locust", "st. louis", "MO");
	var mrBills = new Venue("mr. bills", null , null, "norman", "OK");
	var greenDoor = new Venue("the green door", "http://www.okcshows.com/", "329 sheridan", "oklahoma city", "OK");
	var clunks = new Venue("clunk's", "http://www.geocities.com/SunsetStrip/Show/6723/", "2147 N. College", "fayetteville", "AR");
	var clearview = new Venue("club clearview", null, "2806 Elm St", "dallas", "TX");
	var replay = new Venue("the replay lounge", "http://www.replaylounge.com/", "946 Massachusetts St.", "lawrence", "KS");
	var galaxy = new Venue("the galaxy club", null, null, "dallas", "TX");
	var bottleneck = new Venue("the bottleneck", "http://www.pipelineproductions.com/Bottleneck.html", "737 New Hampshire", "lawrence", "KS");
	var blueMonkey = new Venue("the blue monkey", null, "819 3rd St N", "monroe", "LA");
	var staggerInn = new Venue("the stagger inn", "http://www.jambase.com/search.asp?venueID=3642", "104 E. Vandalia", "edwardsville", "IL");
	var hiLo = new Venue("the hi-lo", null, null, "oklahoma city", "OK");
	var liquidLounge = new Venue("the liquid lounge", null, null, "dallas", "TX");
	var loft = new Venue("the loft", "http://www.theloftcoffeehouse.com/", "1730 S Boston Ave", "tulsa", "OK");
	var cityArtsCenter = new Venue("city arts center", null, "3000 General Pershing Blvd.", "oklahoma city", "OK");
	var setlist = new Venue("the setlist", "http://www.thesetlist.com", "130 west pine", "warrensburg", "MO");
	var sizeRecords = new Venue("size records", null, "8915 n. western", "oklahoma city", "OK");
	var kenClub = new Venue("ken club", null, null, "san diego", "CA");
	var clubCongress = new Venue("club congress", null, null, "tucson", "AZ");
	var echo = new Venue("the echo", null, null, "los angeles", "CA");
	var zpie = new Venue("z-pie", null, null, "san luis obispo", "CA");
	var parkside = new Venue("the parkside", null, null, "san francisco", "CA");
	var placebo = new Venue("the placebo", null, null, "arcata", "CA");
	var oldFireHouse = new Venue("the old fire house", "http://www.theoldfirehouse.org/", null, "redmond", "WA");
	var fifteenthStTavern = new Venue("15th st. tavern", null, null, "denver", "CO");
	var gypsyTeaRoom= new Venue("gypsy tea room", null, null, "dallas", "TX");
	var factory = new Venue("the factory", null, null, "bellingham", "WA");
	var house = new Venue("house show", null, null, "bremerton", "WA");
	var bigHorse = new Venue("the big horse saloon", null, null, "chicago", "IL");
	var nextDoorMusic = new Venue("next door music", null, null, "harrah", "OK");
	var wreckRoom = new Venue("the wreck room", null, null, "ft. worth", "TX");
	var bigVs = new Venue("big v's", "http://www.bigvs.com/", "1567 university ave. w.", "st. paul", "MN");
	var kirbysBeer = new Venue("kirby's beer store", null, null, "wichita", "KS");
	var muddyWaters = new Venue("muddy waters", "http://www.nightguide.com/dfw/data/n100673.htm", "1518 greenville ave", "dallas", "TX");
	var brick = new Venue("the brick", "http://www.thebrickkcmo.com", "1727 mcgee", "kansas city", "MO");
	var soap = new Venue("bar of soap", null, "3615 perry ave.", "dallas", "TX");
	var conservatory = new Venue("the conservatory", "http://www.conservatoryokc.com/", "8911 n. western", "oklahoma city", "OK");
	var osu = new Venue("osu campus", null, null, "stillwater", "OK");
	var tbaHouston = new Venue("TBA", null, null, "houston", "TX");
	var bottomLounge = new Venue("the bottom lounge", null, null, "chicago", "IL");
	var deli = new Venue("the deli", null, null, "norman", "OK");
	var jackpotSaloon = new Venue("jackpot saloon", null, null, "lawrence", "KS");
	var uptown = new Venue("the uptown bar", "http://www.theuptownbar.com/", "3018 Hennipen Ave. South", "minneapolis", "MN");
	var firesideBowl = new Venue("fireside bowl", "http://www.firesidebowl.com/", "2648 W. Fullerton Ave.", "chicago", "IL");
	var ottos = new Venue("otto's", null, null, "dekalb", "IL");
	var radioDown = new Venue("radio down", "http://www.radiodown.com", null, "covington", "KY");
	var northSix = new Venue("north six", null, null, "brooklyn", "NY");
	var drunkenUnicorn = new Venue("the drunken unicorn", null, null, "atlanta", "GA");
	var redBlood = new Venue("the red blood club", null, null, "dallas", "TX");
	var mickees = new Venue("mickee's", null, null, "monroe", "LA");
	var barley = new Venue("john barleycorns", null, null, "wichita", "KS");
	var tornado = new Venue("the tornado club", null, "116 South Hamilton Street", "madison", "WI");
	var clubBart = new Venue("club bart", null, "22726 Woodward", "detroit", "MI");
	var redRose = new Venue("red rose coffeehouse", null, "528 West College Street", "murfreesboro", "TN");
	var radioDown = new Venue("radio down", null, "100 West Sixth Street", "covington", "KY");
	var lightbulb = new Venue("jr's lightbulb club", null, "21 North Block Club", "fayetteville", "AR");
	var lakeHouse = new Venue("the lake house", null, "10732 Cotillion", "dallas", "TX");
	var monarch = new Venue("the monarch", null, "3829 Main St.", "kansas city", "MO");

	this.addShow(new Show("10.07.2004", null, brick, new Array(leMepris, sn)));
	this.addShow(new Show("10.08.2004", null, setlist, new Array(skiesFallen)));
	this.addShow(new Show("10.09.2004", null, rocketBar, new Array(skiesFallen)));
	this.addShow(new Show("10.10.2004", null, tornado, new Array(ros)));
	this.addShow(new Show("10.11.2004", null, bottomLounge, new Array(ros, rolloTomasi)));
	this.addShow(new Show("10.12.2004", null, clubBart, new Array(ros, pantherAttack)));
	this.addShow(new Show("10.13.2004", null, redRose, new Array(ros, spiderFighter)));
	this.addShow(new Show("10.14.2004", null, radioDown, new Array(ros, thistle)));
	this.addShow(new Show("10.15.2004", null, lightbulb, new Array(ros)));
	this.addShow(new Show("10.16.2004", null, lakeHouse, new Array(ros, ladyOfTheLake, untilTheyArrive)));
	this.addShow(new Show("10.17.2004", null, rubbergloves, new Array(ros)));
	this.addShow(new Show("10.18.2004", null, emos, new Array(ros, ccp)));
	this.addShow(new Show("10.19.2004", "write us if you can help!", tbaHouston, null));
	this.addShow(new Show("10.20.2004", null, conservatory, new Array(ros, gps, phonocaptors)));
	this.addShow(new Show("10.21.2004", null, rocketBar, new Array(cbr, robbSteele)));
	this.addShow(new Show("10.30.2004", "happy halloween blowout!", monarch, new Array(romanNumerals, actorsActresses, sn)));

	this.addMessage("<font class='menuItemStrong'>order</font> a copy of <font class='menuItemEm'>emblem corners</font> and all other td necessities @ <a href='http://www.nokarma.com/nokarma/browse.asp?cat=330' class='menuItem'>no karma</a>.");
	//this.addMessage("<font class='menuItemStrong'>updated pages</font>: <a href='" + rel + "shows/currentShows.html' class='menuItem'>shows</a>, <a href='" + rel + "main.html' class='menuItem'>main</a>.");
	this.addMessage("<font class='menuItemStrong'>check out</font> <a href='http://www.nokarma.com/nokarma/browse.asp?cat=330' class='menuItem'>traindodge @ no karma</a>.");
	//this.addMessage("<font class='menuItemStrong'>watch</font> the <a href='http://www.urinine.com' class='menuItem'>urinine</a> site for the latest info on the journey tribute album.");
	this.addMessage("<font class='menuItemStrong'>listen</font> to <a href='http://www.nokarma.com/sound/rainingroom.mp3' class='menuItem'>the raining room</a> mp3.");
	this.addMessage("<font class='menuItemStrong'>sound</font>: <a href='http://www.nokarma.com/sound/fiveforks.mp3' class='menuItem'>five forks</a>.");
	this.addMessage("<font class='menuItemStrong'>take a listen</font>: <a href='http://www.nokarma.com/sound/LowShoulder.mp3' class='menuItem'>low shoulder</a>.");
	this.addMessage("<font class='menuItemStrong'>contact traindodge</font> at <a href='mailto:jstdodge@aol.com' class='menuItem'>jstdodge@aol.com</a>.");
	this.addMessage("<font class='menuItemStrong'>NEW!</font>  <a href='http://www.urinine.com/Sound/play.cgi?only_the_young' class='menuItem'>listen</a> to traindodge's rendition of journey's 'only the young' - from the soon to be released journey tribute album (see <a href='http://www.urinine.com' class='menuItem'>urinine</a>'s site for more info.)");
	this.addMessage("<font class='menuItemStrong'>NEW!</font>  yep, knuckles now has a <a href='http://www.silentplanet.net/vpage1.htm' class='menuItem'>video</a>.");
	this.addMessage("<font class='menuItemStrong'>writing and tracking</font> on a 3rd full-length is in progress");
	this.addMessage("<font class='menuItemStrong'>will be recording 2 new songs</font> for the 2nd installment of <a href='http://www.asceticrecords.com' class='menuItem'>ascetic records</a>' <a href='http://www.socomtonar.com' class='menuItem'>socomtonar series</a> here pretty quick.");
	//
}
//-->

