// Returns the version of Internet Explorer or a -1 // (indicating the use of another browser). function getIEVersion() { var rv = -1; // Return value assumes failure. if (navigator.appName == 'Microsoft Internet Explorer') { var ua = navigator.userAgent; var re = new RegExp("MSIE ([0-9]{1,}[\.0-9]{0,})"); if (re.exec(ua) != null) { rv = parseFloat(RegExp.$1); } } else if (navigator.appName == 'Netscape') { var ua = navigator.userAgent; var re = new RegExp("Trident/.*rv:([0-9]{1,}[\.0-9]{0,})"); if (re.exec(ua) != null) { rv = parseFloat(RegExp.$1); } } return rv; } $(document).ready(function() { var options = { station: getQueryString("station"), // does NOT trumph address. address: getQueryString("address"), // trumphs lat/lng. lat: parseFloat(getQueryString("latitude")), lng: parseFloat(getQueryString("longitude")), year: getQueryString("year"), embed: getQueryString("embed") == "true", imagePath: "images/m", output: { id: document.getElementById("station"), name: document.getElementById("station-name"), latitude: document.getElementById("latitude"), longitude: document.getElementById("longitude") } }; var help = '
Use the map below to select a weather station to be used with your project. ' + 'Simply click a station marker to select it; click a different marker if you ' + 'change your mind.
'; if (!options.embed) { help += 'Once you have selected a weather station, COPY the Station ID and PASTE it ' + 'into the Weather Station input box in the application form.
'; } new WeatherStationMap(options, help); });