/////START FUNCTIONS FOR CALENDAR APP/////





function event (eventdate,bsm,bsd,ven,cty,who)
{

this.basicMonth = bsm;
this.basicDay = bsd;
this.vendate = new Date(eventdate);
this.location = ven;
this.city = cty;
this.whoItIs = who;
}

function logger(text){
document.write(text+"\n<br/>");
}

function append(text){
document.write(text);
}

function showEvents(filterKey,value){
//filter keys:  -1=all, 0= date, 1=venue, 2=city
	//logger("begin");
	logger("<table width=100% border=0>");

	for(i=0;i<shows.length;i++){
			
		if(filterKey==-1){			
				append("<tr><td style=\"color:#FFFFFF;font-size:8 pt\">"+shows[i].basicDay+
				"</td> <td style=\"color:#FFFFFF;font-size:8 pt\">"+shows[i].location+
				"</td> <td style=\"color:#FFFFFF;font-size:8 pt\">"+shows[i].city+
				"</td><td style=\"color:#FFFFFF;font-size:8 pt\">"+shows[i].whoItIs+"</td></tr>")
		}
		
		

		if(filterKey==0){			
			if(value.getMonth()==shows[i].vendate.getMonth()){
				append("<tr><td style=\"color:#FFFFFF;font-size:8 pt\">"+shows[i].basicDay+
				"</td><td style=\"color:#FFFFFF;font-size:8 pt\">"+shows[i].location+
				"</td><td style=\"color:#FFFFFF;font-size:8 pt\">"+shows[i].city+
				"</td><td style=\"color:#FFFFFF;font-size:8 pt\">"+shows[i].whoItIs+"</td></tr>");
			}
		}
	
	
	if(filterKey==-1){
	append("<tr><td style=\"color:#B17E5F;font-size:12 pt\"><strong>"+shows[i].basicMonth+
				"</strong></td></tr>");
			}
		
<!-- Not in use -->
		 if(filterKey==1){
			//logger("got filter 1");
			if(value==shows[i].location){
				append("<tr><td style=\"color:#FFFFFF;font-size:8 pt\">"+shows[i].vendate+
				"</td><td style=\"color:#FFFFFF;font-size:8 pt\">"+shows[i].location+
				"</td><td style=\"color:#FFFFFF;font-size:8 pt\">"+shows[i].city+
				"</td><td style=\"color:#FFFFFF;font-size:8 pt\">"+shows[i].whoItIs+"</td></tr>");
			}
		}

		if(filterKey==2){
			//logger("got filter 2");
			if(value==shows[i].city){
	            append("<tr><td style=\"font-family:sans-serif;font-size:8 pt\">"+shows[i].vendate+
				"</td><td style=\"font-family:sans-serif;font-size:8 pt\">"+shows[i].location+
				"</td><td style=\"font-family:sans-serif;font-size:8 pt\">"+shows[i].city+
				"</td><td style=\"font-family:sans-serif;font-size:8 pt\">"+shows[i].whoItIs+"</td></tr>");
			}
		}
	
	
	}

	logger("</table>");

}

/////END CALENDAR APP FUNCTIONS


/////BEGIN ADDING EVENTS - ADD THEM IN CHRONOLOGICAL ORDER



shows = new Array(
new event("7/9/2003","July","","","","",""),

new event("7/9/2003","","9th","Mickey's","Clive,IA","Solo"),
new event("7/10/2003","","10th","Nightfall on the River","Des Moines, IA","Nadas"),
new event("7/11/2003","","11th","Bottom Lounge","Chicago, IL","Nadas"),
new event("7/12/2003","","12th","Private","&nbsp;","Solo"),
new event("7/13/2003","","13th","Private","&nbsp;","Solo"),
new event("7/16/2003","","16th","Fratello's (dueling pianos)","Des Moines, IA","with Jared Hall"),
new event("7/18/2003","","18th","People's","Ames, IA","Nadas"),
new event("7/19/2003","","19th","Private","&nbsp;","Solo"),
new event("7/23/2003","","23rd","Fratello's (dueling pianos)","Des Moines, IA","with Jared Hall"),
new event("7/25/2003","","25th","RIBCO","Rock Island, IL","Nadas"),
new event("7/26/2003","","26th","Summer Splash","Albia, IA","Nadas"),
new event("7/30/2003","","30th","Fratello's (dueling pianos)","Des Moines, IA","with Jared Hall"),

new event("8/1/2003","August","","&nbsp;","&nbsp;","&nbsp;"),
new event("8/1/2003","","1st","Fine Line","Minneapolis, MN","Nadas"),
new event("8/2/2003","","2nd","Shank Hall","Milwaukee, WI ","Nadas"),
new event("8/3/2003","","3rd","Retro on Roscoe","Chicago, IL","Nadas"),
new event("8/4/2003","","4th","Mulligans","Urbandale, IA","Solo"),
new event("8/6/2003","","6th","Private","&nbsp;","Solo"),
new event("8/6/2003","","6th","Fratello's (dueling pianos - 9pm)","Des Moines, IA","with Jared Hall"),
new event("8/7/2003","","7th","Iowa State Fair","Des Moines, IA","Nadas"),
new event("8/8/2003","","8th","Iowa State Fair","Des Moines, IA","Nadas"),
new event("8/9/2003","","9th","Iowa State Fair","Des Moines, IA","Nadas"),
new event("8/10/2003","","10th","Iowa State Fair*","Des Moines, IA","Solo"),
new event("8/11/2003","","11th","Iowa State Fair*","Des Moines, IA","Solo"),
new event("8/12/2003","","12th","Iowa State Fair*","Des Moines, IA","Solo"),
new event("8/13/2003","","13th","Music box","Omaha, NE","Nadas"),
new event("8/15/2003","","15th","Soiled Dove","Denver, CO","Nadas"),
new event("8/16/2003","","16th","Soiled Dove","Denver, CO","Nadas"),
new event("8/17/2003","","17th","Little Bear","Evergreen, CO","Nadas"),
new event("8/20/2003","","20th","Mickey's","Des Moines, IA","Solo"),
new event("8/21/2003","","21st","Carriage Haus","Davenport, IA","Solo"),
new event("8/22/2003","","22nd","UNK","Kearney, NE","Nadas"),
new event("8/23/2003","","23rd","Brewsters","Storm Lake, IA","Solo"),
new event("8/27/2003","","27th","Fratello's (dueling pianos)","Des Moines, IA","with Jared Hall"),
new event("8/28/2003","","28th","Mulligans","Urbandale, IA","Solo"),
new event("8/29/2003","","29th","The Villa","Carroll, IA","Solo"),
new event("8/30/2003","","30th","Trophie's","Centerville, IA","Solo"),
new event("8/30/2003","","","","",""),
new event("8/30/2003","","","* at jalapeno pete's cantina","4:00-7:30 pm",""),


new event("9/4/2003","September","","&nbsp;","&nbsp;","&nbsp;","&nbsp;"),
new event("9/4/2003","","4th","The OP","Cedar Falls, IA","Solo"),
new event("9/5/2003","","5th","Simpson College","Indianola, IA","Nadas"),
new event("9/6/2003","","6th","Tour de' Metro","Des Moines, IA","Nadas"),
new event("9/6/2003","","6th","Raccoon River","Des Moines, IA","Solo"),
new event("9/8/2003","","8th","Mulligans","Urbandale, IA","Solo")






);

/////END ADDING EVENTS