// FÖRLADDAR BILDER FÖR HOVERFUNKTION TRIGGAS FRÅN BODY - START-->
function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}
// FÖRLADDAR BILDER FÖR HOVERFUNKTION TRIGGAS FRÅN BODY - SLUT ->

// FIXAR DIV HOVERFUNKTION FÖR SOCIAL BOOKMARKS DIV - START-->
function showLayer(layerName, shadowLayerName)
        {
            if (document.getElementById) // Netscape 6 and IE 5+
            {
                var targetElement = document.getElementById(layerName);
                var shadowElement = document.getElementById(shadowLayerName);
                targetElement.style.top = shadowElement.style.top;
                targetElement.style.visibility = 'visible';
            }
        }


        function hideLayer(layerName)
        {
            if (document.getElementById) 
            {
                var targetElement = document.getElementById(layerName);
                targetElement.style.visibility = 'hidden';
            }
        }
// FIXAR DIV HOVERFUNKTION FÖR SOCIAL BOOKMARKS - SLUT ->

//  COUNTDOWN - START-->
var _countDowncontainer=0;
var _currentSeconds=0;

function ActivateCountDown(strContainerID, initialValue) {
	_countDowncontainer = document.getElementById(strContainerID);
	
	if (!_countDowncontainer) {
		alert("count down error: container does not exist: "+strContainerID+
			"\nmake sure html element with this ID exists");
		return;
	}
	
	SetCountdownText(initialValue);
	window.setTimeout("CountDownTick()", 1000);
}

function CountDownTick() {
	if (_currentSeconds <= 0) {
		alert("Du skickas nu till startsidan för ALLT OM HÄSTSPORT - http://hastsport.klubbar.net");
		return;
	}
	
	SetCountdownText(_currentSeconds-1);
	window.setTimeout("CountDownTick()", 1000);
}

function SetCountdownText(seconds) {
	//store:
	_currentSeconds = seconds;

	//build text:
	var strText = seconds;
	
	//apply:
	_countDowncontainer.innerHTML = strText;
}
//  COUNTDOWN - SLUT-->
