function $(s){
	return document.getElementById(s);
}

function swapColor(count, action, oldColor) {
    if (action == 1){ 
        document.getElementById("table" + count).style.background = "#F2F2F2";
    } else { 
        document.getElementById("table" + count).style.background = oldColor;
    }
}

function redir(url){
    window.location = url;
}

function loadListMenu(valor, campo)
{
   for (var i=0; i<$(campo).length; i++)
   {
      if ($(campo)[i].value == valor){
         $(campo).selectedIndex = i; break;
      }
   }
}

function setFocus(id) {
  if ($(id).value == null || $(id).value == "") { 
    $(id).focus();
  }
}
