var bounds = new OpenLayers.Bounds($("minlon").value, $("minlat").value, $("maxlon").value, $("maxlat").value);
var layerName = map.baseLayer.name.toLowerCase();
var url = "http://#{SERVER_URL}/export/embed.html?bbox=" + bounds.toBBOX() + "&layer=" + layerName;
var bounds = new OpenLayers.Bounds($("minlon").value, $("minlat").value, $("maxlon").value, $("maxlat").value);
var layerName = map.baseLayer.name.toLowerCase();
var url = "http://#{SERVER_URL}/export/embed.html?bbox=" + bounds.toBBOX() + "&layer=" + layerName;
bounds.transform(epsg4326, epsg900913);
var zoom = map.getZoomForExtent(bounds);
bounds.transform(epsg4326, epsg900913);
var zoom = map.getZoomForExtent(bounds);
if ($("format_osmarender").checked) {
var zoom = Math.min(map.getZoom(), maxOsmarenderZoom());
if ($("format_osmarender").checked) {
var zoom = Math.min(map.getZoom(), maxOsmarenderZoom());
$("osmarender_zoom").options.selectedIndex = zoom - 4;
$("export_osmarender").style.display = "inline";
} else {
$("osmarender_zoom").options.selectedIndex = zoom - 4;
$("export_osmarender").style.display = "inline";
} else {