var places = new Object();
var shows = new Array();
var pastShows = new Array();

addPlace(new Place(
		"kikos",
		"Kiko's Lounge",
		null,
		null,
		"http://maps.google.com/maps?f=q&source=s_q&hl=en&geocode=&q=kikos&sll=43.040182,-87.91448&sspn=0.340255,0.617981&g=milwaukee,+wi&ie=UTF8&s=AARTsJr111dB9k8UZrv3mgQcONZG7cSAvQ&ei=bFMASoT6PI7ENvitkI8E&cd=1&cid=43035675,-88026938,15666141814068608804&li=lmd&ll=43.051517,-88.028812&spn=0.010537,0.035105&z=14&iwloc=A",
		"http://maps.google.com/maps?f=q&amp;source=s_q&amp;hl=en&amp;geocode=&amp;q=kikos&amp;sll=43.040182,-87.91448&amp;sspn=0.340255,0.617981&amp;g=milwaukee,+wi&amp;ie=UTF8&amp;ll=43.055092,-88.018513&amp;spn=0.085068,0.154495&amp;z=13&amp;iwloc=A&amp;cid=15666141814068608804&amp;output=embed&amp;s=AARTsJr111dB9k8UZrv3mgQcONZG7cSAvQ",
		"9155 W Bluemound Rd<br/>Milwaukee, WI 53226<br/>(414) 476-1130"));

addPlace(new Place(
		"calis",
		"Cali's Lounge",
		null,
		null,
		"http://maps.google.com/maps?f=q&hl=en&q=1005+S+Moorland+Rd,+Brookfield,+WI&ie=UTF8&z=16&iwloc=A",
		"http://maps.google.com/maps?f=q&amp;hl=en&amp;q=1005+S+Moorland+Rd,+Brookfield,+WI&amp;ie=UTF8&amp;z=14&amp;iwloc=A&amp;ll=43.030439,-88.104515&amp;output=embed",
		"Best Western Hotel<br/>1005 S Moorland Rd<br/>Brookfield, WI 53005"));

		addPlace(new Place(
		"trinity",
		"Trinity Three Irish Pubs",
		"http://www.trinitythreeirishpubs.com",
		"http://www.caughtlookingband.com/images/trinity.jpg",
		"http://maps.google.com/maps?f=q&source=s_q&hl=en&geocode=&q=trinity+three+irish+pubs,+milwaukee,+wi&sll=37.0625,-95.677068&sspn=1.637179,4.229736&ie=UTF8&z=15&iwloc=A",
		"http://maps.google.com/maps?f=q&amp;source=s_q&amp;hl=en&amp;geocode=&amp;q=trinity+three+irish+pubs,+milwaukee,+wi&amp;sll=37.0625,-95.677068&amp;sspn=1.637179,4.229736&amp;ie=UTF8&amp;z=14&amp;iwloc=A&amp;cid=13440932306833540221&amp;ll=43.055531,-87.908049&amp;output=embed",
		"125 East Juneau<br/>Milwaukee, WI 53202<br/>(414) 278-7033"));

addPlace(new Place(
		"yesteryears",
		"Yester Years Pub & Grill",
		"http://yesteryearspubandgrill.com",
		null,
		"http://maps.google.com/maps?f=q&source=s_q&hl=en&geocode=&q=yester+years+pub&sll=43.022094,-88.028469&sspn=0.082077,0.154495&ie=UTF8&s=AARTsJql5OMIk7ACCIykPkv2nesT602m7A&ei=aFsASufrGYj8NeC9kZcE&cd=1&cid=43016417,-88030431,10868581635561791447&li=lmd&ll=43.032322,-88.030443&spn=0.01054,0.035105&z=14&iwloc=A",
		"http://maps.google.com/maps?f=q&amp;source=s_q&amp;hl=en&amp;geocode=&amp;q=yester+years+pub&amp;sll=43.022094,-88.028469&amp;sspn=0.082077,0.154495&amp;ie=UTF8&amp;ll=43.036274,-88.021946&amp;spn=0.085091,0.154495&amp;z=13&amp;iwloc=A&amp;cid=10868581635561791447&amp;output=embed&amp;s=AARTsJql5OMIk7ACCIykPkv2nesT602m7A",
		"9427 W Greenfield Ave<br/>Milwaukee, WI 53214<br/>(414) 476-9055"));

addPlace(new Place(
		"millerpark",
		"Miller Park",
		"http://milwaukee.brewers.mlb.com",
		"images/mp.jpg",
		"",
		"",
		""));

