function GenericDialog(divId) {
	if(typeof(divId) != 'undefined') {
  this._divId = divId;
  this._objDiv = document.getElementById(this._divId);
	}
 this.show = function () {
  var divWidth=this._objDiv.style.width;
  var divHeight=this._objDiv.style.height;
  this._objDiv.style.top=(this.getScrollTop()+(this.getInnerHeight()/2)-(parseInt(divHeight.substring(0,divHeight.indexOf('p')))/2))+'px';
  this._objDiv.style.left=(this.getScrollLeft()+(this.getInnerWidth()/2)-(parseInt(divWidth.substring(0,divWidth.indexOf('p')))/2))+'px';
  this._objDiv.style.display = 'block';
 }
 this.hide = function () {
  this._objDiv.style.display = 'none';
 }
 this.getScrollLeft = function () {
  var x;
  if (self.pageYOffset) {
   x = self.pageXOffset;
  }
  else if (document.documentElement && document.documentElement.scrollTop) {
   x = document.documentElement.scrollLeft;
  }
  else if (document.body) {
   x = document.body.scrollLeft;
  }     
  else {
   x=0;
  }
  return x;
 }
 this.getScrollTop = function () {
  var y;
  if (self.pageYOffset) {
   y = self.pageYOffset;
  }
  else if (document.documentElement && document.documentElement.scrollTop) {
   y = document.documentElement.scrollTop;
  }
  else if (document.body) {
   y = document.body.scrollTop;
  }     
  else {
   y=0;
  }
  return y;
 }
 this.getInnerWidth = function () {
  var x;
  if (self.innerHeight) {
   x = self.innerWidth;
  }
  else if (document.documentElement && document.documentElement.clientHeight) {
   x = document.documentElement.clientWidth;
  }
  else if (document.body) {
   x = document.body.clientWidth;
  }
  return x;
 }
 this.getInnerHeight = function () {
  var y;
  if (self.innerHeight) {
   y = self.innerHeight;
  }
  else if (document.documentElement && document.documentElement.clientHeight) {
   y = document.documentElement.clientHeight;
  }
  else if (document.body) {
   y = document.body.clientHeight;
  }
  return y;
 }
	this.screenWidth = function() { return screen.width; }
	this.screenHeight = function() { return screen.height; }
}