
function Toolbar(Naam,Titel,Plaatsing,TekstKleur,AgKleur,Geopend,Breedte,Hoogte){
var ModulesArray = new Array()
this.ToolbarName = Naam
this.Caption = Titel
this.Align = Plaatsing
this.Modules = ModulesArray
this.FontColor = TekstKleur
this.BgColor = AgKleur
this.CurrentlyOpen = Geopend
this.Width = Breedte
this.Height = Hoogte}

function Module(Naam,Inhoudnaam,Hoofding,Inhoud,AgKleur,TekstKleur,Plaatsing,HoofdAgKleur,HoofdTekstKleur){
this.ModuleName = Naam
this.ContentName = Inhoudnaam
this.HeaderCaption = Hoofding
this.Content = Inhoud	
this.BgColor = AgKleur
this.FontColor = TekstKleur
this.Align = Plaatsing
this.HeaderBgColor = HoofdAgKleur	
this.HeaderFontColor = HoofdTekstKleur}

function OpenModule(Inhoudnaam, iToolbar){
try{
CloseModule(menubalk[iToolbar].CurrentlyOpen)
if(document.all){eval(Inhoudnaam+".style.display = ''")}
else if(document.getElementById){document.getElementById(Inhoudnaam).style.display = ""}
menubalk[iToolbar].CurrentlyOpen = Inhoudnaam}
catch(e){alert(e.description);alert("Open Module Fout")}	
}

function CloseModule(Inhoudnaam){
try{
if(document.all){eval(Inhoudnaam+".style.display = 'none'")}
else if(document.getElementById){document.getElementById(Inhoudnaam).style.display = "none"}}
catch(e){alert(e.description);alert("Gesloten Module Fout")}
}

function MaakNavigatieBalk(){
var sStyleDisplay = ""
for(var x = 0 ; x < menubalk.length ; x++){
document.write("<TABLE BORDER=1 style='HEIGHT:" + menubalk[x].Height + ";width:" + menubalk[x].Width + "' >")
document.write("<TR>")
document.write("<TD style='vertical-align:top;text-align:" + menubalk[x].Align + ";color:" + menubalk[x].FontColor +";Background:" + menubalk[x].BgColor+ "'>")
document.write(menubalk[x].Caption)
for(var i = 0 ; i < menubalk[x].Modules.length ; i++ ){
document.write("<DIV id='" + menubalk[x].Modules[i].ModuleName + "'>")
document.write("<BUTTON style='Width:" + menubalk[x].Width + ";Background:" + menubalk[x].Modules[i].HeaderBgColor+ ";color:" + menubalk[x].Modules[i].HeaderFontColor+ ";'  onclick=OpenModule('" + menubalk[x].Modules[i].ContentName  + "'," + x + ") id=button1 name=button1>" + menubalk[x].Modules[i].HeaderCaption + "</BUTTON>")
if(menubalk[x].CurrentlyOpen != menubalk[x].Modules[i].ContentName){
sStyleDisplay = "Display:None"
if(document.all){sStyleDisplay = "Display:None"}
else if(document.getElementById){sStyleDisplay = "Display:none"}}
else{sStyleDisplay = ""}
document.write("<DIV id='" + menubalk[x].Modules[i].ContentName + "' style='width:" + menubalk[x].Width + ";" + sStyleDisplay + ";Background:" + menubalk[x].Modules[i].BgColor + ";color:" + menubalk[x].Modules[i].FontColor + ";text-align:" + menubalk[x].Modules[i].Align + "'>")
document.write(menubalk[x].Modules[i].Content)
document.write("</DIV>")
document.write("</DIV>")}
document.write("</TD>")
document.write("</TR>")
document.write("</TABLE>")}
}

//HEIGHT:" + menubalk[x].Height + ";