//<script>
var mapWin = false;

function loadLayersNow() {
	if (!mapWin) {
		theLeft	= (document.getElementById) ? window.screenLeft + document.body.clientWidth/2 - 204 : screen.availWidth/2 - 204;
		if (theLeft < 0) theLeft = 0;
		theTop	= (document.getElementById) ? window.screenTop + document.body.clientHeight/2 - 107 : screen.availHeight/2 - 127;
		if (theTop < 0) theTop = 0;
		if (!document.getElementById) {
			mapWin	= window.open("/kort/kort.asp","mapWindow","height=215,width=412,left=" + theLeft + ",screenX=" + theLeft + ",top=" + theTop + ",screenY=" + theTop);
		}
		else {
			mapWin	= window.showModelessDialog("/kort/kort.asp",window,"status:no;dialogWidth:418px;dialogHeight:241px;dialogLeft:" + theLeft + "px;dialogTop:" + theTop + "px");
		}
	}
	else {
		mapWin.focus();
	}
}

function addOption(radius,by) {
	newDivider = document.createElement("OPTION");
	newDivider.text = "----------------------";
	newDivider.value = 0;
	document.searchForm.RegionId.options.add(newDivider);
	newSearchArea = document.createElement("OPTION");
	newSearchArea.text = by + " (" + radius + "km)";
	newSearchArea.value = by + "," + radius;
	document.searchForm.RegionId.options.add(newSearchArea);
	document.searchForm.RegionId.selectedIndex = document.searchForm.RegionId.length - 1;
	mapWin.searchArea = true;
	setTimeout("mapWin.focus()",25);
}

mapReady = true;