newsitemtext = '#222';
newsitemtexton = '#fff';
newsitembtext = '#222';
newsitembtexton = '#fff';
newsitemctext = '#222';
newsitemctexton = '#fff';
newsitemdtext = '#222';
newsitemdtexton = '#fff';

sectionitems = 14; // number of top level items for nav javascript
sectionnosub1 = 6; // the sections that have no sub by id for ajax menu
sectionnosub2 = 7;
sectionnosub3 = 8;
sectionnosub4 = 9;
sectionnosub5 = 10;
sectionnosub6 = 11;
sectionnosub7 = 12;
sectionnosub8 = 0;
sectionnosub9 = 13;
hidesubnavs = false;

//SAM

if (typeof (Planet) == "undefined") {
   _pla = Planet = {};
}

if (typeof (_pla.DOM) == "undefined") {
   _pla.DOM = {};
}


/* get element */
_pla.DOM.gE = function(e) {

   var t = typeof (e);
   if (t == "undefined")
      return 0;
   else if (t == "string") {
      var re = document.getElementById(e);
      if (!re)
         return 0;
      else if (typeof (re.appendChild) != "undefined")
         return re;
      else
         return 0;
   }
   else if (typeof (e.appendChild) != "undefined")
      return e;
   else
      return 0;
};
/* create element */
_pla.DOM.cE = function(type, attr, cont, html) {
   var ne = document.createElement(type);
   if (!ne)
      return 0;

   for (var a in attr)
      ne[a] = attr[a];

   var t = typeof (cont);

   if (t == "string" && !html)
      ne.appendChild(document.createTextNode(cont));
   else if (t == "string" && html)
      ne.innerHTML = cont;
   else if (t == "object")
      ne.appendChild(cont);

   return ne;
};

addDOMLoadEvent = (function() {
   // create event function stack
   var load_events = [],
        load_timer,
        script,
        done,
        exec,
        old_onload,
        init = function() {
           done = true;

           // kill the timer
           clearInterval(load_timer);

           // execute each function in the stack in the order they were added
           while (exec = load_events.shift())
              exec();

           if (script) script.onreadystatechange = '';
        };

   return function(func) {
      // if the init function was already ran, just run this function now and stop
      if (done) return func();

      if (!load_events[0]) {
         // for Mozilla/Opera9
         if (document.addEventListener)
            document.addEventListener("DOMContentLoaded", init, false);

         // for Internet Explorer
         /*@cc_on@*/
         /*@if (@_win32)
         //document.write("<script id=__ie_onload defer src=//0><\/scr" + "ipt>");
         document.getElementsByTagName("head")[0].appendChild(Planet.DOM.cE("script", { "id": "__ie_onload", "src": "/0", "defer": "defer" }));
         script = document.getElementById("__ie_onload");
         script.onreadystatechange = function() {
            if (this.readyState == "complete")
               init(); // call the onload handler
         };
         /*@end@*/

         // for Safari
         if (/WebKit/i.test(navigator.userAgent)) { // sniff
            load_timer = setInterval(function() {
               if (/loaded|complete/.test(document.readyState))
                  init(); // call the onload handler
            }, 10);
         }

         // for other browsers set the window.onload, but also execute the old window.onload
         old_onload = window.onload;
         window.onload = function() {
            init();
            if (old_onload) old_onload();
         };
      }

      load_events.push(func);
   }
})();

addDOMLoadEvent(function() { init(); });