function translateTo(language)
{
  location.href = location.pathname + "#mstto=" + language;
  location.reload();

  return false;
}

function shiftIfTranslated(newattrs)
{
  if(getCookie("mstmode") && getCookie("mstmode") != "manual" ||
      String(document.location).indexOf("#mstto=") > -1)
  {
    //alert("i've had it with shifting");
    for(var i=0; i<newattrs.length; i+=2)
    {
      var property = newattrs[i].split(".");
      var e = document.getElementById(property[0]);
      if(!e) e = document.getElementsByTagName(property[0])[0];
      e.style[property[1]] = newattrs[i+1];
    }
  }
}