//	function loadSlippyMap() {
//		var options = {
//			dynamicSearch: true,
//			geoip: true,
//			theme: null,
//            routeStyle: { strokeWidth: 8, strokeOpacity: .5, strokeColor: '#0000FF' },
//			controls: [	new OpenLayers.Control.PanZoomBar(), 
//						/* new OpenLayers.Control.NavToolbar(), */
//						new OpenLayers.Control.MapSlider(), 
//						/* new OpenLayers.Control.MousePosition(), */
//						new OpenLayers.Control.MouseDefaults() ],
//			/* maxExtent: new OpenLayers.Bounds(-180,15,-60,75) */
//		};
//		OpenLayers.IMAGE_RELOAD_ATTEMPTS = 2; 
//        OpenLayers.ImgPath='/media/slippymap_files/';
//		SlippyMap.load('map', 'panel', options);		
//	}
	
	function validClickIcon(page, postal_code_bfg, zipcity, state, radius, show_distance) {
	    query = '?postal_code_bfg=' + postal_code_bfg + '&zipcity=' + zipcity +'&state=' + state + '&radius=' + radius;

        switch (page){
            case "favorite":
                winURL = location.pathname + page;
                break;
            default : 
                winURL = '/locator/' + page;
                break;
        }
		        
	    winURL = winURL + query;
        window.open(winURL, target='_self');
	}


	function validClickDirections(street_address_from, city_from, state_from, zip_code_from, 
	                              street_address_to, city_to, state_to, zip_code_to,
	                              radius, show_distance) {
        if(show_distance == 'no') 
        {
            winURL = '/locator/directions-parameters/';
            query = '?street_address_to=' + street_address_to + '&city_to=' + city_to + 
                    '&state_to=' + state_to + '&zip_code_to=' + zip_code_to +
                    '&radius=' + radius + '&show_distance=' + show_distance;
        }
        else
        {
            winURL = '/locator/directions/';
            query = '?street_address_from=' + street_address_from + '&city_from='+ city_from +
                    '&state_from=' + state_from + '&zip_code_from='+ zip_code_from + 
                    '&street_address_to=' + street_address_to + '&city_to='+ city_to + 
                    '&state_to=' + state_to + '&zip_code_to='+ zip_code_to +
                    '&radius=' + radius + '&show_distance=' + show_distance;
        }
        
	    winURL = winURL + query;
        window.open(winURL, target='_self');
	}

