 	var map;
 	var circleid = 7;
 	
   function initialize() {
      if (GBrowserIsCompatible()) {
        map = new GMap2(document.getElementById("map_canvas"));       
        map.setCenter(new GLatLng(29.75995, -95.36253), 10, G_HYBRID_MAP);
        map.addControl(new GSmallMapControl());
        //map.addControl(new GMapTypeControl());
        controlcircles();
      }
    }
    
    function controlcircles() {
    	//hide all circles
    	for (var i = 1; i <= 9; i++) {
    	document.getElementById('circle' + i).style.display = 'none';
    	}
    	//show just one circle
    	document.getElementById("circle" + circleid).style.display = "block";
    }
    
    function makecirclesmaller() {
    	//decrement the circleid
    	if (circleid > 1) {
    	circleid -= 1;
    	controlcircles();
    	}
    }
    
    function makecirclelarger() {
    	//decrement the circleid
    	if (circleid < 9) {
    	circleid += 1;
    	controlcircles();
    	}
    }

    function savejobticket(form) {
    	//are we in the service area?
    	var lng = map.getCenter().lng();
    	var lat = map.getCenter().lat();
    	var zoom = map.getZoom();
    	//check map clarity
    	if (zoom < 14) {
    		//alert('Please zoom in more so we can see your site better. If you cannot see all of your site in the map window, then your site is too large.  Please call 281-565-5600 for a free quote.');
    		alert('Please zoom in more so we can see your site better.');
    		return false;
    	}
    	//check site size
    	if (zoom == 14 && circleid > 4) {
    		alert('Your site is too large for our Standard Package price.  Please make the circle smaller, or call 281-565-5600 for a free quote.');
    		return false;
 		}
    	//check site location
    	if (lng > -94.8 || lng < -96.5 || lat > 30.5 || lat < 28.9) {
    		alert('Your site is outside our Standard Package price area.  Please call 281-565-5600 for a free quote.');
    		return false;
    	}
		var jobticket = "http://www.metroviews.com/private/jobticket.asp?Lat=" +lat;
		jobticket += "&Lng=" + lng;
		jobticket += "&Zoom=" + map.getZoom();
		jobticket += "&CircleID=" + circleid;
		//prompt("URL:", jobticket);
		document.getElementById("custom").setAttribute("value",jobticket);
    }

