		var geocodes = [
				  {
					"name": "Americana Building",//0
					"desc": "<b>Americana Building</b><br>ACT Center<br>811 Dallas, 7th Floor<br>Houston, Texas 77002<br>Phone (713) 718-5149",
					"address": "811 Dallas, Houston, Texas 77002",
					"posn": [29.756462, -95.367738],
					"icon": "/vgn-ext-templating/hcc/images/hcc_logo_small.png"										
				  },
				  {
					"name": "Administration Building",//1
					"desc": "<b>HCC Administration Building </b><br> 3100 Main st., <br>Houston, TX, 77002<br><a href='http://www.hccs.edu'>www.hccs.edu</a><br>System Administration (713) 718-5000<br>Information Technology (713) 718-8700<br>Student Services (713) 718-2000",
					"address": "3100 Main st., Houston, TX, 77002",
					"posn": [29.741991, -95.376890],
					"icon": "/vgn-ext-templating/hcc/images/hcc_logo_small.png"					
				  },
				  {
					"name": "Central Campus",//2
					"desc": "<b>Central Campus</b><br>1300 Holman<br>Houston, Texas 77004<br>Phone (713) 718-6000",
					"address": "1300 Holman, Houston, Texas 77004",
					"posn": [29.738315, -95.376092],
					"icon": "/vgn-ext-templating/hcc/images/hcc_logo_small.png"										
				  },
				  {
					"name": "Willie Lee Gay Hall",//3
					"desc": "<b>Willie Lee Gay Hall</b><br>1990 Airport Blvd.<br>Houston, Texas 77051<br>Phone (713) 718-6634",
					"address": "1990 Airport Blvd., Houston, Texas 77051",
					"posn": [29.643507, -95.404806],
					"icon": "/vgn-ext-templating/hcc/images/hcc_logo_small.png"										
				  },
				  {
					"name": "Coleman College for Health Sciences",//4
					"desc": "<b>Coleman College for Health Sciences</b><br>1900 Pressler st.,<br>Houston, Texas 77030<br>Phone (713) 718-7400",
					"address": "1900 Pressler st., Houston, Texas 77030",
					"posn": [29.704195, -95.406604],
					"icon": "/vgn-ext-templating/hcc/images/hcc_logo_small.png"														  
				  },
				  {
					"name": "Automotive Technology Training Center",//5
					"desc": "<b>Automotive Technology Training Center</b><br>4638 Airline<br>Houston, Texas 77022<br>Phone (713) 718-8100",
					"address": "4638 Airline Dr., Houston, Texas 77022",
					"posn": [29.834028, -95.3843],
					"icon": "/vgn-ext-templating/hcc/images/hcc_logo_small.png"														  
				  },
				  {
					"name": "Northeast Campus",//6
					"desc": "<b>Northeast Campus</b><br>555 Community College Drive<br>Houston, Texas 77013<br>Codwell Hall<br>(713) 718-8300<br><br>Law Enforcement Training Center<br>(713) 718-8319<br><br>Roland Smith Commercial Truck Driving School<br>(713) 718-8200 ",
					"address": "555 Community College Drive, Houston, Texas 77013",
					"posn": [29.779258, -95.259288],
					"icon": "/vgn-ext-templating/hcc/images/hcc_logo_small.png"														  
				  },
				  {
					"name": "Northline Mall Center",//7
					"desc": "<b>Northline Mall Center</b><br>401 Northline Mall<br>Houston, Texas 77022<br>Phone (713) 718-8000",
					"address": "401 Northline Mall, Houston, Texas 77022",
					"posn": [29.83345, -95.381266],
					"icon": "/vgn-ext-templating/hcc/images/hcc_logo_small.png"														  
				  },
				  {
					"name": "Pinemont Center",//8
					"desc": "<b>Pinemont Center</b><br>1265 Pinemont Dr.<br>Houston, Texas 77018<br>Phone (713) 718-8400",
					"address": "1265 Pinemont Dr., Houston, Texas 77018",
					"posn": [29.840931, -95.427482],
					"icon": "/vgn-ext-templating/hcc/images/hcc_logo_small.png"														  
				  },
				  {
					"name": "Cinco Ranch",//9
					"desc": "<b>Cinco Ranch</b><br>4242 South Mason Road<br>Houston, Texas 77450<br>Phone (713) 718-5757",
					"address": "4242 South Mason Road, Houston, Texas 77450",
					"posn": [29.723372, -95.754974],
					"icon": "/vgn-ext-templating/hcc/images/hcc_logo_small.png"														  
				  },
				  {
					"name": "Katy Mills",//10
					"desc": "<b>Katy Mills</b><br>25403 Kingsland Blvd.<br>Katy, Texas 77494<br>Phone (281) 644-6080",
					"address": "25403 Kingsland Blvd., Katy, Texas 77494",
					"posn": [29.771955, -95.805914],
					"icon": "/vgn-ext-templating/hcc/images/hcc_logo_small.png"														  
				  },
				  {
					"name": "Spring Branch",//11
					"desc": "<b>Spring Branch</b><br>1010 W. Sam Houston Parkway N.<br>Houston, Texas 77043<br>Phone (713) 718-5700",
					"address": "1010 W. Sam Houston Parkway N., Houston, Texas 77043",
					"posn": [29.786617, -95.562576],
					"icon": "/vgn-ext-templating/hcc/images/hcc_logo_small.png"														  
				  },
				  {
					"name": "Westgate Campus",//12
					"desc": "<b>Westgate Campus</b><br>1550 Foxlake Drive<br>Houston, Texas 77084<br>Phone (713) 718-5757",
					"address": "1550 Foxlake Drive, Houston, Texas 77084",
					"posn": [29.789969, -95.71492],
					"icon": "/vgn-ext-templating/hcc/images/hcc_logo_small.png"														  
				  },
				  {
					"name": "Eastside Campus",//13
					"desc": "<b>Eastside Campus</b><br>Felix H. Morales Building<br>Angela V. Morales Building<br>6815 Rustic Dr.<br>Houston, Texas 77087<br>Phone (713) 718-7000",
					"address": "6815 Rustic Dr., Houston, Texas 77087",
					"posn": [29.704179, -95.297244],
					"icon": "/vgn-ext-templating/hcc/images/hcc_logo_small.png"														  
				  },
				  {
					"name": "Eastside Annex",//14
					"desc": "<b>Eastside Annex</b><br>2524 Garland Dr.<br>Houston, Texas 77087<br>Phone (713) 718-7580",
					"address": "2524 Garland Dr., Houston, Texas 77087",
					"posn": [29.704095, -95.294485],
					"icon": "/vgn-ext-templating/hcc/images/hcc_logo_small.png"														  
				  },
				  {
					"name": "Alief Campus ",//15
					"desc": "<b>Alief Campus</b><br>2811 Hayes Rd.<br>Houston, Texas 77082 <br>Phone (713) 718-6870",
					"address": "2811 Hayes Rd., Houston, Texas 77082 ",
					"posn": [29.734819, -95.57603],
					"icon": "/vgn-ext-templating/hcc/images/hcc_logo_small.png"														  
				  },
				  {
					"name": "Stafford Campus",//16
					"desc": "<b>Stafford Campus</b><br>10041 Cash Road<br>Stafford, Texas 77477<br>Phone (713) 718-7800",
					"address": "10041 Cash Road, Stafford, Texas 77477",
					"posn": [29.627587, -95.55333],
					"icon": "/vgn-ext-templating/hcc/images/hcc_logo_small.png"														  
				  },
				  {
					"name": "Applied Technology Center",//17
					"desc": "<b>Applied Technology Center</b><br>4010 Bluebonnet<br>Stafford, Texas 77477<br>Phone (713) 718-6700",
					"address": "4010 Bluebonnet Dr., Stafford, Texas 77477",
					"posn": [29.635854, -95.569685],
					"icon": "/vgn-ext-templating/hcc/images/hcc_logo_small.png"														  
				  },
				  {
					"name": "Greenbriar Annex",//18
					"desc": "<b>Greenbriar Annex</b><br>13645 Murphy Rd.<br>Stafford, Texas 77477<br>Phone (713) 718-6700",
					"address": "13645 Murphy Rd., Stafford, Texas 77477",
					"posn": [29.624492, -95.564825],
					"icon": "/vgn-ext-templating/hcc/images/hcc_logo_small.png"														  
				  },
				  {
					"name": "Scarcella Center",//19
					"desc": "<b>Scarcella Center</b><br>10141 Cash Rd.<br>Stafford, Texas 77477<br>Phone (713) 718-6700",
					"address": "10141 Cash Rd., Stafford, Texas 77477",
					"posn": [29.627398, -95.556502],
					"icon": "/vgn-ext-templating/hcc/images/hcc_logo_small.png"														  
				  },
				  {
					"name": "Gulfton Center",//20
					"desc": "<b>Gulfton Center</b><br>5407 Gulfton Rd.,<br> Houston, Texas 77081<br>Phone (713) 718-7760",
					"address": "5407 Gulfton Rd., Houston, Texas 77081",
					"posn": [29.716466, -95.474834],
					"icon": "/vgn-ext-templating/hcc/images/hcc_logo_small.png"														  
				  },
				  {
					"name": "Missouri City Center",//21
					"desc": "<b>Missouri City Center</b><br>5855 Sienna Springs Way,<br>Missouri City, Texas 77489<br>Phone (281) 835-5539",
					"address": "5855 Sienna Springs Way, Missouri City, Texas 77489",
					"posn": [29.58351, -95.527498],
					"icon": "/vgn-ext-templating/hcc/images/hcc_logo_small.png"														  
				  },
				  {
					"name": "West Loop Center",//22
					"desc": "<b>West Loop Center</b><br>5601 West Loop South,<br> Houston, Texas 77081<br>Phone (713) 718-7868",
					"address": "5601 West Loop South, Houston, Texas 77081",
					"posn": [29.72139, -95.459784],
					"icon": "/vgn-ext-templating/hcc/images/hcc_logo_small.png"														  
				  },
				  {
					"name": "Alief Continuing Education Center",//23
					"desc": "<b>Alief Continuing Education Center</b><br>13803 Bissonnet St.,<br> Houston, Texas 77083<br>Phone (713) 718-5450",
					"address": "13803 Bissonnet St., Houston, Texas 77083",
					"posn": [29.680398, -95.625537],
					"icon": "/vgn-ext-templating/hcc/images/hcc_logo_small.png"														  
				  }				  
		];
		
  //Create an array to store all markers
  var markers = new Array();
		
  google.load("maps", "2.x");

  // Call this function when the page has been loaded
  function initialize() {

      if (GBrowserIsCompatible()) {
        var map = new GMap2(document.getElementById("map"));
        map.addControl(new GLargeMapControl());
        map.addControl(new GMapTypeControl());
        map.setCenter(new GLatLng(29.741991, -95.376890), 10);

        // Creates a marker at the given point with the given number label
        function createMarker(point, number) {		  

		  var icon = new GIcon();
		  icon.image = geocodes[number]["icon"];
		  //icon.shadow = "http://labs.google.com/ridefinder/images/mm_20_shadow.png";
		  icon.iconSize = new GSize(33, 22);
		  //icon.shadowSize = new GSize(22, 20);
		  icon.iconAnchor = new GPoint(6, 20);
		  icon.infoWindowAnchor = new GPoint(10,10);

  		  var DIRECTION_CONTENT =
		   '<br><br><form action="http://maps.google.com/maps" method="get" target="_blank">' +
		   '<b>Get Directions to '+ geocodes[number]["name"] +'</b>' +
		   '<span>Start address:</span><br />' +
		   '<input type="text" SIZE=40 name="saddr" id="saddr" value="Street, City, State, Zip"' +
		   '  onFocus="this.value=\'\';" /><br>' + 
           '<input class="button" value="Get Directions" TYPE="SUBMIT"/>' +
           '<input type="hidden" name="daddr" value="'+geocodes[number]["address"]+'"/></form>';

		   var INFO_WINDOW_CONTENT = '<div class="directions">'+geocodes[number]["desc"] + DIRECTION_CONTENT+'</div>';


          var marker = new GMarker(point, { title: geocodes[number]["name"], icon: icon });
          GEvent.addListener(marker, "click", function() {
            marker.openInfoWindowHtml(INFO_WINDOW_CONTENT);
          });
          
          markers[number] = marker;
          
          return marker;
        }

        // Add markers to the map at geocodes
        for (var i = 0; i < geocodes.length; i++) {
          var point = new GLatLng(geocodes[i]["posn"][0],
                                  geocodes[i]["posn"][1]);
          map.addOverlay(createMarker(point, i));
        }
      }
   }
   google.setOnLoadCallback(initialize);

	function showInfoWindow(num) {
		GEvent.trigger(markers[num],'click');
	}
	
	function getDesc(obj, num) {
		obj.title = geocodes[num]["desc"];
	}