
/*****************************
* CHECKLIST
-	 Logo
		> Should be placed under the /img directory
		> Name should be of the form [client].jpg (yes - that means jpeg)
		> Dimensions of the logo should be 110x44 pixels - no more, no less, no way.
* REQUIRED VARS
 -	Start location
		start_lon
		start_lat
		start_zoom (relative to client_scales array)
 - 	Boolean - Tells the map whether to display these common layers or not
		doVegir
		doOrnefni
		doSveitabaeir
		doGotuheiti
		doHusnumer
- 	Array of OpenLayers.Layer objects
		client_layers - layers that are specific to this client
/******************************
 * OPTIONAL VARS
-	Array of Integers
		client_scales - defaults to all scales
		All scales reference:[1700000,1000000,500000,250000,100000,50000,25000,10000,5000,2000,1000,500,250]
-	AreaJumpersclientWFS
		Implement areajumper for client - defaults to Nothing
- 	Sveitarfelagsnumer
		For the Search to function locally - defaults to the whole of Iceland

******************************/
//This var is set in common.js as false - set to true if you wish to be able to display schematics
hasTeikningar = true;
var panBounds = new OpenLayers.Bounds(34535,423665,359000,434255);
var SveitarfelagsNumer = 3000;
var start_lon = 351528;
var start_lat = 427650; 
var start_zoom =2;
var client_scales = [50000.0,25000.0,10000.0,5000.0,2000.0,1000.0,500.0,250.0];
/********************************
* Switches for common layers:
********************************/
var doSvMaski = "3000";
var doVegir = false;
var doOrnefni = false;
var doSveitabaeir = true;
var doGotuheiti = true;
var doHusnumer = true;
var doPOI= true;
var doWFS = false;

var clientNameNefni = "Akranes";
var clientNameThol = "Akranes";
var clientNameThagu = "Akranesi";
var clientNameEignar = "Akraness";
/********************************
* Layers particular to client - layers that are potentially common to all clients are defined in ../common.js
********************************/
	
	var client_layers = [];
		/*client_layers.push(new OpenLayers.Layer.WMS("Götukort",
						["http://tc0.loftmyndir.is/tc/tilecache.py",
						"http://tc1.loftmyndir.is/tc/tilecache.py",
						"http://tc2.loftmyndir.is/tc/tilecache.py",
						"http://tc3.loftmyndir.is/tc/tilecache.py"],
					{layers: 'akranes_gotukort',format:'image/png', transparent: true},
					{'isBaseLayer': true, attribution: '©Loftmyndir ehf.<small> Allur réttur áskilinn</small>', transitionEffect:'resize'}			
		));*/

		
		
	var akranes_fasteignir_gotur = new OpenLayers.Layer.WMS("Fasteignir og götur",
			"http://212.30.228.18/geoserver2/wms",
			{layers: 'sveitarfelog:akranes_lodir,sveitarfelog:akranes_hus,sveitarfelog:akranes_gotur',format:'image/jpeg', transparent: true},
			{ singleTile:true,displayInLayerSwitcher:true, isBaseLayer: false, unsupportedBrowsers: []}
			);
	client_layers.push(akranes_fasteignir_gotur);		
	/*
	var akranes_gotur = new OpenLayers.Layer.WMS("Götur",
			"http://212.30.228.18/geoserver2/wms",
			{layers: 'sveitarfelog:akranes_gotur',format:'image/jpeg', transparent: true},
			{ singleTile:true,displayInLayerSwitcher:true, isBaseLayer: false, unsupportedBrowsers: []}
			);
	client_layers.push(akranes_gotur);			
		
	var akranes_lodir = new OpenLayers.Layer.WMS("Lóđir",
			"http://212.30.228.18/geoserver2/wms",
			{layers: 'sveitarfelog:akranes_lodir',format:'image/jpeg', transparent: true},
			{ singleTile:true,displayInLayerSwitcher:true, isBaseLayer: false, unsupportedBrowsers: []}
			);
	client_layers.push(akranes_lodir);		

	var akranes_hus = new OpenLayers.Layer.WMS("Hús",
			"http://212.30.228.18/geoserver2/wms",
			{layers: 'sveitarfelog:akranes_hus',format:'image/jpeg', transparent: true},
			{ singleTile:true,displayInLayerSwitcher:true, isBaseLayer: false, unsupportedBrowsers: []}
			);
	client_layers.push(akranes_hus);*/
		
	var akranes_lmi_ornefni = new OpenLayers.Layer.WMS.Untiled( "Örnefni","http://atlas.lmi.is/arcgis/services/data/is50v_imageanno/MapServer/WMSServer?service=WMS",
				{layers: "1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129",styles:'',format:'image/png',transparent: true},			  
				 {'displayInLayerSwitcher':true,'isBaseLayer':false,'visibility':false,attribution:"Örnefni frá Landmćlingum Íslands"}); 
	client_layers.push(akranes_lmi_ornefni); 
			
	
	
/********************************
* Areajumpers - shortcuts to notable areas
********************************/
//jumparr[AreaLabel,lon,lat,zoom]
jumpArr = []
//jumpArr.push(["SELFOSS",   401919,382350,4]);
//jumpArr.push(["STOKKSEYRI",398415,371850,5]);
//jumpArr.push(["EYRARBAKKI",394020,375250,5]);


var areaJumperHTML = "";//Appended to HTML later on
for(i=0;i<jumpArr.length;i++)
{
	areaJumperHTML+='<a onclick="javascript:zoomTo('+jumpArr[i][1]+', '+jumpArr[i][2]+', '+jumpArr[i][3]+');" href="#">'+jumpArr[i][0]+'</a>';
	if(i!=jumpArr.length-1)
		areaJumperHTML+='<font color="#CCCCCC">&nbsp;&nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;</font>';
}

function clientConfig()
{
	// Insert code here
	akranes_fasteignir_gotur.setVisibility(false);
}

function mapLayerChangedClient(event)
{
	// Insert code here
}
function clientWFS()
{
	// Insert code here
}