function _newhistory()
  {
	this._position = 0;
	this._history = new Array();
	this.back = _back;
	this.fresh = _fresh;
	this.insert = _insert;
	if (document.all) { this.winobj = window.document; }
	else { this.winobj = window; }
	return this;
  }
	  
function _fresh()
  {
    if (this._position == 0)
	  { this.insert(); }
    _changed = new Boolean(false);
	for (i = 0; i < this.winobj.frames.length; i++)
	  {
	    if (this._history[this._position][i] != this.winobj.frames[i].location.href)
		  { _changed = true; }
	  }
	if (_changed == true)
	  { this.insert(); }
  }
	     
    
function _insert()
  {
    this._position += 1;
	this._history[this._position] = new Array(this.winobj.frames.length);
	for (i = 0; i < this.winobj.frames.length; i++)
	  { this._history[this._position][i] = this.winobj.frames[i].location.href; }
    
  }
  
function _back()
  {
    if (this._position > 1) {
//	  this._history.pop();
      this._position -= 1;
  	  for (i = 0; i < this.winobj.frames.length; i++)
	    {
	      if (this.winobj.frames[i].location.href != this._history[this._position][i])
  		    { this.winobj.frames[i].location.href = this._history[this._position][i]; }
	    }
    }
  }
	

_hist = new _newhistory();