addPlace(new Place(
		"chg",
		"Coach House Grill",
		"http://coachhousegrill.com",
		"http://www.caughtlookingband.com/images/chg.jpg",
		"http://maps.google.com/maps?f=q&source=s_q&hl=en&geocode=&q=coach+house+grill,+big+bend,+wi&sll=33.258525,-111.849448&sspn=0.051532,0.132179&ie=UTF8&ll=42.910926,-88.209658&spn=0.045136,0.132179&z=14&iwloc=A",
		"http://maps.google.com/maps?f=q&amp;source=s_q&amp;hl=en&amp;geocode=&amp;q=coach+house+grill,+big+bend,+wi&amp;sll=33.258525,-111.849448&amp;sspn=0.051532,0.132179&amp;ie=UTF8&amp;ll=42.922806,-88.21146&amp;spn=0.045136,0.132179&amp;z=14&amp;iwloc=A&amp;cid=8241203664274145079&amp;output=embed",
		"9427 W Greenfield Ave<br/>Milwaukee, WI 53214<br/>(414) 476-9055"));

addPlace(new Place(
		"riversplash",
		"Riversplash!",
		"http://www.riversplash.com/riversplash_003.htm",
		"http://www.caughtlookingband.com/images/rs.jpg",
		"http://maps.google.com/maps?f=q&source=s_q&hl=en&geocode=&q=E+Juneau+Ave+%26+N+Edison+St,+Milwaukee,+WI+53202&sll=43.041732,-87.912855&sspn=0.010539,0.014484&ie=UTF8&view=map&ll=43.04733,-87.912426&spn=0.0053,0.011995&z=16&iwloc=A",
		"http://maps.google.com/maps?f=q&amp;source=s_q&amp;hl=en&amp;geocode=&amp;q=E+Juneau+Ave+%26+N+Edison+St,+Milwaukee,+WI+53202&amp;sll=43.041732,-87.912855&amp;sspn=0.010539,0.014484&amp;ie=UTF8&amp;ll=43.054527,-87.90822&amp;spn=0.021075,0.028968&amp;z=14&amp;iwloc=A&amp;output=embed",
		"E Juneau Ave & N Water St<br/>Milwaukee, WI 53202"));

addPlace(new Place(
		"summerfest",
		"Summerfest!",
		"http://www.summerfest.com",
		"http://www.caughtlookingband.com/images/sf2.jpg",
		"http://maps.google.com/maps?f=q&source=s_q&hl=en&geocode=&q=summerfest+milwaukee&sll=33.258525,-111.849448&sspn=0.214454,0.528717&ie=UTF8&ll=43.034768,-87.89953&spn=0.011716,0.033045&z=16&iwloc=A",
		"http://maps.google.com/maps?f=q&amp;source=s_q&amp;hl=en&amp;geocode=&amp;q=summerfest+milwaukee&amp;sll=33.258525,-111.849448&amp;sspn=0.214454,0.528717&amp;ie=UTF8&amp;ll=43.042735,-87.895689&amp;spn=0.011716,0.033045&amp;z=14&amp;iwloc=A&amp;cid=18338711752857626230&amp;output=embed",
		"200 N Harbor Dr<br/>Milwaukee, WI 53202"));
		
addPlace(new Place(
		"statefair",
		"State Fair",
		"http://www.wistatefair.com/10_web/calendar/aug_7.html",
		"http://www.caughtlookingband.com/images/statefair.jpg",
		"http://maps.google.com/maps?f=q&source=s_q&hl=en&geocode=&q=wisconsin+state+fair,+milwaukee,+wi&sll=43.026863,-87.997484&sspn=0.022933,0.065403&ie=UTF8&ll=43.021561,-88.005338&spn=0.022935,0.065403&z=15&iwloc=F",
		"http://maps.google.com/maps?f=q&amp;source=s_q&amp;hl=en&amp;geocode=&amp;q=wisconsin+state+fair,+milwaukee,+wi&amp;sll=43.026863,-87.997484&amp;sspn=0.022933,0.065403&amp;ie=UTF8&amp;ll=43.029435,-88.012934&amp;spn=0.022935,0.065403&amp;z=14&amp;iwloc=A&amp;cid=1639616834038348298&amp;output=embed",
		"640 S 84th St<br/>West Allis, WI 53214"));
		
addPlace(new Place(
		"villagepark",
		"Sussex Village Park Pavilion",
		null,
	  null,
		"http://maps.google.com/maps?f=q&source=s_q&hl=en&geocode=&q=W224N6196+Weaver+Drive,+Sussex,+wi&sll=33.258525,-111.849448&sspn=0.051532,0.132093&ie=UTF8&ll=43.12924,-88.228991&spn=0.011244,0.033023&z=16&iwloc=B",
		"http://maps.google.com/maps?f=q&amp;source=s_q&amp;hl=en&amp;geocode=&amp;q=W224N6196+Weaver+Drive,+Sussex,+wi&amp;sll=33.258525,-111.849448&amp;sspn=0.051532,0.132093&amp;ie=UTF8&amp;ll=43.139387,-88.227425&amp;spn=0.011244,0.033023&amp;z=14&amp;iwloc=A&amp;cid=10955777022978921991&amp;output=embed",
		"W244N6199 Weaver Dr<br/>Sussex, WI 53089"));

