<!--
var the_timeout;
var animate_speed = 1;  // lower number = faster speed

function moveDiv() {
  dir = moveDiv.arguments[0];

  // get the stylesheet
  var the_style = getStyleObject("img_bar");
  if (the_style)
  {
    // get the current coordinate 
    var current_left = parseInt(the_style.left);

    var mydiv = document.getElementById("img_bar");
    //var current_width = parseInt(mydiv.style.width);
    var current_width = parseInt(mydiv.offsetWidth);


    // If we're moving right, add 1
    if (dir=='right' && current_left < 0) {
      var new_left = current_left + 1;

      // set the left property of the DIV, add px at the
      // end unless this is NN4
      if (document.layers) {
        the_style.left = new_left;
      } else {  
        the_style.left = new_left + "px";
      }

      // if we haven't gone to far, call moveDiv() again in a bit
      if (new_left < 1) {
        the_timeout = setTimeout('moveDiv(\'right\');',animate_speed);
      }
    }
    // If we're moving left, subtract 1
    if (dir=='left' && (current_width-500)-((current_width-500)*2)) {
      var new_left = current_left - 1;

      // set the left property of the DIV, add px at the
      // end unless this is NN4
      if (document.layers) {
        the_style.left = new_left;
      } else {
        the_style.left = new_left + "px";
      }

      // if we haven't gone to far, call moveDiv() again in a bit
      if (new_left > (current_width-500)-((current_width-500)*2))
      {
        the_timeout = setTimeout('moveDiv(\'left\');',animate_speed);
      }
    }
  }
}


function getStyleObject(objectId) {
    // cross-browser function to get an object's style object given its
    if(document.getElementById && document.getElementById(objectId)) {
        // W3C DOM
        return document.getElementById(objectId).style;
    } else if (document.all && document.all(objectId)) {
        // MSIE 4 DOM
        return document.all(objectId).style;
    } else if (document.layers && document.layers[objectId]) {
        // NN 4 DOM.. note: this won't find nested layers
        return document.layers[objectId];
    } else {
        return false;
    }
} // getStyleObject


function showPic (whichpic) {
  if (document.getElementById) {
    document.getElementById('placeholder').src = whichpic.href;
    if (whichpic.title) {
/*
      document.getElementById('desc')»
      .childNodes[0].nodeValue = whichpic.title;
*/
    } else {
/*
      document.getElementById('desc')»
      .childNodes[0].nodeValue = whichpic.childNodes[0].nodeValue;
*/
    }
    return false;
  } else {
    return true;
  }
}

// -->

