  var switchMonth = false;
  var onloadRan = false;
  function setButtonBehavior(obj, button_type)
  {
    switch(button_type)
    {
      case 'write':
        obj.onmouseover = function()
        {
          this.src = bttn_write_over;
        }
        obj.onmouseout = function()
        {
          this.src = bttn_write_norm
        }
        obj.onmousedown = function()
        {
          this.src = bttn_write_down
        }
        obj.onmouseup = function()
        {
          this.src = bttn_write_norm
        }
      break;
      case 'close':
        obj.onmouseover = function()
        {
          this.src = bttn_close_over;
        }
        obj.onmouseout = function()
        {
          this.src = bttn_close_norm;
        }
        obj.onmousedown = function()
        {
          this.src = bttn_close_down;
        }
        obj.onmouseup = function()
        {
          this.src = bttn_close_norm;
        }
      break;
      case 'up':
        obj.onmouseover = function()
        {
          this.src = bttn_up_over;
        }
        obj.onmouseout = function()
        {
          this.src = bttn_up_norm;
        }
        obj.onmousedown = function()
        {
          this.src = bttn_up_down;
        }
        obj.onmouseup = function()
        {
          this.src = bttn_up_norm;
        }
      break;
    }
  }
  

    function classSwapping(a,o,c1,c2)
    {
      switch (a){
        case 'swap':
          o.className =! classSwapping('check',o,c1)?o.className.replace(c2,c1):
          o.className.replace(c1,c2);
        break;
        case 'add':
          if(!classSwapping('check',o,c1)){o.className+=o.className?' '+c1:c1;}
        break;
        case 'remove':
          var rep=o.className.match(' '+c1)?' '+c1:c1;
          o.className=o.className.replace(rep,'');
        break;
        case 'check':
          return new RegExp('\\b'+c1+'\\b').test(o.className)
        break;
      }
    }

  function getHTTPRequest()
  {
    var xmlHttp;
    try
    {
      // Firefox, Opera 8.0+, Safari
      xmlHttp=new XMLHttpRequest();
    }
    catch (e)
    {
      // Internet Explorer
      try
      {
        xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
      }
      catch (e)
      {
        try
        {
          xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
        }
        catch (e)
        {
          alert("Your browser does not support AJAX, which is required to use this website.");
          xmlHttp = false;
        }
      }
    }
    return xmlHttp;
  }
function addEventCalendar(parentObj, theYear, theMonth, theDate)
{
  detailLink = 'calendar_day.php';
  EventCalendar = new PhyneasJavascriptEventCalendar("sms", theYear, theMonth, theDate);
  EventCalendar.setShowOtherMonths(false);
  EventCalendar.buildHTMLElement();
  parentObj.appendChild(EventCalendar.getHTMLElement());
}

String.prototype.checkFor2Char = function()
{
  if(this.length < 2)
  {
    return "0" + this;
  }
  else
  {
    return this;
  }
}
/*
function cleanUpPops()
{
  var contentDiv = document.getElementById('content');
  if(contentDiv)
  {
    contentDiv.onmouseover = function()
    {
      if(detailsPopUp)
      {
        if(appended)
        {
          detailsPopUp.parentNode.removeChild(detailsPopUp);
          appended = false;
        }
      }
    }
  }
}
*/