addPlace(new Place(
		"kellys",
		"Kelly&#39;s Bleachers II",
		"http://www.kellysbleachers.net/KBII/KBIIWelcome.htm",
		"http://www.caughtlookingband.com/images/kb2_logo3.gif",
		"http://maps.google.com/maps?f=q&source=s_q&hl=en&geocode=&q=Kelly%27s+Bleacher%27s+II,+wind+lake,+wi&sll=33.353923,-111.96177&sspn=0.431307,1.056747&ie=UTF8&z=16&iwloc=A",
		"http://maps.google.com/maps?f=q&amp;source=s_q&amp;hl=en&amp;geocode=&amp;q=kellys+bleachers+ii,+wind+lake,+wi&amp;sll=33.258525,-111.849448&amp;sspn=0.053973,0.132093&amp;ie=UTF8&amp;cid=13734649811161105416&amp;ll=42.836703,-88.15567&amp;spn=0.022029,0.036478&amp;z=14&amp;iwloc=A&amp;output=embed",
		"7805 S Loomis Rd<br/>Wind Lake, WI 53185-2067<br/>(262) 895-3353"));
		
addPlace(new Place(
		"rhythmnbrews",
		"Rhythm 'n Brews",
		"http://rhythmnbrews.net",
		"http://www.caughtlookingband.com/images/rnb.jpg",
		"http://maps.google.com/maps?f=q&source=s_q&hl=en&geocode=&q=150+s+foster+drive,+saukville,+wi&sll=43.037837,-87.908976&sspn=0.011308,0.019248&ie=UTF8&hq=&hnear=150+S+Foster+Dr,+Saukville,+Ozaukee,+Wisconsin+53080&ll=43.382875,-87.930493&spn=0.022956,0.046692&z=15&iwloc=A",
		"http://maps.google.com/maps?f=q&amp;source=s_q&amp;hl=en&amp;geocode=&amp;q=150+s+foster+drive,+saukville,+wi&amp;sll=43.037837,-87.908976&amp;sspn=0.011308,0.019248&amp;ie=UTF8&amp;hq=&amp;hnear=150+S+Foster+Dr,+Saukville,+Ozaukee,+Wisconsin+53080&amp;ll=43.392201,-87.926245&amp;spn=0.022956,0.046692&amp;z=14&amp;iwloc=A&amp;output=embed",
		"150 S Foster Dr.<br/>Saukville, WI 53080<br/>(262) 284-BREW"));

addPlace(new Place(
		"campground",
		"Plymouth Rock Campground",
		null,
		null,
		"http://maps.google.com/maps?f=q&source=s_q&hl=en&geocode=&q=plymouth+rock+rv&sll=43.807403,-87.981863&sspn=0.043235,0.132093&ie=UTF8&hq=plymouth+rock+rv&hnear=&ll=43.804398,-87.980747&spn=0.010809,0.033023&z=16",
		"http://maps.google.com/maps?f=q&amp;source=s_q&amp;hl=en&amp;geocode=&amp;q=plymouth+rock+rv&amp;sll=43.807403,-87.981863&amp;sspn=0.043235,0.132093&amp;ie=UTF8&amp;hq=plymouth+rock+rv&amp;hnear=&amp;ll=43.807403,-87.981863&amp;spn=0.043235,0.132093&amp;output=embed",
		"Lando Street<br/>Plymouth, WI 53073"));

addPlace(new Place(
		"silver",
		"Silver Dollar Days",
		"http://www.hg-ac.com/Events/SILVERDOLLARDAYS.htm",
		null,
		"http://maps.google.com/maps?f=q&source=s_q&hl=en&geocode=&q=memorial+park+406+North+River+Parkway,+Howards+Grove,+WI&sll=43.837112,-87.817712&sspn=0.011376,0.03268&ie=UTF8&hq=&hnear=Memorial+Park,+406+N+River+Pkwy,+Howards+Grove,+Sheboygan,+Wisconsin+53083&z=15&iwloc=A",
		"http://maps.google.com/maps?f=q&amp;source=s_q&amp;hl=en&amp;geocode=&amp;q=memorial+park+406+North+River+Parkway,+Howards+Grove,+WI&amp;sll=43.837112,-87.817712&amp;sspn=0.011376,0.03268&amp;ie=UTF8&amp;hq=&amp;hnear=Memorial+Park,+406+N+River+Pkwy,+Howards+Grove,+Sheboygan,+Wisconsin+53083&amp;z=14&amp;iwloc=A&amp;ll=43.837317,-87.817712&amp;output=embed",
		"Memorial Park<br/>406 N River Pkwy<br/>Howards Grove, WI 53083"));

