function setBookmark(url,str)
{
 if(str=='')str=url;
 if (document.all)window.external.AddFavorite(url,str);
 else alert('This is only supported directly in Internet Explorer, BUT using your browser simply Press CTRL and D to add a bookmark  to:\n"'+url+'".');
}
 
function Message1()
       { 
   window.status = "Re-Start Animation"; 
       }
function Message2()
       { 
   window.status = ""; 
       }

image0 = new Image;
image1 = new Image;
image2 = new Image;
image3 = new Image;
image4 = new Image;
image0.src = 'moore-home7.jpg';
image1.src = 'buzz-home7.jpg';
image2.src = 'ford-home7.jpg';
image3.src = 'framed-press-logo4.jpg';
image4.src = 'brave-framed.jpg';

 function init() {

	Img1.init();

    }
    
    var Img0 = new Object();
    var Img1 = new Object();
    var Img2 = new Object();
    var Img3 = new Object();
    var Img32 = new Object();
    var Img4 = new Object();
    var Img5 = new Object();
    var Img6 = new Object();
    var Img7 = new Object();

    Img1.init = function () {

	var img0 = document.getElementById("img-0");
	var img1 = document.getElementById("img-1");
	var img2 = document.getElementById("img-2");
	var img3 = document.getElementById("img-3");
	var img32 = document.getElementById("img-32");
	var img4 = document.getElementById("img-4");
	var img5 = document.getElementById("img-5");
	var img6 = document.getElementById("img-6");
	var img7 = document.getElementById("img-7");

	Img1.fader = new Fadomatic(img1, 4, 0)
	Img0.fader = new Fadomatic(img0, 4, 0)
	Img2.fader = new Fadomatic(img2, 4, 0)
	Img3.fader = new Fadomatic(img3, 4, 0)
	Img32.fader = new Fadomatic(img32, 4, 0)
	Img4.fader = new Fadomatic(img4, 4, 0)
	Img5.fader = new Fadomatic(img5, 4, 0)
	Img6.fader = new Fadomatic(img6, 4, 0)
	Img7.fader = new Fadomatic(img7, 4, 0)
	Img1.fader.hide();
	Img0.fader.hide();
	Img2.fader.hide();
	Img3.fader.hide();
	Img32.fader.hide();
	Img4.fader.hide();
	Img5.fader.hide();
	Img6.fader.hide();
	Img7.fader.hide();
	window.setTimeout("Img1.fader.fadeIn()", 100);
	i=5000;
	j=10000;
        k=15000;
        l=20000;
        m=25000;
        mm=30000;
	n=35000;
	p=40000;
	r=45000;
	s=50000;
	while(i<10000000)
	{
	window.setTimeout("Img1.fader.fadeOut()", i);
	window.setTimeout("Img0.fader.fadeIn()", i);
	window.setTimeout("Img0.fader.fadeOut()", j);
	window.setTimeout("Img0.fader.fadeIn()", j);
	window.setTimeout("Img0.fader.fadeOut()", k);
	window.setTimeout("Img2.fader.fadeIn()", k);
	window.setTimeout("Img2.fader.fadeOut()", l);
	window.setTimeout("Img3.fader.fadeIn()", l);
	window.setTimeout("Img3.fader.fadeOut()", m);
	window.setTimeout("Img32.fader.fadeIn()", m);
	window.setTimeout("Img32.fader.fadeOut()", mm);
	window.setTimeout("Img4.fader.fadeIn()", mm);
	window.setTimeout("Img4.fader.fadeOut()", n);
	window.setTimeout("Img5.fader.fadeIn()", n);
	window.setTimeout("Img5.fader.fadeOut()", p);
	window.setTimeout("Img6.fader.fadeIn()", p);
	window.setTimeout("Img6.fader.fadeOut()", r);
	window.setTimeout("Img7.fader.fadeIn()", r);
	window.setTimeout("Img7.fader.fadeOut()", s);
	window.setTimeout("Img1.fader.fadeIn()", s);
	i=i+50000;
	j=j+50000;
	k=k+50000;
	l=l+50000;
	m=m+50000;
	mm=mm+50000;
	n=n+50000;
	p=p+50000;
	r=r+50000;
	s=s+50000;
       }
    }

// Fade interval in milliseconds
// Make this larger if you experience performance issues
Fadomatic.INTERVAL_MILLIS = 50;

