/* $Id: functions.js,v 1.1 2002/07/25 03:10:29 planetman Exp $ */


/**
 * Sets/unsets the pointer in browse mode
 *
 * @param   object   the table row
 * @param   object   the color to use for this row
 *
 * @return  boolean  whether pointer is set or not
 */
function setPointer(theRow, thePointerColor)
{
    if (thePointerColor == '' || typeof(theRow.style) == 'undefined') {
        return false;
    }
    if (typeof(document.getElementsByTagName) != 'undefined') {
        var theCells = theRow.getElementsByTagName('td');
    }
    else if (typeof(theRow.cells) != 'undefined') {
        var theCells = theRow.cells;
    }
    else {
        return false;
    }

    var rowCellsCnt  = theCells.length;
    for (var c = 0; c < rowCellsCnt; c++) {
        theCells[c].style.backgroundColor = thePointerColor;
    }

    return true;
} // end of the 'setPointer()' function


function gothere(url_value) {
  var selected_value = url_value.options[url_value.selectedIndex].value;
  if (selected_value == "nowhere"){
    url_value.selectedIndex = 0;
    return;
  }
  if (selected_value != "nowhere") {
    if (selected_value.indexOf("frame") != -1) {
      window.open(selected_value, '_top');
    }
    else {
      if (selected_value.indexOf("frame") != -1) {
        window.open(selected_value, '_top');
      }
      else {
        location.href=selected_value;
      }
    }
  }
}

function searchthere(url_value) {
  var selected_value = url_value.options[url_value.selectedIndex].value;
  if (selected_value == "nowhere"){
    url_value.selectedIndex = 0;
    return;
  }
  if (selected_value != "nowhere") {
    if (selected_value.indexOf("frame") != -1) {
      window.open(selected_value, '_top');
    }
    else {
      if (selected_value.indexOf("frame") != -1) {
        window.open(selected_value, '_top');
      }
      else {
        location.href=selected_value;
      }
    }
  }
}


