﻿function hiLiteOn(imgName) {
	if (document.images) {
		hiLiteImage = eval(imgName + "On.src")
		document [imgName].src = hiLiteImage
		}
	}
	
function hiLiteOff(imgName) {
	if (document.images) {
		originalImage = eval(imgName + "Off.src")
		document [imgName].src = originalImage
		}
	}
	
if(document.images) {
listaOn = new Image()
listaOn.src = "/images/lista_green_on.gif"
listaOff = new Image()
listaOff.src = "/images/lista_green.gif"

kartaOn = new Image()
kartaOn.src = "/images/karta_green_on.gif"
kartaOff = new Image()
kartaOff.src = "/images/karta_green.gif"

resanOn = new Image()
resanOn.src = "/images/resan_green_on.gif"
resanOff = new Image()
resanOff.src = "/images/resan_green.gif"

miljoOn = new Image()
miljoOn.src = "/images/miljo_green_on.gif"
miljoOff = new Image()
miljoOff.src = "/images/miljo_green.gif"

infrastrukOn = new Image()
infrastrukOn.src = "/images/infrastruk_green_on.gif"
infrastrukOff = new Image()
infrastrukOff.src = "/images/infrastruk_green.gif"

malOn = new Image()
malOn.src = "/images/mal_green_on.gif"
malOff = new Image()
malOff.src = "/images/mal_green.gif"

natverkOn = new Image()
natverkOn.src = "/images/natverk_green_on.gif"
natverkOff = new Image()
natverkOff.src = "/images/natverk_green.gif"

tidtabellOn = new Image()
tidtabellOn.src = "/images/tidtabell_green_on.gif"
tidtabellOff = new Image()
tidtabellOff.src = "/images/tidtabell_green.gif"

fraga1On = new Image()
fraga1On.src = "/images/tidtabell_green_on.gif"
fraga1Off = new Image()
fraga1Off.src = "/images/tidtabell_green.gif"
}
var TopActivecolor = "D99F3D"
var TopDeActivecolor = "CDCDCD"
var LastLayerLinkID = null


// ONLOAD LAYER FUNCTION START

	//showSectionAndLink
	
	function showSectionAndLink(layerName, section, linkID) {

	ID = section
	colorByID(ID, TopActivecolor)
	
		if (linkID.length > 1) {
		showLayer(layerName)
		colorByID(linkID, TopActivecolor)
		}
	}
	// OLD
	//function showSectionAndCar(section, car) {

	//ID = section
	//colorByID(ID, TopActivecolor)
	
		//if (car.length > 1) {
	//	showLayer('cars')
		//colorByID(car, TopActivecolor)
	//	}
	//}


// ONLOAD LAYER FUNCTION START


// ColorByID FUNCTION START

	function colorByID(ID, color){
		if(document.getElementById){
			document.getElementById(''+ID+'').style.color = color
		}else if(document.all){
			eval(layerRef+'["'+ID+'"]'+styleSwitch+'.color="'+color+'"');

		}	
	}
// ColorByID FUNCTION End

// flipColorByLayer FUNCTION START

	function flipcolorLayer(ID, layerName){
		if(document.getElementById){
				if (eval(layerRef+'["'+layerName+'"]'+styleSwitch+'.visibility == visibleVar')){
					colorByID(ID, TopActivecolor)
					// Check for last hilighted layer link START
					if (ID != LastLayerLinkID && LastLayerLinkID != null){
					colorByID(LastLayerLinkID, TopDeActivecolor)
					}
					// Check for last hilighted layer link END
					LastLayerLinkID = ID
				}else{
					colorByID(ID, TopDeActivecolor)
				}
		}
	}
// flipColorByLayer FUNCTION End
function openMeMail() {
window.open('/popupMail.aspx','2','menubar=no,scrollbars=1,status=no,resizable=no,width=400,height=625');
}


var _gaq = _gaq || [];

_gaq.push(
            ['_setAccount', 'UA-11508566-2'],
            ['_trackPageview']
);
(function () {
    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();

