  /* GLOBALS : Settings of the 360 degres animation */
  /* N seconds to make the 360 degres move */  
  var moveLength = 25;     
  /* image width in pixels */
  var imageWidth = 1530;  
  /* image height in pixels */
  var imageHeight = 50;  
  /* 1: image slides from the right to the left (0: else) */
  var rightToLeft = 0; 
  /* image to play panoramique with */
  var imageUrl = "../newphoto/home/news.jpg";
  /* Panorama Title */
  var panotitle = ""
  /* END GLOBALS : Settings of the 360 degres animation */
  
  /* Original Margin */
  var marg = 0;


  function initNews(panoDivid) {
    /* set the height of the panoramic div */
    document.getElementById(panoDivid).style.height = imageHeight+"px";
    /* We set the background loop of the inner div  */
    document.getElementById(panoDivid).style.backgroundImage = "url("+imageUrl+")"; 
    /* set the new margin for the background */
    document.getElementById(panoDivid).style.backgroundPosition= "-"+marg+"px";
    /* INFORMATION ON FADING AND PAUSE : to be under comment tags */
    //document.getElementById(panoDivid).innerHTML = "Margin= <b>-"+marg+"</b>";

    /* launch the process */
    setTimeout("changePosNews('"+panoDivid+"')",0);
    /* We could hav use : setInterval("changePos('"+divid+"')",((moveLength * 1000)/800)); */
    /* and avoid calling setTimeout("changePos('"+divid+"')",((moveLength * 1000)/800));    */
    /* at the end of the changeOpac function, but the problem with                           */
    /* setInterval is that it does not wait for the function to be ended                    */
    /* to relaunch it again : so we could overload the navigator                            */
  }

  function changePosNews(panoDivid) {
    /* INFORMATION ON FADING AND PAUSE : to be under comment tags */
    //document.getElementById(panoDivid).innerHTML = "Margin= <b>-"+marg+"</b>";
    
    /* set the new margin for the background */
    document.getElementById(panoDivid).style.backgroundPosition= "-"+marg+"px";
    if (rightToLeft  == 1) {
        marg--;
    } else {
        marg++;
    }
    /* try to limit the margin : each time we can : back to 0 */
    if ((rightToLeft == 0) && (marg == imageWidth)) {
        marg = 0;
    } else if ((rightToLeft == 1) && ((marg == 0))) {
        marg = imageWidth;
    } 
    setTimeout("changePosNews('"+panoDivid+"')",((moveLength * 1000)/imageWidth));
  }

