function move(element, rate) {
  // calculate the new position and set it
  newPos = 140 - (rate * 14);
  document.getElementById(element).style.backgroundPosition = "-" + newPos + "px 0";
  
  // set the font color for the links -- can be simplified into a single loop, maybe later
  for(i=1; i<rate; i++)
  {
    document.getElementById(element+ "-link-" + i).style.color = "green";
    // clear the class name in case it's left over
    document.getElementById(element+ "-link-" + i).className = "";
  }
  for(i=rate+1; i<=10; i++)
  {
    document.getElementById(element+ "-link-" + i).style.color = "#666";
    // clear the class name in case it's left over
    document.getElementById(element+ "-link-" + i).className = "";
  }
  
  // set the class for the current link -- something's weird with the color, check it out later
  document.getElementById(element+ "-link-" + rate).className = "current";
  document.getElementById(element+ "-link-" + rate).style.color = "#fff";
  
  // update the rating in the span
  if(document.getElementById(element + "-span"))
  {
    document.getElementById(element + "-span").innerHTML = rate;
  }
  
  // update the hidden elements
  inputEl = element.substr(5);
  if(document.getElementById(inputEl))
    document.getElementById(inputEl).value = rate;
}