﻿// JScript File


function mouseover(id)
{

document.getElementById(id).style.color = "white";
document.getElementById(id).style.borderBottomColor = "#FE5B00";

}

function mouseout(id)
{
document.getElementById(id).style.color = 'crimson';
document.getElementById(id).style.borderBottomColor = '#FEC600';

}

function mouseclick(id)
{
recolor_menuer();
fix(id);
show_table = id + "_table";         
collapse_undermenuer();
collapse_content();
if (document.getElementById(show_table).style.display == 'block')
{
document.getElementById(show_table).style.display = 'none';
}
else
{
document.getElementById(show_table).style.display = 'block';
}
}


function collapse_undermenuer()
{
 undermenuer = getElementsByClassName(document.all.menu_table, "table", "undermenu");
 for (xx = 0;xx<undermenuer.length;xx++)  
 {
  undermenuer[xx].style.display = 'none';
 }
} 


function select(id)
{     
collapse_content();    
collapse_undermenuer(); 
recolor_menuer();
fix(id);
id = id.replace("menu","content");
document.getElementById(id).style.display = "block";
}

function collapse_content()
{
 content = getElementsByClassName(document, "div", "div_content");
 for (xx = 0;xx<content.length;xx++)  
 {
  content[xx].style.display = 'none';
}}

function select_x(id)
{
recolor_menuer();
fix(id);
id = id.replace("menu","content");
collapse_content();
document.getElementById(id).style.display = "block";
}

function tjek_upload()
{        
collapse_content();      
if (document.all.Contents1_hidUpload.innerText != '')
{select_x('menu_administration_indhold')}  
if (document.all.Contents1_lblBilledUploaded.innerText != '')
{select_x('menu_billedarkiv')}  
}

function start()
{        
 collapse_content();
 recolor_menuer();
 collapse_undermenuer();
}

function recolor_menuer()
{
 undermenuer = getElementsByClassName(document.all.menu_table, "td", "*");
 for (xx = 0;xx<undermenuer.length;xx++)  
 {
 undermenuer[xx].style.fontWeight = 'normal';
 // undermenuer[xx].style.backgroundColor = "#fec600";
 // undermenuer[xx].style.color = "#fe5b00";
 }
} 

function fix(id)
{   
document.getElementById(id).style.fontWeight = 'bold';
// document.getElementById(id).style.backgroundColor = "#fe5b00";
// document.getElementById(id).style.color = "#fec600";
}
