// JavaScript Document
try
  {
  MenuWidth = "120";
  }
catch(err){handleerror(err, 'MenuWidth')}
try
  {
  menus = '<a href="http://s87607151.onlinehome.us/chamber" target="_blank">Map</a>';
  menus += '<a href="http://s87607151.onlinehome.us/v2" target="_blank">Version 2</a>';
//  menus += '<a onclick="getdata('+"'http://s87607151.onlinehome.us/public/php/grid.php','&file=http://s87607151.onlinehome.us/v2/data/grid1','showgrid','Fetching Grid'"+')">Gridmark</a>';
  menus += '<a href="http://s87607151.onlinehome.us/index2.html" target="_blank">Resume</a>';
  menus += '<a href="http://s87607151.onlinehome.us/v2" target="_blank">Projects</a>';
  menus += '<a href="http://s87607151.onlinehome.us/v2" target="_blank">Products</a>';
  menus += '<a href="http://s87607151.onlinehome.us/v2" target="_blank">Contact</a>';
  menus += '<a href="skype:davidryman?call"><img src="http://download.skype.com/share/skypebuttons/buttons/call_blue_transparent_70x23.png" style="border: none;" width="70" height="23" alt="Skype Me™!" /></a>';
  menus += '<a onclick="clearerror('+"'dataarea'"+')>Clear Screen</a>';
  }
catch(err){handleerror(err, 'menu')}
// insert retrieved HTML into center panel
function showgrid()
    {
    staterep();
    if (http.readyState == 4)
        {
        if (http.status == 200)
            {
            data = http.responseText;
            if (data != "")
                {
                document.getElementById('dataarea').innerHTML = data;
                }
            }
        }
    }
function toggle(what,xwidth)
  {
  try
    {
    x=document.getElementById(what);
    if (x.style.width == "10px")
      {
      x.style.width = "150px";
      }
    else
      {
      x.style.width = "10px";
      }
    }
  catch(err){handleerror(err, 'toggle')}
  }
function show(what)
  {
  try
    {
    document.getElementById(what).style.display = "block";
    }
  catch(err){handleerror(err, 'show')}
  }
function hide(what)
  {
  try
    {
    document.getElementById(what).style.display = "none";
    }
  catch(err){handleerror(err, 'hide')}
  }
function hideafter(what,time)
  {
  try
    {
    arg = "hide('"+what+"')";
    setTimeout(arg,time);
    }
  catch(err){handleerror(err, 'show')}
  }

function handleerror(err, where)
  {
//  document.getElementById('ajaxstate').innerHTML += where + '-' + err;
  alert(err+"-"+where);
  }
function menu()
  {
  try
    {
    x=document.getElementById('menu');
    if (x.style.width == MenuWidth+"px")
      {
      x.innerHTML = "";
      x.style.width = "0px";
      }
    else
      {
      x.innerHTML = menus;
      x.style.width = MenuWidth+"px";
      }
    }
  catch(err){handleerror(err,'menu')}
  }