addPlace(new Place(
		"wcf",
		"Waukesha County Fair",
		"http://www.waukeshacountyfair.com/pages/sidestage.htm",
		"http://www.caughtlookingband.com/images/wcf.jpg",
		"http://maps.google.com/maps?f=q&source=s_q&hl=en&geocode=&q=1000+Northview+Rd&sll=43.011678,-88.231481&sspn=0.092258,0.26144&g=waukesha,+wi&ie=UTF8&hq=&hnear=1000+Northview+Rd,+Waukesha,+Wisconsin+53188&ll=43.035709,-88.241844&spn=0.023056,0.06536&z=15",
		"http://maps.google.com/maps?f=q&amp;source=s_q&amp;hl=en&amp;geocode=&amp;q=1000+Northview+Rd&amp;sll=43.011678,-88.231481&amp;sspn=0.092258,0.26144&amp;g=waukesha,+wi&amp;ie=UTF8&amp;hq=&amp;hnear=1000+Northview+Rd,+Waukesha,+Wisconsin+53188&amp;ll=43.036,-88.2407&amp;spn=0.023056,0.06536&amp;z=14&amp;output=embed",
		"1000 Northview Rd<br/>Waukesha, WI 53188"));
    
addPlace(new Place(
		"rooters",
		"Rooters",
		"http://rooters.com",
		"http://www.caughtlookingband.com/images/rooters-waukesha.jpg",
		"http://maps.google.com/maps?f=q&source=s_q&hl=en&geocode=&q=rooters&sll=43.010045,-88.231544&sspn=0.094269,0.264187&g=Waukesha,+WI&ie=UTF8&ll=43.03985,-88.235407&spn=0.045543,0.132093&z=14&iwloc=A",
		"http://maps.google.com/maps?f=q&amp;source=s_q&amp;hl=en&amp;geocode=&amp;q=rooters&amp;sll=43.010045,-88.231544&amp;sspn=0.094269,0.264187&amp;g=Waukesha,+WI&amp;ie=UTF8&amp;ll=43.0314,-88.2387&amp;spn=0.045543,0.132093&amp;z=14&amp;iwloc=A&amp;cid=13927560979894263524&amp;output=embed",
		"901 Northview Road<br/>Waukesha, WI 53188"));

addPlace(new Place(
		"lees",
		"Lee&#39;s Cleveland Pub &amp; Grill",
		"http://www.leesclevelandpub.com",
		"http://www.caughtlookingband.com/images/lees.jpg",
		"http://maps.google.com/maps?f=q&source=s_q&hl=en&geocode=&q=14000+W+Cleveland+Ave,+New+Berlin,+WI&aq=&sll=42.9952,-88.10782&sspn=0.023573,0.066047&ie=UTF8&hq=&hnear=14000+W+Cleveland+Ave,+New+Berlin,+Waukesha,+Wisconsin+53151&ll=42.995702,-88.088808&spn=0.011786,0.033023&z=16",
		"http://maps.google.com/maps?f=q&amp;source=s_q&amp;hl=en&amp;geocode=&amp;q=14000+W+Cleveland+Ave,+New+Berlin,+WI&amp;aq=&amp;sll=42.9952,-88.10782&amp;sspn=0.023573,0.066047&amp;ie=UTF8&amp;hq=&amp;hnear=14000+W+Cleveland+Ave,+New+Berlin,+Waukesha,+Wisconsin+53151&amp;ll=42.995498,-88.08884&amp;spn=0.005893,0.016512&amp;z=14&amp;output=embed",
		"14000 W. Cleveland Ave<br/>New Berlin, WI 53151"));

addPlace(new Place(
    "sandbar",
    "SandBar Sports Pub",
    "http://sandbarsportspub.com/sandbar.html",
    "http://www.caughtlookingband.com/images/sandbar.jpg",
    "http://maps.google.com/maps?f=q&source=s_q&hl=en&geocode=&q=sandbar&aq=&sll=43.061389,-88.249444&sspn=0.09419,0.264187&g=Pewaukee,+WI&ie=UTF8&z=13&iwloc=A",
    "http://maps.google.com/maps?f=q&amp;source=s_q&amp;hl=en&amp;geocode=&amp;q=sandbar&amp;aq=&amp;sll=43.061389,-88.249444&amp;sspn=0.09419,0.264187&amp;g=Pewaukee,+WI&amp;ie=UTF8&amp;z=13&amp;iwloc=A&amp;cid=5379702776931476640&amp;ll=43.060986,-88.303384&amp;output=embed",
    "W278 N2315 Prospect Ave. Hwy SS<br/>Pewaukee, WI 53072"));

addPlace(new Place(
    "private",
    "Private Event",
    null,
    "http://www.caughtlookingband.com/images/private.jpg",
    "#",
    "#",
    ""));

