  
menu_status = new Array(); 


function showHideL(theid){
    if (document.getElementById) {
    
	
		var switch_id = document.getElementById(theid);
	
		if(menu_status[theid] != 'show') {
        switch_id.className = 'show';
        menu_status[theid] = 'show';
        } else {
		switch_id.className = 'hide';
        menu_status[theid] = 'hide';
		}
		
		
		var aObj=document.getElementsByName('headmenu');
		var i=aObj.length;
		
		for (z=1;z<=i;z++)
		{
			var x = document.getElementById('mymenu'+z);
			if (theid != 'mymenu'+z) {
			x.className = 'hide';
			menu_status['mymenu'+z] = 'hide';
			}
		}


    }
}


	
	
function showHide(theid){
    if (document.getElementById) {
    var switch_id = document.getElementById(theid);
	
        if(menu_status[theid] != 'show') {
           switch_id.className = 'show';
           menu_status[theid] = 'show';
        }else{
		   switch_id.className = 'hide';
           menu_status[theid] = 'hide';
        }
    }
}

function showHide2(theid){
    if (document.getElementById) {
    var switch_id = document.getElementById(theid);
	
        if(menu_status[theid] != 'hide') {
           switch_id.className = 'hide';
           menu_status[theid] = 'hide';
        }else{
		   switch_id.className = 'show';
           menu_status[theid] = 'show';
        }
    }
}



function MM_showHideLayers() { //v9.0
  var i,p,v,obj,args=MM_showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) 
  with (document) if (getElementById && ((obj=getElementById(args[i]))!=null)) { v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v=='hide')?'hidden':v; }
    obj.visibility=v; }
}



function ChangeBG(theid) {
        document.getElementById(theid).style.backgroundColor = "#bdd9ed";
}

function ChangeBG2(theid) {
        document.getElementById(theid).style.backgroundColor = "";
}


function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}


function ChangeImage(x)
{
document.getElementById("bilden").src = "db/upload/referensobjekt/"+x;
}

function ChangeImage2(n,x)
{
document.getElementById("bild"+n).src = "db/upload/nyheter/"+x;
}

function ChangeImage3(x)
{
document.getElementById("bilden").src = "db/upload/produkter/"+x;
}

function ChangeImage4(x)
{
document.getElementById("bilden").src = "db/upload/ranaverken/"+x;
}

function ChangeImage5(x)
{
document.getElementById("bilden").src = "db/upload/huvudkategorier/"+x;
}


function ChangeText(x)
{
document.getElementById("bildtext").innerHTML = x ;
}

function ChangeText2(n,x)
{
document.getElementById("bildtext"+n).innerHTML = x ;
}


