function show(id){
  document.getElementById(id).style.visibility = 'visible';
}
function hide(id){
  document.getElementById(id).style.visibility = 'hidden';
}
function swapImg(id,src) { 
  document.getElementById(id).src = src;
}
function submitForm(id){
  document.getElementById(id).submit();
}
function targetId(id,d) {
  if(!d) d = document;
  if(d.all) {
    return d.all.item(id);
  } else if (d.layers) {
    if(d[id]) return d[id];
    for(var i=0; i<d.layers.length; i++) {
	  var c = d.layers[i].document;
	  if(c[id]) return c[id];
      if(c.layers[id]) return c.layers[id];
      if(c.layers.length > 0) var n = targetId(id,c);
	  if(n) return n;
    }
  }
}
function getObject(id) {
  var o = targetId(id);
  if(document.layers) {
    o.style = o;
  }
  return o;
}
if(!document.getElementById) document.getElementById = getObject;
var markedRow = new Array();
function setPointer(theRow, thePointerColor, theNormalBgColor){
    var theCells = null;
    if (thePointerColor == '' || typeof(theRow.style) == 'undefined'){
        return false;
    }
    if (typeof(document.getElementsByTagName) != 'undefined'){
        theCells = theRow.getElementsByTagName('td');
    }
    else if (typeof(theRow.cells) != 'undefined'){
        theCells = theRow.cells;
    }else{
        return false;
    }
    var rowCellsCnt  = theCells.length;
    var currentColor = null;
    var newColor     = null;
    if (typeof(window.opera) == 'undefined' && typeof(theCells[0].getAttribute) != 'undefined' && typeof(theCells[0].getAttribute) != 'undefined'){
        currentColor = theCells[0].getAttribute('bgcolor');
        newColor     = (currentColor.toLowerCase() == thePointerColor.toLowerCase())
                     ? theNormalBgColor
                     : thePointerColor;
        for (var c = 0; c < rowCellsCnt; c++){
            theCells[c].setAttribute('bgcolor', newColor, 0);
        }
    }else{
        currentColor = theCells[0].style.backgroundColor;
        newColor     = (currentColor.toLowerCase() == thePointerColor.toLowerCase())
                     ? theNormalBgColor 
                     : thePointerColor;
        for (var c = 0; c < rowCellsCnt; c++){
            theCells[c].style.backgroundColor = newColor;
        }
    }
    return true;
}
