/*
THE ONLY WAY YOUR EVENT LIST WILL GET UPDATED IS BY POINTING TO THIS URL
http://www.weaselsspfld.com/javascript/this_months_mc_events.js

Last Update : Sun, 15 Nov 2009 03:20:34 -0700

this javascript file gets updated by server side code.
don't just copy this file or you'll have outdated events.
point your script tag to the url above.

WFFW

Johnny T
*/
document.write("<script src=\"http://www.weaselsspfld.com/javascript/wms.js\" type=\"text/javascript\"></script>");

	var rallyMap;
	var rallyMapCenter = new GLatLng(38.8402805,-97.6114237);
	var rallyMapZoom = 5;
	var rallyMapRotateSpeed = 5000;
	var rallyMapRotateTimer = 0;
	var rallyMapDivID = "RallyMap";

	var rally_icon = new GIcon();
	rally_icon.image = "http://www.weaselsspfld.com/images/rally_mark.png";
	rally_icon.iconSize = new GSize(30, 23);
	rally_icon.iconAnchor = new GPoint(15, 12);
	rally_icon.infoWindowAnchor = new GPoint(20, 6);
	var rallyGMarkers = new Array();
	var rallies = new Array();
rallies[0]= {title:'Toy Soldier Run',description:'DEC. 7-Toy Soldier Run.The Whiskey, Mobile. Info: 251-367-8680',url:'http://www.weaselsspfld.com/events/motorcycle_rally_by_state/ALABAMA.php',lat:'30.6943566',long:'-88.0430541'};
rallies[1]= {title:'ABATE ChristmasParty and Awards',description:'DEC. 5-ABATE ChristmasParty and Awards. Anchorage. Info: 907-230-9205, www.akbikerruns.com;www.abateofalaska.com',url:'http://www.akbikerruns.com;www.abateofalaska.com',lat:'61.2180556',long:'-149.9002778'};
rallies[2]= {title:'36th AnnualKicks For Kids Toy Run',description:'DEC. 7-36th AnnualKicks For Kids Toy Run. FOP Lodge #2, Phoenix. Info: 480-446-0306;www.star113.org',url:'http://www.star113.org',lat:'33.4483771',long:'-112.0740373'};
rallies[3]= {title:'Rodneys ToyRun',description:'DEC. 6-Rodneys ToyRun. Rodneys Cycle Shop, Little Rock. Info: 501-796-7070',url:'http://www.weaselsspfld.com/events/motorcycle_rally_by_state/ARKANSAS.php',lat:'34.7464809',long:'-92.2895948'};
rallies[4]= {title:'ABATE Toy Run',description:'DEC. 7-ABATE Toy Run.Heartland Honda, Springdale. Info: 479-443-6567',url:'http://www.weaselsspfld.com/events/motorcycle_rally_by_state/ARKANSAS.php',lat:'36.1867442',long:'-94.1288142'};
rallies[5]= {title:'Conway Toy Run',description:'DEC. 20-Conway Toy Run.Pawnbusters, Conway. Info: 501-908-6644',url:'http://www.weaselsspfld.com/events/motorcycle_rally_by_state/ARKANSAS.php',lat:'35.0886963',long:'-92.4421011'};
rallies[6]= {title:'InternationalMotorcycle Show',description:'DEC. 5-7-InternationalMotorcycle Show. Long Beach. Info: 800-331-5706; www.motorcycleshows.com',url:'http://www.motorcycleshows.com',lat:'33.7669623',long:'-118.1892348'};
rallies[7]= {title:'9th AnnnualSanta Claus Inc',description:'DEC. 7-19th AnnnualSanta Claus Inc. Toy Run. Ontario. Info: www.pomonahog.com',url:'http://www.pomonahog.com',lat:'633443',long:'-117.6508876'};
rallies[8]= {title:'23rd AnnualTijuana Toy Run',description:'DEC. 14-23rd AnnualTijuana Toy Run. Sweetwater H-D, National City. Info: 619-420-7000; www.sweetwaterharley.com',url:'http://www.sweetwaterharley.com',lat:'32.6781085',long:'-117.0991967'};
rallies[9]= {title:'23rd AnnualTijuana Toy Run',description:'DEC. 14-23rd AnnualTijuana Toy Run. Sweetwater H-D, National City. Info: 619-420-7000;www.sweetwaterharley.com',url:'http://www.sweetwaterharley.com',lat:'32.6781085',long:'-117.0991967'};
rallies[10]= {title:'HOC Toy Run',description:'DEC. 24-CHOC Toy Run.Childerens Hospital, Irvine. Info: www.ochog.org',url:'http://www.ochog.org',lat:'33.6694649',long:'-117.8231107'};
rallies[11]= {title:'24th AnnualTijuana Toy Run',description:'DEC. 13-24th AnnualTijuana Toy Run. Sweetwater H-D, National City. Info: 619-420-7000;www.sweetwaterharley.com',url:'http://www.sweetwaterharley.com',lat:'32.6781085',long:'-117.0991967'};
rallies[12]= {title:'23rd Annual ToyRun to The Childrens Hospital',description:'DEC. 2-23rd Annual ToyRun to The Childrens Hospital. Shea Center, Highlands Ranch. Info:303-703-2885',url:'http://www.weaselsspfld.com/events/motorcycle_rally_by_state/COLORADO.php',lat:'39.5538771',long:'-104.9694264'};
rallies[13]= {title:'Bikers BashVIP Weekend',description:'DEC. 11-14-Bikers BashVIP Weekend. Fort Lauderdale. Info: 954-563-2822; www.bikersbash.org',url:'http://www.bikersbash.org',lat:'26.1223084',long:'-80.1433786'};
rallies[14]= {title:'Toy Run for ourKids',description:'DEC. 14-Toy Run for ourKids. Marion County South Sheriffs Sub Station, Ocala. Info: 352-854-1190;www.ocalahogchapter.com',url:'http://www.ocalahogchapter.com',lat:'29.1871986',long:'-82.1400923'};
rallies[15]= {title:'rd AnnualFrosty Bells Toy Run',description:'DEC. 13-3rd AnnualFrosty Bells Toy Run. VFW 5408, Acworth. Info: www.cvilleusmvmc.us',url:'http://www.cvilleusmvmc.us',lat:'34.0659329',long:'-84.6768796'};
rallies[16]= {title:'Koa Puna MCHoolaulea',description:'DEC. 6-Koa Puna MCHoolaulea. Oahu. Info: 808-348-3298; www.koapuna.com',url:'http://www.koapuna.com',lat:'21.2800000',long:'-157.5800000'};
rallies[17]= {title:'3rd CVMAHIAnnual Skivvies for our Vets',description:'DEC. 14-3rd CVMAHIAnnual Skivvies for our Vets. Kapolei Theaters. Info: 808-0256-0007;www.hicombatvet.org',url:'http://www.hicombatvet.org',lat:'21.3354015',long:'-158.0917816'};
rallies[18]= {title:'1st AnnualChicago Toys for Tots Motorcycle Parade',description:'DEC. 7-31st AnnualChicago Toys for Tots Motorcycle Parade. Dan Ryan Woods, Chicago. Info:www.chicagolandtft.org',url:'http://www.chicagolandtft.org',lat:'41.850033',long:'-87.6500523'};
rallies[19]= {title:'Walnecks SwapMeet',description:'DEC. 21-Walnecks SwapMeet. Kane County Fairgrounds, St. Charles. Info: 630-985-2097;www.walneckswap.com',url:'http://www.walneckswap.com',lat:'41.9141945',long:'-88.3086867'};
rallies[20]= {title:'2nd AnnualChicago Toys for Tots Motorcycle Parade',description:'DEC. 6-32nd AnnualChicago Toys for Tots Motorcycle Parade. Dan Ryan Woods, Chicago. Info:www.chicagolandtft.org',url:'http://www.chicagolandtft.org',lat:'41.850033',long:'-87.6500523'};
rallies[21]= {title:'Walnecks Swap Meet',description:'DEC. 20-Walnecks Swap Meet.Kane County Fairgrounds, St. Charles. Info: 630-985-2097; www.walneckswap.com',url:'http://www.walneckswap.com',lat:'41.9141945',long:'-88.3086867'};
rallies[22]= {title:'Toy Run forChildrens Hospital',description:'DEC. 20-Toy Run forChildrens Hospital. Handle Bar, Harvey. Info: 504-348-1854',url:'http://www.weaselsspfld.com/events/motorcycle_rally_by_state/LOUISIANA.php',lat:'29.9035387',long:'-90.0772944'};
rallies[23]= {title:'ChristmasParty',description:'DEC. 14-ChristmasParty. Landmark Bar, Muskegon. Info: 231-689-0774',url:'http://www.weaselsspfld.com/events/motorcycle_rally_by_state/MICHIGAN.php',lat:'43.2341813',long:'-86.2483921'};
rallies[24]= {title:'12th Annual Lorn"Truck" Tysver Memorial Holiday Jam',description:'DEC. 5-12th Annual Lorn"Truck" Tysver Memorial Holiday Jam. Shrine Auditorium, Billings. Info:406-661-5988; www.roaddogs.org',url:'http://www.roaddogs.org',lat:'45.7832856',long:'-108.5006904'};
rallies[25]= {title:'24th Annual ToyRun',description:'DEC. 7-24th Annual ToyRun. Northside Firestation, Billings. Info: 406-661-5988; www.roaddogs.org',url:'http://www.roaddogs.org',lat:'45.7832856',long:'-108.5006904'};
rallies[26]= {title:'th Annual Toy Run',description:'DEC. 8-7th Annual Toy Run. BrotherhoodOf The 74, Carlsbad. Info: www.brotherhoodofthe74.com',url:'http://www.brotherhoodofthe74.com',lat:'32.4206736',long:'-104.2288375'};
rallies[27]= {title:'th AnniversaryParty',description:'DEC. 6-6th AnniversaryParty. 69ers MC, Staten Island. Info: www.69ersmc.com',url:'http://www.69ersmc.com',lat:'40.58300',long:'-74.15000'};
rallies[28]= {title:'Ugly PokerRun  and  Motorcycle Rodeo',description:'DEC. 8-10-Ugly PokerRun  and  Motorcycle Rodeo. Webster. Info: 585-478-4631',url:'http://www.weaselsspfld.com/events/motorcycle_rally_by_state/NEW_YORK.php',lat:'43.2122851',long:'-77.4299939'};
rallies[29]= {title:'Toys for TotsRun',description:'DEC. 7-Toys for TotsRun. Carolina Coast H-D, Wilmington. Info: 910-791-9997;www.carolinacoasthd.com',url:'http://www.carolinacoasthd.com',lat:'34.2257256',long:'-77.9447102'};
rallies[30]= {title:'M/C SwapMeet',description:'DEC. 7-M/C SwapMeet. State Fair Park, Oklahoma City. Info: 816-456-4415;www.jwswapmeet.com',url:'http://www.jwswapmeet.com',lat:'35.4675602',long:'-97.5164276'};
rallies[31]= {title:'M/C SwapMeet',description:'DEC. 6-M/C SwapMeet. State Fair Park, Oklahoma City. Info: 816-456-4415;www.jwswapmeet.com',url:'http://www.jwswapmeet.com',lat:'35.4675602',long:'-97.5164276'};
rallies[32]= {title:'28th AnnualShriners Toy Run',description:'DEC. 6-28th AnnualShriners Toy Run. Portland. Info: 503-255-5415, www.abateoforegon.net',url:'http://www.abateoforegon.net',lat:'45.5234515',long:'-122.6762071'};
rallies[33]= {title:'Rogue Valley ToyRun',description:'DEC. 6-Rogue Valley ToyRun. D and S Harley-Davidson, Medford. Info: www.roguevalleytoyrun.com',url:'http://www.roguevalleytoyrun.com',lat:'42.3265153',long:'-122.8755949'};
rallies[34]= {title:'29th AnnualRogue Valley Toy Run',description:'DEC. 5-29th AnnualRogue Valley Toy Run. D and S Harley-Davidson, Medford. Info:www.roguevalleytoyrun.com',url:'http://www.roguevalleytoyrun.com',lat:'42.3265153',long:'-122.8755949'};
rallies[35]= {title:'Toys For TotsParty',description:'DEC. 13-Toys For TotsParty. Rock City Lounge, Little Rock. Info: 501-909-9430',url:'http://www.weaselsspfld.com/events/motorcycle_rally_by_state/SOUTH_CAROLINA.php',lat:'34.4055519',long:'-79.3038711'};
rallies[36]= {title:'ise County ToyRun',description:'DEC. 7-Wise County ToyRun. Decatur. Info: www.wctoyrun.com',url:'http://www.wctoyrun.com',lat:'33.2342834',long:'-97.5861393'};
rallies[37]= {title:'4th Annual Forthe Kids Toy Run',description:'DEC. 7-14th Annual Forthe Kids Toy Run. Red River Autoplex, Denison. Info: www.forthekidstexas.com',url:'http://www.forthekidstexas.com',lat:'33.7556593',long:'-96.536658'};
rallies[38]= {title:'5th Annual Toysfor Tots Toy Run',description:'DEC. 13-15th Annual Toysfor Tots Toy Run. Pasadena. Info: www.toysfortotstoyrun.com',url:'http://www.toysfortotstoyrun.com',lat:'29.6910625',long:'-95.2091006'};
rallies[39]= {title:'20th Annual ToyRun',description:'DEC. 14-20th Annual ToyRun. Texan H-D, Conroe. Info: 936-447-3025; www.cutnshoothog.org',url:'http://www.cutnshoothog.org',lat:'30.3118769',long:'-95.4560512'};
rallies[40]= {title:'Need To Feed Benefit Christmas Party',description:'DEC. 13-Need To Feed Benefit Christmas Party.SLC ABATE, Filling Station, Magna. Info: 801-347-7031; www.abateslc.org',url:'http://www.abateslc.org',lat:'40.7091121',long:'-112.1016088'};
rallies[41]= {title:'lympia Toy Run',description:'DEC. 6-Olympia Toy Run.South Sound Center, Lacy. Info: www.olytoyrun.com',url:'http://www.olytoyrun.com',lat:'47.0342629',long:'-122.8231915'};
rallies[42]= {title:'lympia ToyRun',description:'DEC. TBA-Olympia ToyRun. South Sound Center, Lacy. Info: www.olytoyrun.com',url:'http://www.olytoyrun.com',lat:'47.0342629',long:'-122.8231915'};
	function rallyMapInitializeMap() {
		rallyMap = new GMap(document.getElementById( rallyMapDivID ));
		rallyMap.setCenter( rallyMapCenter, rallyMapZoom );
		rallyMap.enableDoubleClickZoom();
		rallyMap.enableContinuousZoom();
		//rallyMap.addControl(new GSmallMapControl());
		rallyMap.addControl(new GLargeMapControl());
		rallyMap.addControl(new GMapTypeControl());
		rallyMap.addControl(new GScaleControl(), new GControlPosition(G_ANCHOR_BOTTOM_LEFT, new GSize(150,10))) ;
		rallyMap.addControl(new GOverviewMapControl(), new GControlPosition(G_ANCHOR_BOTTOM_RIGHT, new GSize(10,10)));
        	rallyMap.addMapType(G_PHYSICAL_MAP);
		// a little extra from wms.js
        	rallyMap.addMapType(us_topo());
        	rallyMap.addMapType(us_nexrad());
	}

	function loadRallyMap() {
		rallyMapInitializeMap();
		for (var i in rallies) {
			rallyMap.addOverlay( createRallyMarker( i ) );
		}

		// start cycling through rally info windows
		// clicking on a icon will stop the cycleing
		changeRallyMarker();
	}

	// Creates a marker at the given point with the given number label
	function createRallyMarker( index ) {
		var rally = rallies[index];
		var marker = new GMarker( new GLatLng(rally.lat, rally.long), rally_icon );
		GEvent.addListener(marker, "mouseover", function() {
			var r = rallies[index];
			var iwHtml = "<div style='width:300px;'>";
			if( r.url.indexOf("http://www.weaselsspfld.com/") < 0 ) {
				iwHtml += "<img src='http://open.thumbshots.org/image.aspx?url="+r.url+"' style='float:left;width:120px;height:90px;margin:2px;'>";
			}
			iwHtml += "<a href='"+r.url+"' style='font-weight:bold;color:black;' target='_blank'>"+r.title+"</a>";
			iwHtml += "<p>"+r.description+"</p>";
			iwHtml += "</div>";
			marker.openInfoWindowHtml(iwHtml);
		});
		GEvent.addListener(marker, "click", function() {
			clearTimeout(rallyMapRotateTimer);
			rallyMapRotateTimer = setTimeout( "changeRallyMarker();", rallyMapRotateSpeed*4 );
		});

		rallies[index].marker = marker;
		return marker;
	}

	function changeRallyMarker() {
		var index = Math.floor(Math.random()*rallies.length)
		if( index == null )
			index = 0;
		var marker = rallies[index].marker;
		GEvent.trigger(marker,"mouseover");
		rallyMapRotateTimer = setTimeout( "changeRallyMarker();", rallyMapRotateSpeed );
	}

	/* disable javascript errors */
	//function noError(){return true;} 
	//window.onerror = noError;