addPlace(new Place(
    "mos_downtown",
    "Mo&#39;s Irish Pub (Downtown)",
    "http://www.mosirishpub.com/milwaukee/index.html",
    "http://www.caughtlookingband.com/images/mos.jpg",
    "http://maps.google.com/maps?f=q&source=s_q&hl=en&geocode=&q=Mos+Irish,+West+Wisconsin+Avenue,+Milwaukee,+WI&aq=&sll=43.040791,-87.909336&sspn=0.010821,0.033023&ie=UTF8&hq=Mos+Irish,&hnear=W+Wisconsin+Ave,+Milwaukee,+Wisconsin&z=13&iwloc=A",
    "http://maps.google.com/maps?f=q&amp;source=s_q&amp;hl=en&amp;geocode=&amp;q=Mos+Irish,+West+Wisconsin+Avenue,+Milwaukee,+WI&amp;aq=&amp;sll=43.040791,-87.909336&amp;sspn=0.010821,0.033023&amp;ie=UTF8&amp;hq=Mos+Irish,&amp;hnear=W+Wisconsin+Ave,+Milwaukee,+Wisconsin&amp;z=13&amp;iwloc=A&amp;cid=4369170085491770557&amp;ll=43.038937,-87.911519&amp;output=embed",
    "142 W Wisconsin Ave<br/>Milwaukee, WI 53203"));

addPlace(new Place(
    "mos_tosa",
    "Mo&#39;s Irish Pub (Tosa)",
    "http://www.mosirishpub.com/milwaukee/index.html",
    "http://www.caughtlookingband.com/images/mos.jpg",
    "http://maps.google.com/maps?f=q&source=s_q&hl=en&geocode=&q=Mos+Irish+Pub,+West+Bluemound+Road,+Wauwatosa,+WI&aq=&sll=43.035521,-88.047824&sspn=0.023338,0.066047&ie=UTF8&hq=Mos+Irish+Pub,&hnear=W+Bluemound+Rd,+Wauwatosa,+Wisconsin&z=15&iwloc=A",
    "http://maps.google.com/maps?f=q&amp;source=s_q&amp;hl=en&amp;geocode=&amp;q=Mos+Irish+Pub,+West+Bluemound+Road,+Wauwatosa,+WI&amp;aq=&amp;sll=43.035521,-88.047824&amp;sspn=0.023338,0.066047&amp;ie=UTF8&amp;hq=Mos+Irish+Pub,&amp;hnear=W+Bluemound+Rd,+Wauwatosa,+Wisconsin&amp;z=14&amp;iwloc=A&amp;cid=8868087176994842018&amp;ll=43.035521,-88.047824&amp;output=embed",
    "10842 W Bluemound Rd<br/>Milwaukee, WI 53203"));

addPlace(new Place(
    "alehouse",
    "The Milwaukee Ale House (Downtown)",
    "http://ale-house.com/",
    "http://www.caughtlookingband.com/images/alehouse.jpg",
    "http://maps.google.com/maps?f=q&source=s_q&hl=en&geocode=&q=milwaukee+ale+house&aq=&sll=43.038902,-87.906474&sspn=0.373386,1.056747&g=milwaukee,+wi&ie=UTF8&hq=ale+house&hnear=Milwaukee,+Wisconsin&ll=43.033796,-87.90925&spn=0.022554,0.066047&z=15&iwloc=A",
    "http://maps.google.com/maps?f=q&amp;source=s_q&amp;hl=en&amp;geocode=&amp;q=milwaukee+ale+house&amp;aq=&amp;sll=43.038902,-87.906474&amp;sspn=0.373386,1.056747&amp;g=milwaukee,+wi&amp;ie=UTF8&amp;hq=ale+house&amp;hnear=Milwaukee,+Wisconsin&amp;ll=43.033424,-87.909244&amp;spn=0.022554,0.066047&amp;z=14&amp;iwloc=A&amp;cid=6089653355245614284&amp;output=embed",
    "233 North Water Street<br/>Wauwatosa, WI 53226"));

addPlace(new Place(
    "hornygoat",
    "Horny Goat Hideaway",
    "http://www.hghideaway.com/",
    "http://www.caughtlookingband.com/images/hornygoat2.jpg",
    "http://maps.google.com/maps?q=The+Horny+Goat+Hideaway,+South+1st+Street,+Milwaukee,+WI&hl=en&ll=43.02542,-87.91307&spn=0.025726,0.066047&sll=37.0625,-95.677068&sspn=56.331468,135.263672&z=15&iwloc=A",
    "http://maps.google.com/maps?f=q&amp;source=s_q&amp;hl=en&amp;geocode=&amp;q=The+Horny+Goat+Hideaway,+South+1st+Street,+Milwaukee,+WI&amp;aq=0&amp;sll=37.0625,-95.677068&amp;sspn=56.331468,135.263672&amp;ie=UTF8&amp;hq=The+Horny+Goat+Hideaway,+South+1st+Street,&amp;hnear=Milwaukee,+Wisconsin&amp;ll=43.007804,-87.911629&amp;spn=0.025726,0.066047&amp;z=14&amp;iwloc=A&amp;cid=17423819862644009846&amp;output=embed",
    "2011 South First Street<br/>Milwaukee, WI 53207"));
    
    
    
