
  /**
  * Dynamic Drive Marquee scripts
  */


  /********************************************************************
  * Cross browser marquee II- © Dynamic Drive (www.dynamicdrive.com)
  * This notice MUST stay intact for legal use
  * Visit http://www.dynamicdrive.com/ for this script and 100s more.
  *********************************************************************/

  /**
  * Horizontal marquee script
  */

  // global inits
  var hm_viewport, hm_contents;
  var hm_viewport_width, hm_contents_width;
  var hm_speed, hm_copyspeed, hm_pausespeed;
  var hm_ticks;

  function initialize_hmarquee(viewportId_, contentsId_, wait_, speed_, ticks_, pausehold_) {
    // safety controls
    if(!document.getElementById) return false;
    // inits
    hm_viewport = document.getElementById(viewportId_);
    hm_contents = document.getElementById(contentsId_);
    // safety controls
    if(!hm_viewport || !hm_contents) return false;
    // other inits
    hm_copyspeed = hm_speed = speed_;
    hm_pausespeed = pausehold_ ? 0 : speed_;
    hm_ticks = ticks_;
    hm_viewport_width = hm_viewport.offsetWidth + 8 + 'px';
    hm_contents_width = hm_contents.offsetWidth;
    // set contents 'position' property to special 'absolute' attribute
    hm_contents.style.position = 'absolute';
    // set contents location to left edge of the hm container
    hm_contents.style.left = '0';
    // launch scrolling procedure when delay is over
    return window.setTimeout('scroll_hmarquee()', wait_);
  } // end function

  function scroll_hmarquee() {
    // safety controls
    if(!hm_contents) return false;
    // inits
    var _hm_contents_pos = parseInt(hm_contents.style.left);
    // are we still in the box (viewport)?
    if(_hm_contents_pos + hm_contents_width > 8) {
      // move contents from right to left into hm container
      hm_contents.style.left = (_hm_contents_pos - hm_copyspeed) + 'px';
    // contents out of box (viewport)
    } else {
      // set contents pos to the right edge of the hm container
      hm_contents.style.left = hm_viewport_width;
    } // end if
    // replay the same thing later
    return window.setTimeout('scroll_hmarquee()', hm_ticks);
  } // end function

  function hmarquee_hold() {
    // set speed to pausespeed
    hm_copyspeed = hm_pausespeed;
  } // end function

  function hmarquee_release() {
    // set speed to pausespeed
    hm_copyspeed = hm_speed;
  } // end function


  /**
  * Vertical marquee script
  */

  // global inits
  var vm_viewport, vm_contents;
  var vm_viewport_height, vm_contents_height;
  var vm_speed, vm_copyspeed, vm_pausespeed;
  var vm_ticks;

  function initialize_vmarquee(viewportId_, contentsId_, wait_, speed_, ticks_, pausehold_) {
    // safety controls
    if(!document.getElementById) return false;
    // inits
    vm_viewport = document.getElementById(viewportId_);
    vm_contents = document.getElementById(contentsId_);
    // safety controls
    if(!vm_viewport || !vm_contents) return false;
    // other inits
    vm_copyspeed = vm_speed = speed_;
    vm_pausespeed = pausehold_ ? 0 : speed_;
    vm_ticks = ticks_;
    vm_viewport_height = vm_viewport.offsetHeight + 8 + 'px';
    vm_contents_height = vm_contents.offsetHeight;
    // set contents 'position' property to special 'absolute' attribute
    vm_contents.style.position = 'absolute';
    // set contents location to top edge of the vm container
    vm_contents.style.top = '0';
    // launch scrolling procedure when delay is over
    return window.setTimeout('scroll_vmarquee()', wait_);
  } // end function

  function scroll_vmarquee() {
    // safety controls
    if(!vm_contents) return false;
    // inits
    var _vm_contents_pos = parseInt(vm_contents.style.top);
    // are we still in the box (viewport)?
    if(_vm_contents_pos + vm_contents_height > 8) {
      // move contents from bottom to top into vm container
      vm_contents.style.top = (_vm_contents_pos - vm_copyspeed) + 'px';
    // contents out of box (viewport)
    } else {
      // set contents pos to the bottom edge of the vm container
      vm_contents.style.top = vm_viewport_height;
    } // end if
    // replay the same thing later
    return window.setTimeout('scroll_vmarquee()', vm_ticks);
  }

  function vmarquee_hold() {
    // set speed to pausespeed
    vm_copyspeed = vm_pausespeed;
  } // end function

  function vmarquee_release() {
    // set speed to pausespeed
    vm_copyspeed = vm_speed;
  } // end function



