/*
 * 背景阴影类;
 * 
 * var shadow = new Shadow();
 * shadow.show();
 * shadow.remove();
 * */

var Shadow = new Function();


Shadow.prototype = {
	
	
	show : function(){
		shade = document.createElement('div');
		shade.className = 'shade';
		document.body.appendChild(shade);
		var position = function() {
			var ch = document.body.clientHeight, sh = document.body.scrollHeight, st=document.body.scrollTop;
			shade.style.height = (sh > ch ? sh : ch) + 'px';
			
			if(window.ActiveXObject){  //ie;
				shade.style.width = document.documentElement.clientWidth + 'px';
				shade.innerHTML = "<iframe class='iframeBackStyle'></iframe>";
			}else{
				shade.style.width = document.body.clientWidth + 'px';
			}
			
		}
		window.onresize = position;
		shade.style.display = 'block';
		position();
			
	},
	
	remove : function(){
		shade.style.display = 'none';
		document.body.removeChild(shade);	
	}
	
}