addShow(new Show("kikos", "May 9, 2009 09:30:00 PM", "May 10, 2009 01:30:00 AM", null, 
  "http://picasaweb.google.com/caughtlookingband/KikoS59#slideshow"));
addShow(new Show("yesteryears", "May 16, 2009 10:00:00 PM", "May 17, 2009 2:00:00 AM", null,
  "http://picasaweb.google.com/caughtlookingband/Yesteryears516#slideshow"));
addShow(new Show("riversplash", "June 6, 2009 04:15:00 PM","June 6, 2009 07:15:00 PM", "Riversplash!<br/>Leinenkugel's Juneau St. Stage",
  "http://picasaweb.google.com/caughtlookingband/RiverSplash2009#slideshow"));
addShow(new Show("trinity", "July 2, 2009 10:00:00 PM", "July 3, 2009 2:00:00 AM", null,
  "http://picasaweb.google.com/caughtlookingband/Trinity7209#slideshow"));
addShow(new Show("summerfest", "July 4, 2009 1:00:00 PM", "July 4, 2009 2:30:00 PM", "Summerfest<br/>Potawatomi Rock Stage",
  "http://picasaweb.google.com/caughtlookingband/Summerfest7409#slideshow"));
addShow(new Show("calis", "July 25, 2009 9:00:00 PM", "July 26, 2009 1:00:00 AM", null));
addShow(new Show("statefair", "August 7, 2009 7:00:00 PM", "August 7, 2009 11:00:00 PM", "State Fair<br/>Brew City Stage"));
addShow(new Show("statefair", "August 12, 2009 6:00:00 PM", "August 7, 2009 10:00:00 PM", "State Fair<br/>Brew City Stage",
  "http://picasaweb.google.com/caughtlookingband/StateFair872009#slideshow"));
addShow(new Show("statefair", "August 15, 2009 7:00:00 PM", "August 15, 2009 11:00:00 PM", "State Fair<br/>Brew City Stage",
  "http://picasaweb.google.com/caughtlookingband/StateFair81509#slideshow"));
addShow(new Show("villagepark", "September 12, 2009 5:00:00 PM", "September 12, 2009 9:00:00 PM", "Make-A-Wish Foundation Charity Event",
  "http://picasaweb.google.com/caughtlookingband/MakeAWish91209#slideshow"));
addShow(new Show("kikos", "October 3, 2009 09:30:00 PM", "October 4, 2009 01:30:00 AM", null));
addShow(new Show("kellys", "October 16, 2009 10:00:00 PM", "October 17, 2009 02:00:00 AM", null));
addShow(new Show("rhythmnbrews", "November 7, 2009 9:00:00 PM", "November 8, 2009 01:00:00 AM", null,
  "http://picasaweb.google.com/caughtlookingband/RhythmAndBrews#slideshow"));
addShow(new Show("yesteryears", "December 4, 2009 9:30:00 PM", "December 4, 2009 01:30:00 AM", null));
addShow(new Show("silver", "July 17, 2010 06:30:00 PM", "July 17, 2010 10:30:00 PM", null));
addShow(new Show("wcf", "July 23, 2010 03:00:00 PM", "July 23, 2010 06:00:00 PM", null));
addShow(new Show("statefair", "August 7, 2010 3:30:00 PM", "August 7, 2010 7:30:00 PM", "State Fair<br/>Miller Lite Park Stage",
  "http://picasaweb.google.com/caughtlookingband/StateFair2010#slideshow"));
addShow(new Show("campground", "September 4, 2010 06:30:00 PM", "September 4, 2010 10:30:00 PM", null,
  "http://picasaweb.google.com/caughtlookingband/PlymouthRock#slideshow"));
addShow(new Show("rooters", "September 24, 2010 09:00:00 PM", "September 25, 2010 1:00:00 AM", null));
addShow(new Show("yesteryears", "October 23, 2010 10:00:00 PM", "October 24, 2010 1:00:00 AM", null));
addShow(new Show("yesteryears", "February 11, 2011 10:00:00 PM", "February 12, 2011 1:00:00 AM", null,
  "http://picasaweb.google.com/caughtlookingband/Yesteryears2112011#slideshow"));
addShow(new Show("rooters", "February 18, 2011 09:00:00 PM", "February 19, 2011 1:00:00 AM", null, 
  "http://picasaweb.google.com/caughtlookingband/Rooters2182011#slideshow"));
