          function SwithBox(s,a) {
            
            // Hide layers
            for(i=0;i<a;i++){
              if(document.all) {
                document.all['SBox_'+i].style.visibility             = 'hidden';
                document.all['SBox_'+i].style.display                = 'none';
              }
              if(document.getElementById) {
                document.getElementById('SBox_'+i).style.visibility  = 'hidden';
                document.getElementById('SBox_'+i).style.display     = 'none';
              }
              if(document.layers) {
                document.layers['SBox_'+i].style.visibility          = 'hidden';
              }
            }
            
            // Show layer
            if(document.all) {
              document.all[s].style.visibility             = 'visible';
              document.all[s].style.display                = '';
            }
            if(document.getElementById) {
              document.getElementById(s).style.visibility  = 'visible';
              document.getElementById(s).style.display     = '';
            }
            if(document.layers) {
              document.layers[s].style.visibility          = 'visible';
            }    
          
          }
          
          function BoxStyle(a,t) {
            var b=a

            for (i=0;i<t;i++) {
              if(document.all) {
                document.all['MBox_'+i].style.backgroundColor             = '#CBC8A0';
                document.all['MBox_'+i].style.borderBottom                = '1px solid #FFFFFF';
              } else if(document.getElementById) {
                document.getElementById('MBox_'+i).style.backgroundColor  = '#CBC8A0';
                document.getElementById('MBox_'+i).style.borderBottom     = '1px solid #FFFFFF';
              } else if(document.layers) {
                document.layers['MBox_'+i].style.backgroundColor          = '#CBC8A0';
                document.layers['MBox_'+i].style.borderBottom             = '1px solid #FFFFFF';
              }
            }
    
            if(document.all) {
              document.all[b].style.backgroundColor             = '#ede8dc';
              document.all[b].style.borderBottom                = '1px solid #ede8dc';
            } else if(document.getElementById) {
              document.getElementById(b).style.backgroundColor  = '#ede8dc';
              document.getElementById(b).style.borderBottom     = '1px solid #ede8dc';
            } else if(document.layers) {
              document.layers[b].style.backgroundColor          = '#ede8dc';
              document.layers[b].style.borderBottom             = '1px solid #ede8dc';
            }
          }
  
        function MDown(d,t,b) {
  
          var box_id = d

          if(t==1) {
            if(document.all) {
              document.all[box_id].style.backgroundColor             = b;
            } else if(document.getElementById) {
              document.getElementById(box_id).style.backgroundColor  = b;
            } else if(document.layers) {
              document.layers[box_id].style.backgroundColor          = b;
            }
          } else {
            if(document.all) {
              document.all[box_id].style.backgroundColor             = '#D3CEAB';
            } else if(document.getElementById) {
              document.getElementById(box_id).style.backgroundColor  = '#D3CEAB';
            } else if(document.layers) {
              document.layers[box_id].style.backgroundColor          = '#D3CEAB';
            }
          }
        
        }
        
        function Open_MenuBox(a) {

          sMenu  = new Array("Omröstning","Sök i forumet","Födelsedagsbarn")
          var sWidth = new Array
          for(i=0;i<sMenu.length;i++){sWidth[i] = sMenu[i].length+15}
          sSum  = 0
          
          if(sMenu.length==sWidth.length){
          
            for(i=0;i<sWidth.length;i++){sSum=sSum +sWidth[i];}
            oWidth  = (100-sSum);
          
            document.write("<TABLE CELLPADDING=\"3\" CELLSPACING=\"0\" BORDER=\"0\" HEIGHT=\"25\" WIDTH=\"100%\"><TR>");
          
            for(i=0;i<sMenu.length;i++){
            if(i==a){
            document.write("<TD ID=\"MBox_"+i+"\" OnClick=\"BoxStyle(this.id,sMenu.length); SwithBox('SBox_"+i+"',sMenu.length);\" OnMouseUp=\"MDown(this.id,1,this.style.backgroundColor);\" OnMouseDown=\"MDown(this.id,0,this.style.backgroundColor);\" ALIGN=\"center\" WIDTH=\"" + sWidth[i] + "%\" STYLE=\"border-bottom: 1px solid #ede8dc; border-right: 1px solid #FFFFFF; padding: 3px; background-color: #ede8dc; cursor: hand;\"><A HREF=\"java"+"script:SwithBox('SBox_"+i+"',sMenu.length);\">" + sMenu[i] + "</A></TD>");
            }else{
            document.write("<TD ID=\"MBox_"+i+"\" OnClick=\"BoxStyle(this.id,sMenu.length); SwithBox('SBox_"+i+"',sMenu.length);\" OnMouseUp=\"MDown(this.id,1,this.style.backgroundColor);\" OnMouseDown=\"MDown(this.id,0,this.style.backgroundColor);\" ALIGN=\"center\" WIDTH=\"" + sWidth[i] + "%\" STYLE=\"border-bottom: 1px solid #FFFFFF; border-right: 1px solid #FFFFFF; padding: 3px; background-color: #CBC8A0; cursor: hand;\"><A HREF=\"java"+"script:SwithBox('SBox_"+i+"',sMenu.length);\">" + sMenu[i] + "</A></TD>");
            }
            }
          
            document.write("<TD STYLE=\"border-bottom: 1px solid #FFFFFF; padding: 3px; background-color: #FFFFFF;\">&nbsp;</TD>");
            document.write("</TR></TABLE>");
          
          } else {
          
            document.write("<DIV STYLE=\"padding: 5px;\">Ett fel uppstod!</DIV>")
          
          }
        
        }
        
        function Open_MenuBox2(a) {

          sMenu  = new Array("Min Profil","Mina kurser","Mina filer","Mina forumposter","Messa mig")
          var sWidth = new Array
          for(i=0;i<sMenu.length;i++){sWidth[i] = sMenu[i].length+8}
          sSum  = 0
          
          if(sMenu.length==sWidth.length){
          
            for(i=0;i<sWidth.length;i++){sSum=sSum +sWidth[i];}
            oWidth  = (100-sSum);
          
            document.write("<TABLE CELLPADDING=\"3\" CELLSPACING=\"0\" BORDER=\"0\" HEIGHT=\"25\" WIDTH=\"100%\"><TR>");
          
            for(i=0;i<sMenu.length;i++){
            if(i==a){
            document.write("<TD ID=\"MBox_"+i+"\" OnClick=\"BoxStyle(this.id,sMenu.length); SwithBox('SBox_"+i+"',sMenu.length);\" OnMouseUp=\"MDown(this.id,1,this.style.backgroundColor);\" OnMouseDown=\"MDown(this.id,0,this.style.backgroundColor);\" ALIGN=\"center\" WIDTH=\"" + sWidth[i] + "%\" STYLE=\"border-bottom: 1px solid #ede8dc; border-right: 1px solid #FFFFFF; padding: 3px; background-color: #ede8dc; cursor: hand;\"><A HREF=\"java"+"script:SwithBox('SBox_"+i+"',sMenu.length);\">" + sMenu[i] + "</A></TD>");
            }else{
            document.write("<TD ID=\"MBox_"+i+"\" OnClick=\"BoxStyle(this.id,sMenu.length); SwithBox('SBox_"+i+"',sMenu.length);\" OnMouseUp=\"MDown(this.id,1,this.style.backgroundColor);\" OnMouseDown=\"MDown(this.id,0,this.style.backgroundColor);\" ALIGN=\"center\" WIDTH=\"" + sWidth[i] + "%\" STYLE=\"border-bottom: 1px solid #FFFFFF; border-right: 1px solid #FFFFFF; padding: 3px; background-color: #CBC8A0; cursor: hand;\"><A HREF=\"java"+"script:SwithBox('SBox_"+i+"',sMenu.length);\">" + sMenu[i] + "</A></TD>");
            }
            }
          
            document.write("<TD STYLE=\"border-bottom: 1px solid #FFFFFF; padding: 3px; background-color: #FFFFFF;\">&nbsp;</TD>");
            document.write("</TR></TABLE>");
          
          } else {
          
            document.write("<DIV STYLE=\"padding: 5px;\">Ett fel uppstod!</DIV>")
          
          }
        
        }
        
        function Open_MenuBox3(a) {

          sMenu  = new Array("Mest lästa","Senaste","Flitigaste skribenterna","Bäst betyg")
          var sWidth = new Array
          for(i=0;i<sMenu.length;i++){sWidth[i] = sMenu[i].length+5}
          sSum  = 0
          
          if(sMenu.length==sWidth.length){
          
            for(i=0;i<sWidth.length;i++){sSum=sSum +sWidth[i];}
            oWidth  = (100-sSum);
          
            document.write("<TABLE CELLPADDING=\"3\" CELLSPACING=\"0\" BORDER=\"0\" HEIGHT=\"25\" WIDTH=\"100%\"><TR>");
          
            for(i=0;i<sMenu.length;i++){
            if(i==a){
            document.write("<TD ID=\"MBox_"+i+"\" OnClick=\"BoxStyle(this.id,sMenu.length); SwithBox('SBox_"+i+"',sMenu.length);\" OnMouseUp=\"MDown(this.id,1,this.style.backgroundColor);\" OnMouseDown=\"MDown(this.id,0,this.style.backgroundColor);\" ALIGN=\"center\" WIDTH=\"" + sWidth[i] + "%\" STYLE=\"border-bottom: 1px solid #ede8dc; border-right: 1px solid #FFFFFF; padding: 3px; background-color: #ede8dc; cursor: hand;\"><A HREF=\"java"+"script:SwithBox('SBox_"+i+"',sMenu.length);\">" + sMenu[i] + "</A></TD>");
            }else{
            document.write("<TD ID=\"MBox_"+i+"\" OnClick=\"BoxStyle(this.id,sMenu.length); SwithBox('SBox_"+i+"',sMenu.length);\" OnMouseUp=\"MDown(this.id,1,this.style.backgroundColor);\" OnMouseDown=\"MDown(this.id,0,this.style.backgroundColor);\" ALIGN=\"center\" WIDTH=\"" + sWidth[i] + "%\" STYLE=\"border-bottom: 1px solid #FFFFFF; border-right: 1px solid #FFFFFF; padding: 3px; background-color: #CBC8A0; cursor: hand;\"><A HREF=\"java"+"script:SwithBox('SBox_"+i+"',sMenu.length);\">" + sMenu[i] + "</A></TD>");
            }
            }
          
            document.write("<TD STYLE=\"border-bottom: 1px solid #FFFFFF; padding: 3px; background-color: #FFFFFF;\">&nbsp;</TD>");
            document.write("</TR></TABLE>");
          
          } else {
          
            document.write("<DIV STYLE=\"padding: 5px;\">Ett fel uppstod!</DIV>")
          
          }
        
        }