// Creates a fader
// element - The element to fade
// speed - The speed to fade at, from 0.0 to 100.0
// initialOpacity (optional, default 100) - element's starting opacity, 0 to 100
// minOpacity (optional, default 0) - element's minimum opacity, 0 to 100
// maxOpacity (optional, default 0) - element's minimum opacity, 0 to 100
function Fadomatic (element, rate, initialOpacity, minOpacity, maxOpacity) {
  this._element = element;
  this._intervalId = null;
  this._rate = rate;
  this._isFadeOut = true;

  // Set initial opacity and bounds
  // NB use 99 instead of 100 to avoid flicker at start of fade
  this._minOpacity = 0;
  this._maxOpacity = 99;
  this._opacity = 99;

  if (typeof minOpacity != 'undefined') {
    if (minOpacity < 0) {
      this._minOpacity = 0;
    } else if (minOpacity > 99) {
      this._minOpacity = 99;
    } else {
      this._minOpacity = minOpacity;
    }
  }

  if (typeof maxOpacity != 'undefined') {
    if (maxOpacity < 0) {
      this._maxOpacity = 0;
    } else if (maxOpacity > 99) {
      this._maxOpacity = 99;
    } else {
      this._maxOpacity = maxOpacity;
    }

    if (this._maxOpacity < this._minOpacity) {
      this._maxOpacity = this._minOpacity;
    }
  }
  
  if (typeof initialOpacity != 'undefined') {
    if (initialOpacity > this._maxOpacity) {
      this._opacity = this._maxOpacity;
    } else if (initialOpacity < this._minOpacity) {
      this._opacity = this._minOpacity;
    } else {
      this._opacity = initialOpacity;
    }
  }

  // See if we're using W3C opacity, MSIE filter, or just
  // toggling visiblity
  if(typeof element.style.opacity != 'undefined') {

    this._updateOpacity = this._updateOpacityW3c;

  } else if(typeof element.style.filter != 'undefined') {

    // If there's not an alpha filter on the element already,
    // add one
    if (element.style.filter.indexOf("alpha") == -1) {

      // Attempt to preserve existing filters
      var existingFilters="";
      if (element.style.filter) {
        existingFilters = element.style.filter+" ";
      }
      element.style.filter = existingFilters+"alpha(opacity="+this._opacity+")";
    }

    this._updateOpacity = this._updateOpacityMSIE;
    
  } else {

    this._updateOpacity = this._updateVisibility;
  }

  this._updateOpacity();
}

// Initiates a fade out
Fadomatic.prototype.fadeOut = function () {
  this._isFadeOut = true;
  this._beginFade();
}

// Initiates a fade in
Fadomatic.prototype.fadeIn = function () {
  this._isFadeOut = false;
  this._beginFade();
}

// Makes the element completely opaque, stops any fade in progress
Fadomatic.prototype.show = function () {
  this.haltFade();
  this._opacity = this._maxOpacity;
  this._updateOpacity();
}

// Makes the element completely transparent, stops any fade in progress
Fadomatic.prototype.hide = function () {
  this.haltFade();
  this._opacity = 0;
  this._updateOpacity();
}

// Halts any fade in progress
Fadomatic.prototype.haltFade = function () {

  clearInterval(this._intervalId);
}

// Resumes a fade where it was halted
Fadomatic.prototype.resumeFade = function () {

  this._beginFade();
}

// Pseudo-private members

Fadomatic.prototype._beginFade = function () {

  this.haltFade();
  var objref = this;
  this._intervalId = setInterval(function() { objref._tickFade(); },Fadomatic.INTERVAL_MILLIS);
}

Fadomatic.prototype._tickFade = function () {

  if (this._isFadeOut) {
    this._opacity -= this._rate;
    if (this._opacity < this._minOpacity) {
      this._opacity = this._minOpacity;
      this.haltFade();
    }
  } else {
    this._opacity += this._rate;
    if (this._opacity > this._maxOpacity ) {
      this._opacity = this._maxOpacity;
      this.haltFade();
    }
  }

  this._updateOpacity();
}

Fadomatic.prototype._updateVisibility = function () {
  
  if (this._opacity > 0) {
    this._element.style.visibility = 'visible';
  } else {
    this._element.style.visibility = 'hidden';
  }
}

Fadomatic.prototype._updateOpacityW3c = function () {
  
  this._element.style.opacity = this._opacity/100;
  this._updateVisibility();
}

Fadomatic.prototype._updateOpacityMSIE = function () {
  
  this._element.filters.alpha.opacity = this._opacity;
  this._updateVisibility();
}

Fadomatic.prototype._updateOpacity = null;