//addShow(new Show("lees", "March 5, 2011 9:30:00 PM", "March 6, 2011 1:30:00 AM", "<div class='error'>CANCELLED</div>"));
addShow(new Show("sandbar", "March 19, 2011 9:00:00 PM", "March 20, 2011 1:00:00 AM", null, "http://picasaweb.google.com/caughtlookingband/Sandbar3192011#slideshow"));
addShow(new Show("sandbar", "May 7, 2011 6:00:00 PM", "May 7, 2011 10:00:00 PM", "Outdoor Benefit Concert on<br/>Pewaukee Lake", "http://picasaweb.google.com/caughtlookingband/Sandbar572011#slideshow"));
addShow(new Show("private", "May 28, 2011 8:00:00 PM", "May 29, 2011 12:00:00 AM", null));
addShow(new Show("mos_downtown", "Jun 3, 2011 10:00:00 PM", "Jun 4, 2011 1:30:00 AM", null));
addShow(new Show("mos_tosa", "Jun 18, 2011 10:00:00 PM", "Jun 19, 2011 1:30:00 AM", "Mo's Irish Pub (Tosa).  NO COVER."));
addShow(new Show("alehouse", "Jun 11, 2011 9:30:00 PM", "Jun 12, 2011 1:00:00 AM", null));
addShow(new Show("campground", "July 2, 2011 06:45:00 PM", "July 2, 2011 10:45:00 PM", null));
addShow(new Show("summerfest", "July 3, 2011 12:00:00 PM", "July 3, 2011 2:00:00 PM", "Summerfest<br/>Miller Lite Oasis"));
addShow(new Show("silver", "July 16, 2011 06:30:00 PM", "July 16, 2011 10:30:00 PM", null));
addShow(new Show("statefair", "August 9, 2011 12:00:00 PM", "August 9, 2011 5:00:00 PM", "State Fair<br/>Tavern at the Park Stage"));
//addShow(new Show("statefair", "August 12, 2011 3:30:00 PM", "August 12, 2011 7:30:00 PM", "State Fair Show <font size='+2' color='red'>CANCELLED</font>"));
addShow(new Show("statefair", "August 12, 2011 3:30:00 PM", "August 12, 2011 7:30:00 PM", "State Fair<br/>Tavern at the Park Stage"));
//addShow(new Show("hornygoat", "Sep 10, 2011 08:00:00 PM", "Sep 10, 2011 11:45:00 PM", null));
addShow(new Show("mos_downtown", "Jan 13, 2012 10:00:00 PM", "Jan 14, 2012 1:30:00 AM", null));


function getShow(showIndex) {
	return shows[showIndex];
}

function getTodaysShow() {
	for (i = 0; i < shows.length; i++) {
		if (isShowToday(shows[i])) {
			return shows[i];
		}
	}
	return null;
}

function addPlace(place) {
	places[place.place] = place;
}

function addShow(show) {
	var now = new Date();
	// Only add show if not older than 4 hours after start time.
	if ((show.date.getTime() + 4 * 60 * 60 * 1000) >= now.getTime()) {
		shows[shows.length] = show;
	}
  else {
		pastShows[pastShows.length] = show;
  }
}

function getDay(show) {
	var days = new Array("Sunday", "Monday", "Tuesday", "Wednesday",
			"Thursday", "Friday", "Saturday");
	return days[show.date.getDay()];
}

function getTime(date) {
	var ap;
	var hour = date.getHours();
	if (date.getHours() < 12) {
		ap = "am";
	} else {
		ap = "pm";
	}
	if (hour == 0) {
		hour = 12;
	}
	if (hour > 12) {
		hour -= 12;
	}
	
	var minutes = "";
	if (date.getMinutes() != 0) {
		minutes = ":" + date.getMinutes();
	}
  return hour + minutes + ap;
}

function getDateTime(show) {
	var months = new Array("Jan.", "Feb.", "March", "April", "May",
			"June", "July", "Aug.", "Sept.", "Oct.", "Nov.",
			"Dec.");

	var suffix;

	if (show.date.getDate() == 1 || show.date.getDate() == 21
			|| show.date.getDate() == 31) {
		suffix = "st";
	} else if (show.date.getDate() == 2 || show.date.getDate() == 22) {
		suffix = "nd";
	} else if (show.date.getDate() == 3 || show.date.getDate() == 23) {
		suffix = "rd";
	} else {
		suffix = "th";
	}

	var date = null;
	if (isShowToday(show)) {
		date = "<span class='showAlert'>Today</span>, " + getDay(show) + " ";
	}
	else if (isShowTomorrow(show)) {
		date = "<span class='showAlert'>Tomorrow</span>, " + getDay(show) + " ";
	}
	else {
		var now = new Date();
    if (show.date.getYear() < now.getYear()) {
      date = getDay(show) + ", " + months[show.date.getMonth()]
        + " " + show.date.getDate() + "<SUP>" + suffix + "</SUP>, " 
        + (show.date.getYear() + 1900) + " ";
    }
    else {
      date = getDay(show) + ", " + months[show.date.getMonth()]
        + " " + show.date.getDate() + "<SUP>" + suffix + "</SUP> ";
    }
  }

	return date + getTime(show.date)+ " - " + getTime(show.endDate);
}

