var lastx=0;

var userAgent = navigator.userAgent.toLowerCase();
var wb_opera  = (userAgent.indexOf('opera') != -1);
var wb_ie     = ((userAgent.indexOf('msie') != -1) && (!wb_opera));
var wb_ns     = ((userAgent.indexOf('compatible') == -1) && (userAgent.indexOf('mozilla') != -1) && (!wb_opera));
var wb_DOM    = '';

if (document.getElementById) wb_DOM = "std"; else 
if (document.all) wb_DOM = "ie4"; else 
if (document.layers) wb_DOM = "ns4";

function gob(a)
{
  switch (wb_DOM)
  {
    case "std":
      obj = document.getElementById(a);
      break;
    case "ie4":
      obj = document.all[a];
      break;
    case "ns4":
      obj = document.layers[a];
      break;
  }
  return obj;
}



function tog(e)
{
  if (obj = gob(e))
  {
    if (obj.style.display == "none")
      obj.style.display = "";
    else
      obj.style.display = "none";
  }
  return obj;
}


function crin(a)
{
  gob(a).bgColor='#6CB3CA';
//eval("document.all."+a+".bgColor='#6CB3CA'");
}

function crout(a)
{
  gob(a).bgColor='';
//eval("document.all."+a+".bgColor=''");
}

function chx(color)
{
  var  el=event.srcElement;
  if (color!=lastx){
  lastx=el.style.backgroundColor;
  //el.style.backgroundColor=color;
  el.style.backgroundColor=document.bgColor;
  }
  else
  {
  el.style.backgroundColor=lastx;
  lastx=1;
  }
}


