function getMap()
{
	if (navigator.appName == "Netscape")
		return parent.mapframe.document.map;
	else
		return parent.MyMapFrame.MyMap;
}


function Inhabitants()
{
	var map = getMap();
	var layer = map.getMapLayer("Hus");
	map.setAutoRefresh(false);
	if (layer == null)
		alert ("layer not found");
	else
	{
		layer.setVisibility(true);
	}

	map.getMapLayerGroup("VEGMANNVIRKI").setVisibility(true);
	map.getMapLayerGroup("MANNVIRKI").setVisibility(true);
	map.getMapLayerGroup("VATNAKERFI").setVisibility(true);
	map.getMapLayer("LODIR").setVisibility(true);
	map.getMapLayer("Gotur").setVisibility(true);
	map.getMapLayer("Vegir").setVisibility(true);
		
	map.getMapLayerGroup("FRAVEITA").setVisibility(false);
	map.getMapLayer("Fraveita").setVisibility(false);
	map.getMapLayer("Fraveita_texti").setVisibility(false);
	map.getMapLayer("Teikningar").setVisibility(false);

	
	map.setAutoRefresh(true);
	map.refresh();
}

function Properties()
{
	Inhabitants()
}

function Drawings()
{
	var map = getMap();
	var layer = map.getMapLayer("Hus");
	map.setAutoRefresh(false);
	if (layer == null)
		alert ("layer not found");
	else
	{
		layer.setVisibility(true);
	}

	map.getMapLayerGroup("VEGMANNVIRKI").setVisibility(true);
	map.getMapLayerGroup("MANNVIRKI").setVisibility(true);
	map.getMapLayerGroup("VATNAKERFI").setVisibility(true);
	map.getMapLayer("LODIR").setVisibility(true);
	map.getMapLayer("Gotur").setVisibility(true);
	map.getMapLayer("Vegir").setVisibility(true);
	map.getMapLayer("Teikningar").setVisibility(true);
			
	map.getMapLayerGroup("FRAVEITA").setVisibility(false);
	map.getMapLayer("Fraveita").setVisibility(false);
	map.getMapLayer("Fraveita_texti").setVisibility(false);
	
	map.setAutoRefresh(true);
	map.refresh();
}

function Pipes()
{
	var map = getMap();
	map.setAutoRefresh(false);
	map.getMapLayerGroup("VEGMANNVIRKI").setVisibility(true);
	map.getMapLayerGroup("MANNVIRKI").setVisibility(true);
	map.getMapLayerGroup("VATNAKERFI").setVisibility(true);
	map.getMapLayerGroup("FRAVEITA").setVisibility(true);
	map.getMapLayer("Hus").setVisibility(true);
	map.getMapLayer("LODIR").setVisibility(true);
	map.getMapLayer("Gotur").setVisibility(true);
	map.getMapLayer("Vegir").setVisibility(true);
			
	map.getMapLayer("Fraveita").setVisibility(false);
	map.getMapLayer("Fraveita_texti").setVisibility(false);
	map.getMapLayer("Teikningar").setVisibility(false);
	
	map.setAutoRefresh(true);
	map.refresh();
}


function Planning()
{
	var map = getMap(); 
	map.setAutoRefresh(false);
	map.getMapLayer("Hus").setVisibility(true);
		
	map.getMapLayerGroup("VEGMANNVIRKI").setVisibility(true);
	map.getMapLayerGroup("MANNVIRKI").setVisibility(true);
	map.getMapLayerGroup("VATNAKERFI").setVisibility(true);
	map.getMapLayer("LODIR").setVisibility(true);
	map.getMapLayer("Gotur").setVisibility(true);
	map.getMapLayer("Vegir").setVisibility(true);
			
	map.getMapLayerGroup("FRAVEITA").setVisibility(false);
	map.getMapLayer("Fraveita").setVisibility(false);
	map.getMapLayer("Fraveita_texti").setVisibility(false);
	map.getMapLayer("Teikningar").setVisibility(false);
	
	map.setAutoRefresh(true);
	map.refresh();
}


function Streets()
{
	var map = getMap();
	var layer = map.getMapLayerGroup("VEGMANNVIRKI");
	
	map.setAutoRefresh(false);
	if (layer == null)
		alert ("layer not found");
	else
	{
		layer.setVisibility(true);
	}

	map.getMapLayerGroup("MANNVIRKI").setVisibility(true);
	map.getMapLayerGroup("VATNAKERFI").setVisibility(true);
	map.getMapLayer("LODIR").setVisibility(true);
	map.getMapLayer("Gotur").setVisibility(true);
	map.getMapLayer("Vegir").setVisibility(true);
	map.getMapLayer("Hus").setVisibility(true);
			
	map.getMapLayerGroup("FRAVEITA").setVisibility(false);
	map.getMapLayer("Fraveita").setVisibility(false);
	map.getMapLayer("Fraveita_texti").setVisibility(false);
	map.getMapLayer("Teikningar").setVisibility(false);

	map.setAutoRefresh(true);
	map.refresh();
}

function Applications()
{
	var map = getMap();
	var layer = map.getMapLayer("LODIR");
	map.setAutoRefresh(false);
	if (layer == null)
		alert ("layer not found");
	else
	{
		layer.setVisibility(true);
	}

	map.getMapLayerGroup("VEGMANNVIRKI").setVisibility(true);
	map.getMapLayerGroup("MANNVIRKI").setVisibility(true);
	map.getMapLayerGroup("VATNAKERFI").setVisibility(true);
	map.getMapLayer("Hus").setVisibility(true);
	map.getMapLayer("Gotur").setVisibility(true);
	map.getMapLayer("Vegir").setVisibility(true);
			
	map.getMapLayerGroup("FRAVEITA").setVisibility(false);
	map.getMapLayer("Fraveita").setVisibility(false);
	map.getMapLayer("Fraveita_texti").setVisibility(false);
	map.getMapLayer("Teikningar").setVisibility(false);

	
	map.setAutoRefresh(true);
	map.refresh();
}

function Services()
{
	var map = getMap();
	map.setAutoRefresh(false);
	
	map.getMapLayerGroup("VEGMANNVIRKI").setVisibility(true);
	map.getMapLayerGroup("MANNVIRKI").setVisibility(true);
	map.getMapLayerGroup("VATNAKERFI").setVisibility(true);
	map.getMapLayer("LODIR").setVisibility(true);
	map.getMapLayer("Hus").setVisibility(true);
	map.getMapLayer("Gotur").setVisibility(true);
	map.getMapLayer("Vegir").setVisibility(true);
		
	map.getMapLayerGroup("FRAVEITA").setVisibility(false);
	map.getMapLayer("Fraveita").setVisibility(false);
	map.getMapLayer("Fraveita_texti").setVisibility(false);
	map.getMapLayer("Teikningar").setVisibility(false);
		
	map.setAutoRefresh(true);
	map.refresh();
}