
scrollStep=3

timerLeft=""
timerRight=""

function toLeft(id){
  document.getElementById(id).scrollLeft=0
}

function scrollDivLeft(id){
  clearTimeout(timerRight) 
  document.getElementById(id).scrollLeft+=scrollStep
  timerRight=setTimeout("scrollDivLeft('"+id+"')",0)
}

function scrollDivRight(id){
  clearTimeout(timerLeft)
  document.getElementById(id).scrollLeft-=scrollStep
  timerLeft=setTimeout("scrollDivRight('"+id+"')",0)
}

function toRight(id){
  document.getElementById(id).scrollLeft=document.getElementById(id).scrollWidth
}

function stopMe(){
  clearTimeout(timerRight) 
  clearTimeout(timerLeft)
}

function changeDivImage(imgUrl)
{
    var imgPath = new String();
    imgPath = document.getElementById("foto").style.backgroundImage;
    document.getElementById("foto").style.backgroundImage = imgUrl;
} 

function changeDivImageOLD()
{
    var imgPath = new String();
    imgPath = document.getElementById("foto").style.backgroundImage;
    
    if(imgPath == "url(images/blank.gif)" || imgPath == "")
    {
        document.getElementById("foto").style.backgroundImage = "url(foto/portrait/1.jpg)";
    }
    else
    {
        document.getElementById("foto").style.backgroundImage = "url(foto/portrait/2.jpg)";
    }
} 
