function Dont_Dont() {
  window.kd_dont = this;
	this.splash = document.createElement('div');
	this.splash.style.position = 'absolute';
	this.splash.style.display = 'none';
	this.splash.style.margin = '0';
	this.splash.style.padding = '0';
	this.splash.style.left = '0';
	this.splash.style.top = '0';
	this.splash.style.zIndex = '150';
	this.splash.style.background = '#000000';
	this.splash.style.filter = 'progid:DXImageTransform.Microsoft.Alpha(Opacity=80,FinishOpacity=80, Style=1, StartX=0,  FinishX=100, StartY=0, FinishY=100)';
	this.splash.style.opacity = '0.8';
	document.body.appendChild(this.splash);
	this.notifyWin = document.createElement('div');
	this.notifyWin.style.display = 'none';
	this.notifyWin.style.position = 'absolute';
	this.notifyWin.style.background = '#FFFFFF';
	this.notifyWin.style.width = '400px';
	this.notifyWin.style.height = '180px';
	this.notifyWin.style.zIndex = '200';
	document.body.appendChild(this.notifyWin);
	this.notifyFrame = document.createElement('iframe');
	this.notifyFrame.setAttribute('src', 'about:blank');
	this.notifyFrame.setAttribute('frameBorder', '0');
	this.notifyFrame.style.border="none";
	this.notifyFrame.style.padding="0";
	this.notifyFrame.style.margin="0";
	this.notifyFrame.style.width="100%";
	this.notifyFrame.style.height="100%";
	this.notifyWin.appendChild(this.notifyFrame);
	this.commentWin = document.createElement('div');
	this.commentWin.style.display = 'none';
	this.commentWin.style.position = 'absolute';
	this.commentWin.style.background = '#FFFFFF';
	this.commentWin.style.width = '400px';
	this.commentWin.style.height = '300px';
	this.commentWin.style.zIndex = '200';
	document.body.appendChild(this.commentWin);
	this.commentFrame = document.createElement('iframe');
	this.commentFrame.setAttribute('src', 'about:blank');
	this.commentFrame.setAttribute('frameBorder', '0');
	this.commentFrame.style.border="none";
	this.commentFrame.style.padding="0";
	this.commentFrame.style.margin="0";
	this.commentFrame.style.width="100%";
	this.commentFrame.style.height="100%";
	this.commentWin.appendChild(this.commentFrame);
//	this.rel = document.body.parentNode;
};
  
Dont_Dont.prototype = {
  showSplash: function() {
		this.splash.style.display = 'block';
		this.splash.style.width = document.body.scrollWidth + 'px';
		this.splash.style.height = document.body.scrollHeight + 'px';
  },

  hideSplash: function() {
    this.splash.style.display = 'none';
  },
  
  resizeSplash: function() {
		this.splash.style.width = document.body.scrollWidth + 'px';
		this.splash.style.height = document.body.scrollHeight + 'px';
  },
  
  showNotifyWin: function(id) {
    this.notifyFrame.src="/notifyhandler.php?"+id;
    this.notifyWin.style.display = 'block';
    this.resizeNotifyWin();
  },
  
  showCommentWin: function(id) {
    this.commentFrame.src="/addcomment.php?"+id;
    this.commentWin.style.display = 'block';
    this.resizeCommentWin();
  },

  resizeNotifyWin: function() {
    this.resizeSplash();
    this.notifyWin.style.left = document.body.scrollLeft+Math.round((document.body.clientWidth-this.notifyWin.offsetWidth)/2);
    this.notifyWin.style.top = document.body.scrollTop+Math.round((document.body.clientHeight-this.notifyWin.offsetHeight)/2);
  },
  
  resizeCommentWin: function() {
    this.resizeSplash();
    this.commentWin.style.left = document.body.scrollLeft+Math.round((document.body.clientWidth-this.commentWin.offsetWidth)/2);
    this.commentWin.style.top = document.body.scrollTop+Math.round((document.body.clientHeight-this.commentWin.offsetHeight)/2);
  },

  hideNotifyWin: function() {
    this.hideSplash();
    this.notifyWin.style.display = 'none';
  },
  
  hideCommentWin: function() {
    this.hideSplash();
    this.commentWin.style.display = 'none';
  },

  notifyItem: function(id) {
    this.showSplash();
    this.showNotifyWin(id);
  },

  commentItem: function(id) {
    this.showSplash();
    this.showCommentWin(id);
  }

};