function Workspace() { this.desktop = $("workspace"); this.loadPanel = function(title,page){ var content = api.get(page); this.createPanel(title,content); } this.createPanel = function(title,content){ var divFrame = CE("div"); var divTitle = CE("div"); var divPanel = CE("DIV"); divFrame.appendChild(divTitle); divFrame.appendChild(divPanel); divTitle.innerText = title; divPanel.innerText = content; this.desktop.appendChild(divFrame); } } var workspace = null;