/**
 * @namespace com.thesis.control.PauseControl
 * @author 钟军锐 August.R@263.net
 */

/** @id PauseControl */
function PauseControl(){
	this.Pause = C$("Div");
	this.Shadow = new Shadow(this.Pause, 0);
	this.Interval = null;
	this.IsShowed = false;
	
	if(typeof PauseControl._initialized == "undefined"){
		PauseControl._initialized = true;
		
		/** @id show */
		PauseControl.prototype.show = function(){
			if(this.IsShowed) return;
			this.IsShowed = true;
			this.Pause.style.left = 0;
			this.Pause.style.top = 0;
			this.Pause.style.width = "100%";
			this.Pause.style.height = "100%";
			this.Shadow.display(0.75,300);
			var P = this.Pause;
			this.Interval = setInterval(function(){ 
														P.style.left = (document.documentElement.scrollLeft || document.body.scrollLeft) + "px";
														P.style.top = (document.documentElement.scrollTop || document.body.scrollTop) + "px";
														P.style.width =(document.documentElement.clientWidth || document.body.clientWidth) + "px";
														P.style.height =(document.documentElement.clientHeight || document.body.clientHeight) + "px";
													}, 100);
		};
		
		/** @id hide */
		PauseControl.prototype.hide = function(){
			this.IsShowed = false;
			this.Shadow.display(0,200);
			if(this.Interval)
				clearInterval(this.Interval);
		};
		
		/** @id initialize */
		PauseControl.prototype.initailize = function(Root){
			this.Pause.style.position = "absolute";
			this.Pause.style.backgroundColor = "#777777";
			this.Pause.style.zIndex = 250;
			document.body.appendChild(this.Pause);
		};
	}
	
	this.initailize(this);
}



