var eCell;

function changeCursor(mode) {
  eCell = window.event.srcElement;
  while (eCell.tagName.toLowerCase() != "td") eCell = eCell.parentElement;
  if (!eCell.id) return(false);
  if (mode == "on") {
    document.all[eCell.id].style.cursor = "hand";
    document.all[eCell.id].style.color = "#9ca2c6";
  }
  if (mode == "off") {
    document.all[eCell.id].style.cursor = "default";
    document.all[eCell.id].style.color = "#2d345e";
  }  
  window.event.cancelBubble;
}
  function selectColumner(name,value) {
    url = "" + location.href
    namePos = url.indexOf(name+ "=")
    if (namePos > -1) {
      urlEnd = url.substr(namePos)
      nextNamePos = urlEnd.indexOf("&")
      nextUrl = url.substr(0,namePos) + name + "=" + value
      if (nextNamePos == -1)
        location.href = nextUrl
      else
        location.href = nextUrl + urlEnd.substr(nextNamePos)
    }
    else if (url.indexOf("?") > -1) 
      location.href = url + "&" + name + "=" + value
    else
      location.href = url + "?"+ name + "=" + value
  }

function changeRow() {
  if (!eCell.id) return(false);
  pos = eCell.id.search("_");
  s = eCell.id.substr(0,pos);
  selectColumner("row",s)
  window.event.cancelBubble;
}
