/**
 * @author rodneybyman
 */
var bgp =0;
var bgpt ="0";
var offx=1;

function scrollPic(){
	bgp+=offx;
	if(bgp > 4844) bgp = 0;
	if(bgp < 0) bgp=4844;
	if(bgp == 0){ 
		bgpt = "0";
	}else{
		bgpt= ""+bgp+"px";
	}
	document.getElementById("picscroll").style.backgroundPosition = bgpt+ " 0";
	
}
function changeDir(which){
	offx = which;
}
function jumpScroll(howmuch){
	if ((bgp + howmuch) > 4844) {
		bgp = bgp + howmuch - 4844;
		
	}else if ((bgp + howmuch) <= 0) {
		
		bgp = 4844 - bgp + howmuch;
		
	}else{
		bgp = bgp + howmuch;
		
	}				
	
}
function simplePreload()
				{ 
				  var args = simplePreload.arguments;
				  document.imageArray = new Array(args.length);
				  for(var i=0; i<args.length; i++)
				  {
					document.imageArray[i] = new Image;
					document.imageArray[i].src = args[i];
				  }
				}
function startList() {
if (document.all&&document.getElementById) {
navRoot = document.getElementById("topnav");
for (i=0; i<navRoot.childNodes.length; i++) {
node = navRoot.childNodes[i];
if (node.nodeName=="LI") {
node.onmouseover=function() {
this.className+=" over";
  }
  node.onmouseout=function() {
  this.className=this.className.replace(" over", "");
   }
   }
  }
 }
}
initialize=function(){
	startList();
	var elem=document.getElementById("picscroll");
	if(elem) setInterval('scrollPic()',30);
	simplePreload('/images/aboutus-rollover.png','/images/design-rollover.png','/images/contact_us-rollover.png','/images/home-rollover.png','/images/portfolio-rollover.png','/images/resources-rollover.png');				
}			
window.onload=initialize;	