function dashboard() {
  
  this.DASHBOARD_DIV = 'pop';
  this.HIDE_DIV = 'images';
  this.HIDE_DIV2 = 'navagation';
  this.changeDiv = 'dashChange';
  this.ajaxChange = 'ajaxChange';
  this.defaultOffset = 20;


  this.pop = function() { // displays the dashboard overlay and the div specified
    $(this.DASHBOARD_DIV).style.visibility = 'visible';
    $(this.changeDiv).style.visibility = 'visible';
    $(this.HIDE_DIV).style.visibility = 'hidden';
	$(this.HIDE_DIV2).style.visibility = 'hidden';
    $(this.changeDiv).style.top = ((this.defaultOffset + this.getOffsetY()) + 'px');
    window.returnValue = false;
    return false;
  }
  
  this.unpop = function() { // hides the dashboard overlay and the div specified
    $(this.DASHBOARD_DIV).style.visibility = 'hidden';
    $(this.changeDiv).style.visibility = 'hidden';
    $(this.HIDE_DIV).style.visibility = 'visible';
	$(this.HIDE_DIV2).style.visibility = 'visible';
    window.returnValue = false;
	$(this.ajaxChange).innerHTML = '';
    return false;
  }
  
  
  this.getOffsetY = function() {
    if (typeof window.pageYOffset == 'number') {
	  return window.pageYOffset;
	} else if (document.body.scrollTop) {
	  return document.body.scrollTop;
	} else if (document.documentElement.scrollTop) {
	  return document.documentElement.scrollTop;
	}
  }
  
}

var dash = new dashboard();
