var fntsz = 12;

function zoom ()
{
   var elem = document.getElementById ("mainContent");
   if (elem)
   {
   fntsz += 2;
   if (fntsz > 36) {fntsz = 36;}
   elem.style.fontSize = fntsz + "pt";
   }   
   elem = null;
}

function shrink ()
{
   var elem = document.getElementById ("mainContent");
   if (elem)
   {
   fntsz -= 2;
   if (fntsz < 6) {fntsz = 6;}
   elem.style.fontSize = fntsz + "pt";
   }   
   elem = null;
}

function subscriberss ()
{
      window.location.href = "http://news.palmbeach.k12.fl.us/edw/feed/atom/";
      return false;
}

function itertrav (firstnd)
{
   this.firstnode = firstnd;
   this.currentnode = firstnd;
}

itertrav.prototype.getnode = function ()
{
   return (this.currentnode);
}

itertrav.prototype.first = function (firstnd)
{
   if (firstnd)
   {
      this.firstnode = firstnd;
      this.currentnode = firstnd;
   }
   return (firstnd);
}

itertrav.prototype.next = function (node)
{
   if (node != null)
   {
      if ( node.hasChildNodes()) 
      {
        node = node.firstChild;         
      }
      else
      {
         while (node.nextSibling==null && node != this.firstnode)
         {
            node=node.parentNode;
         }
         if (node != this.firstnode)
            node = node.nextSibling;
      }
   }
   if (node == this.firstnode)
   {
      node= null;
   }
   this.currentnode = node;
   return (node);   
}

function tablestripe (id, colr)
{
   var elem = document.getElementById(id);
   var it = new itertrav (elem);
   var cnt = 0;
   for (var nd = it.first (elem); nd != null ; nd = it.next (nd))
   {
      if (nd.nodeType == 1)
      {
         var str = nd.nodeName;
         if (str == 'TR')
         {
            cnt++;
            if ((cnt % 2) == 0)
            {               
               nd.className = "tablestripe";
               nd.style.backgroundColor = colr;
            }
         }
         if (str == 'TD')
         {
            if ((cnt % 2) == 0)
            {               
               nd.className = "tablestripe";
               nd.style.backgroundColor = colr;
            }
         }
      }
   }
   it = null;
   elem = null;
}   

