/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Gnextop                                                    *
* A PSP Portal by BlazeByte (http://blazebyte.org/gnextop)   *
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *

Panel API
=========

This creates and operates the panel (Windows calls it a taskbar)


Functions:
---------

Panel.Write (integer Panel)
- Writes the Panel (called on boot)
- Panel is not currently used, but may be used to allow multiple panels.

Panel.Tray.UpdateConnectionIcon () {
- Update the network connection icon in the tray

*/

var Panel = new Object();
var Panel = new Array();

Panel.Write = function(intPanel) {
  document.write("<div id=\"bottompanelbg\"></div><div id=\"bottompanel\">"+
      "<div id=\"applet-menu\"><a href=\"javascript:Menu.Show('main',0,-20);Window.Minimize(-1);\" style=\"position:relative;\"><img id=\"mainMenuButton\" src='../themes/" + Gnextop.ThemeDir + "/images/icons/menu/menu-button.png' /></a></div>"+
      "<div id=\"applet-taskbar\">");
  for (var i = 0 ; i < Window.length ; i++ ) {
    document.write("<div id=\"windowTab"+i+"\" class=\"windowTab\" onclick='Window.Restore("+i+");' style=\"left:"+(119*i)+"px;\"><img src='' class='windowTabIcon' id='windowTabIcon" + i + "' align='left' /><div id='windowTabTitle"+i+"'>Loading...</div></div>");
  }
  document.write("</div>"+
      "<div id=\"applet-tray\"><img id='traynet' src='"+Gnextop.Root+"themes/"+Gnextop.ThemeDir+"/images/icons/tray/net"+((Gnextop.Connected)?"on":"off")+".png"+"' /></div>"+
      "<div id=\"applet-clock\">00:00</div>"+
    "</div>");
}

Panel.Tray = new Object();

Panel.Tray.UpdateConnectionIcon = function() {
  document.getElementById("traynet").src=Gnextop.Root+"themes/"+Gnextop.ThemeDir+"/images/icons/tray/net"+((Gnextop.Connected)?"on":"off")+".png";
}