// JAVASCRIPT LIBRARY
var bgx=185;
var bg=null;
try{document.execCommand("BackgroundImageCache",false,true)}catch(e) {} 
window.onload=function(){setEvents();}
function randomizeImage()
{
  var r=Math.floor(Math.random()*6+1);
  bg.className="randomBG"+r;
}
function setEvents() {
  if (bg==null) bg=document.getElementById("branding");
  bg.onmouseover=function(){startMoving();}
  bg.onmouseout=function(){stopMoving();}
  randomizeImage();
}
function moveImage() {
  bg.style.backgroundPosition=""+bgx+"px 1.35em";
  bgx=bgx+1;
}
var myInt=null;
function startMoving(){  myInt=window.setInterval("moveImage()", 40);}
function stopMoving(){  if (myInt) window.clearInterval(myInt);}
