function initialize() { var myOptions = { zoom: 7, center: new google.maps.LatLng(40.7933949,-77.8600012), mapTypeControl: false, mapTypeId: google.maps.MapTypeId.ROADMAP } var map = new google.maps.Map(document.getElementById("map_canvas"),myOptions); google.maps.event.addListener(map, 'click', function() { infowindow.close(); }); setMarkers(map, locations); } var infowindow = new google.maps.InfoWindow(); function createMarker(map, latlng, name, place, tbd, status,eventid) { var image = new google.maps.MarkerImage('/profile/img/gomarker.png', new google.maps.Size(32, 40), new google.maps.Point(0, 0), new google.maps.Point(10, 34)); var image2 = new google.maps.MarkerImage('/profile/img/nomarker.png', new google.maps.Size(32, 40), new google.maps.Point(0, 0), new google.maps.Point(10, 34)); if(status=="1"){ var contentString = "
Location: "+place+"
"+tbd+"
"; var marker = new google.maps.Marker({ position: latlng, map: map, icon: image, title: name, zIndex: Math.round(latlng.lat()*-100000)<<5 }); } else{ var contentString = "
Location: "+place+"
"+tbd+ "
"; var marker = new google.maps.Marker({ position: latlng, map: map, icon: image2, title: name, zIndex: Math.round(latlng.lat()*-100000)<<5 }); } google.maps.event.addListener(marker, 'click', function() { infowindow.setContent(contentString); infowindow.open(map,marker); $("#update").html("
"+contentString); $("#reg").hide(); $("a").click(function(){ $("#reg").show(); $("#eventid").val(eventid); //alert("click"); }); //document.getElementById("details").innerHTML = contentString; }); } var locations = [["40.2592969","-76.8803460","A Practical Introduction to the Work Incentives Available for People with Disabilities","Crown Plaza Hotel, 23 South Second Street, Harrisburg, PA, 17101","March 15, 2011","0","62"],["40.0283370","-79.2895740","A Practical Introduction to the Work Incentives Available for People with Disabilities","Seven Springs Mountain Resort, 777 Waterwheel Drive, Seven Springs, PA, 15622","March 16, 2011","0","63"],["40.6659910","-75.3811880","A Practical Introduction to the Work Incentives Available for People with Disabilities","Best Western Lehigh Valley, 200-300 Gateway Dr., Bethlehem, PA, 18017","March 21, 2011","0","43"],["40.1014670","-75.3529730","A Practical Introduction to the Work Incentives Available for People with Disabilities","SE Regional Training Center Bridgeport, 123 Boro Line Rd. , King of Prussia, PA, 19406","March 22, 2011","0","33"],["40.8232245","-77.8971635","A Practical Introduction to the Work Incentives Available for People with Disabilities","Toftrees Conference Center, One Country Club Lane, State College, PA, 16803","March 23, 2011","0","41"],["40.4556369","-78.4019589","A Practical Introduction to the Work Incentives Available for People with Disabilities","Blair County Convention Center, One Convention Center Drive, Altoona, PA, 16602","March 29, 2011","0","42"],["40.5944992","-79.1621544","A Practical Introduction to the Work Incentives Available for People with Disabilities","Holiday Inn Indiana, 1395 Wayne Avenue, Indiana, PA, 15701","April 11, 2011","0","64"],["39.9981688","-80.0276984","A Practical Introduction to the Work Incentives Available for People with Disabilities","Holiday Inn Meadowlands, 340 Race Track Road, Washington, PA, 15301","April 12, 2011","0","65"],["40.4715602","-78.7506398","A Practical Introduction to the Work Incentives Available for People with Disabilities","Red Carpet Inn & Suites, 4554 Admiral Perry Hwy, Ebensburg , PA, 15931","April 13, 2011","0","66"],["40.4405940","-79.9965920","A Practical Introduction to the Work Incentives Available for People with Disabilities","Omni Westin William Penn Place, 530 William Penn Place , Pittsburgh, PA, 15219","May 23, 2011","0","67"],["40.0185073","-79.0828538","A Practical Introduction to the Work Incentives Available for People with Disabilities","Quality Inn & Conference Center, 215 Ramada Road, Somerset, PA, 15501","May 24, 2011","0","68"],["39.9961630","-78.5068790","A Practical Introduction to the Work Incentives Available for People with Disabilities","Omni Bedford Springs, 2138 Business 220, Bedford, PA, 15522","May 25, 2011","0","69"],["41.1258532","-78.7502038","A Practical Introduction to the Work Incentives Available for People with Disabilities","Best Western Inn & Conference Center, 82 N. Park Place, Dubois, PA, 15801","June 6, 2011","0","34"],["42.0503578","-80.0822158","A Practical Introduction to the Work Incentives Available for People with Disabilities","Ambassador Center Hotel, I-90 & Peach Street, Erie, PA, 16509","June 7, 2011","0","70"],["41.1908028","-79.3919378","A Practical Introduction to the Work Incentives Available for People with Disabilities","Holiday Inn Clarion, 45 Holiday Inn Road, Clarion, PA, 16214","June 8, 2011","0","36"],["40.5457102","-79.8284564","A Practical Introduction to the Work Incentives Available for People with Disabilities","PaTTAN Pittsburgh, 3190 William Pitt Way, Pittsburgh, PA, 15238","June 9, 2011","0","37"],["39.9518820","-75.1470640","A Practical Introduction to the Work Incentives Available for People with Disabilities","Holiday Inn Historic District, 400 Arch Street, Philadelphia , PA, 19106","June 21, 2011","0","71"],["40.3472750","-75.9697020","A Practical Introduction to the Work Incentives Available for People with Disabilities","Crowne Plaza, 1741 Papermill Road, Wyomissing, PA, 19610","June 22, 2011","0","72"],["40.2415370","-76.8006640","A Practical Introduction to the Work Incentives Available for People with Disabilities","Holiday Inn Harrisburg East, 4751 Lindle Road, Harrisburg , PA, 17101","June 23, 2011","0","73"],["40.5457102","-79.8284564","A Practical Introduction to the Work Incentive Available for People with Disabilities ","PaTTAN Pittsburgh, 3190 William Pitt Way, Pittsburgh, PA, 15238","July 11, 2011","0","79"],["40.2415370","-76.8006640","A Practical Introduction to the Work Incentive Available for People with Disabilities ","Holiday Inn Harrisburg East, 4751 Lindle Road, Harrisburg , PA, 17101","July 12, 2011","0","80"],["39.9518820","-75.1470640","A Practical Introduction to the Work Incentive Available for People with Disabilities ","Holiday Inn Historic District, 400 Arch Street, Philadelphia , PA, 19106","July 13, 2011","0","81"],["41.4130030","-75.6726690","A Practical Introduction to the Work Incentive Available for People with Disabilities ","Raddisson-Lackawanna Station-Hotel Scranton, 700 Lackawanna Avenue, Scranto, PA, 18503","August 17, 2011","0","82"]] function setMarkers(map, locations) { for (var i = 0; i < locations.length; i++) { var location = locations[i]; var myLatLng = new google.maps.LatLng(location[0], location[1]); var marker = createMarker(map,myLatLng,location[2],location[3],location[4],location[5],location[6]); } }