var activeSub=0;
var SubNum=0;



function highlightButton(s) 
{
	if ("INPUT"==event.srcElement.tagName)
		event.srcElement.className=s
}

function reDo()
{ 
	window.location.reload() 
}

window.onresize = reDo;


//Definierar globala variabler

var timerID = null;
var timerOn = false;
var timecount = 500;
var what = null;
var newbrowser = true;
var check = false;

function init()
{
	if (document.layers) 
	{
	//  alert ("Använder Netscape 4");
		layerRef="document.layers";
	        styleSwitch="";
	        visibleVar="show";
		screenSize = window.innerWidth;
		what ="ns4";
	}
	
	else if(document.all)
	{
	//  alert ("Använder IE");
	        layerRef="document.all";
	        styleSwitch=".style";
	        visibleVar="visible";
		screenSize = document.body.clientWidth + 18;
		what ="ie";
	}
	else if(document.getElementById)
	{
	//  alert ("Använder Netscape 6");
	        layerRef="document.getElementByID";
	        styleSwitch=".style";
	        visibleVar="visible";
		what="moz";
	}
	else
	{
	//alert("Sämre än en 4.0 browser.");
		what="none";
		newbrowser = false;
	}
		  
 
	window.status='a production by downteam';
	check = true;
}

// Turns the layers on and off
function showLayer(layerName)
{
	if(check)
	{
        	if (what =="none")
        	{
        		return;
        	}
	        else if (what == "moz")
	        {
        		document.getElementById(layerName).style.visibility="visible";
        	}
        	else
        	{
                	eval(layerRef+'["'+layerName+'"]'+styleSwitch+'.visibility="visible"');
                }
	}
        else 
        {
        	return;
        }
}

function hideLayer(layerName)
{
	if(check)
	{
        	if (what =="none")
        	{
        		return;
        	}
        	else if (what == "moz")
        	{
        		document.getElementById(layerName).style.visibility="hidden";
        	}
        	else
        	{
                	eval(layerRef+'["'+layerName+'"]'+styleSwitch+'.visibility="hidden"');
		}
        }
	else 
	{
		return;
	}
}


function hideAll()
{
	hideLayer('pil');
	hideLayer('ter');
	hideLayer('res');
	hideLayer('kur');
	hideLayer('rei');
	hideLayer('reg');
	hideLayer('gal');
	hideLayer('pro');
}


function startTime() 
{
	if (timerOn == false) 
	{
		timerID=setTimeout( "hideAll()" , timecount);
		timerOn = true;
	}
}

function stopTime() 
{
	if (timerOn) 
	{
    		clearTimeout(timerID);
                timerID = null;
                timerOn = false;
	}
}




//--------------------------------------------------------------------------------------------------//
function onLoad()
{
	init();
}

<!-- Begin //
function Bilden(filename,winTitle)
{
    var myImage = new Image();
    myImage.src=filename;
    properties='height=10,width=10';
    var imgWindow = window.open('','',properties);

    html = '<html>';
    html += '<head>';
    html += '<title>'+winTitle+'</title>';
    html += '</head>';
    html += '<body topmargin="0" marginheight="0" leftmargin="0" marginwidth="0">';
    html += '<img src="'+myImage.src+'" onLoad="resizeTo(document.bild.width+10,document.bild.height+29);" name="bild">';
    html += '</body>';
    html += '</html>';

    imgWindow.document.write(html);
}
//  End -->