function isShowToday(show) {
	var now = new Date();
	if (show.date.getDate() == now.getDate() && show.date.getMonth() == now.getMonth() && show.date.getYear() == now.getYear()) {
		return true;
	}
	return false;
}

function isShowTomorrow(show) {
	var now = new Date();
	now.setTime(now.getTime() + (24 * 60 * 60 * 1000));
	if (show.date.getDate() == now.getDate() && show.date.getMonth() == now.getMonth() && show.date.getYear() == now.getYear()) {
		return true;
	}
	return false;
}

function getEmailShowsView() {
	var html = "";
	
	for (i = 1; i < shows.length; i++) {
		html += getViewForEmailShow(shows[i]);
	}
	return html;
}

function getViewForEmailShow(show) {
	return "<tr><td>" + getDateTime(show) + "</td><td width='20px'></td><td>" +
		show.description + "</td></tr>";
}

function getHomeViews(mobile, count) {
	var html = "";
	if (count == null) {
		count = 3;
	}
	for (i = 0; i < count && i < shows.length; i++) {
		html += getViewForHome(shows[i], mobile);
	}
	return html;
}

function getViewForHome(show, mobile) {

	var html;
	var description;
	var description2 = "";
	if (show.place.logoImage != null) {
		description = "<img src='" + show.place.logoImage + "' alt='"
				+ show.place.description + "'/>";
		description2 = show.description + "<br/>";
	} else {
		description = show.description;
	}

	if (mobile) {
		html = "<span class='tourinfo'>"
				+ "<a href='/tour'>"
				+ description + "<br/>"
				+ description2
				+ "</a><br/><a href='/tour'>"
				+ getDateTime(show)
				+ "<a/></span><br/><br/>";
	}
	else {
		html = "<div class='subcontent'><table width='100%'><tr><td width='180'><span class='tourinfo'>"
				+ "<a href='/tour'>"
				+ "<center>" + description + "</center>"
				+ "</a></span></td><td width='5px'></td><td><a href='/tour'>"
				+ description2
				+ getDateTime(show)
				+ "<a/>" + "</td></tr></table></div>";
	}
	return html;
}

function getTourViews(mobile) {
	var html = "";
	for (i = 0; i < shows.length; i++) {
		html += getViewForTour(shows[i], mobile);
	}
	return html;
}

function getPastTourViews(mobile) {
	var html = "";
	for (i = pastShows.length - 1; i >= 0 ; i--) {
		html += getViewForTour(pastShows[i], mobile);
	}
	return html;
}


function getViewForTour(show, mobile, alert) {
  var html;
	var description;
	var description2 = "";
	if (show.place.logoImage != null) {
		description = "<img src='" + show.place.logoImage + "' alt='"
				+ show.place.description + "'/>";
		description2 = show.description + "<br/>";
	} else {
		description = show.description;
	}
	
  if (show.pics != null) {
		description = "<a href='" + show.pics + "'>" + description
				+ "</a>";
	}
  else if (show.place.website != null) {
		description = "<a href='" + show.place.website + "'>" + description
				+ "</a>";
	}

	if (mobile) {
		html = "<span class='tourinfo'>" + description + "<br/>"
				+ description2 + getDateTime(show)
				+ "<br/>" + show.place.address
				+ "<br/><a href='" + show.place.mapUrl + "'>Map</a></span><br/><br/>"; 
	}
	else {
				html = "<div class='subcontent'><table width='455px'><tr>"
				+ "<td width='200' class='tourinfo' style='vertical-align:middle'><span class='tourinfo'>" + description + "</span></td>"
				+ "<td width='5px'></td><td><span class='tourinfo'>" + description2 + "</span>" + getDateTime(show)
				+ "<br/><table width='100%'><tr><td>" + show.place.address + "</td>";
				
        var now = new Date();
        if ((show.date.getTime() + 4 * 60 * 60 * 1000) >= now.getTime() && alert == null) {
					html += "<td align='right'><a href='#' onClick=\"showMap('" + show.place.embedMapUrl + "')\">&nbsp;Map</a></td>";
				}
				
				html += "</tr></table>" + "</td></tr></table></div>";
	}
	return html;
}

function getPlaceImage(placeName) {
	var place = places[placeName];
	if (place != null) {
		if (place.logoImage != null) {
			return "<img src='" + place.logoImage + "' alt='"
				+ place.description + "'/>";
		}
		return place.description;
	}
	return "";
}

function Place(place, description, website, logoImage, mapUrl, embedMapUrl, address) {
	this.place = place;
	this.description = description;
	this.website = website;
	this.logoImage = logoImage;
	this.mapUrl = mapUrl;
	this.embedMapUrl = embedMapUrl;
	this.address = address;
}

function Show(place, date, endDate, description, pics) {

	this.place = places[place];
	this.date = new Date(date);
	this.endDate = new Date(endDate);
	if (description == null) {
		this.description = this.place.description;
	} else {
		this.description = description;
	}
  this.pics = pics;
}


