var ProgressWindow = function() {

	window.onresize = setViewport;
	window.onscroll = setViewport;

	this.show = function() {

		var shadow = document.getElementById("Shadow");
		setViewport();

		if(document.all) {
			shadow.style.filter='alpha(style=0, opacity=80)';
		} else {
			shadow.style.opacity = "0.8";
		}
		shadow.style.display = "block";
	}

	this.hide = function() {
		document.getElementById("Shadow").style.display = "none";
	}

	function setViewport() {
		var width = 500;
		var height = 400;

		if(window.innerWidth) { // mozilla/netscape/opera/IE7
			width = window.innerWidth;
      		height = window.innerHeight;
		} else if (document.documentElement // IE6
				&& document.documentElement.clientWidth && document.documentElement.clientWidth != 0) {
			width = document.documentElement.clientWidth;
			height = document.documentElement.clientHeight;
 		} else { // IE old
			width = document.getElementsByTagName('body')[0].clientWidth;
			height = document.getElementsByTagName('body')[0].clientHeight;
		}
		var shadow = document.getElementById("Shadow");
		shadow.style.top = scrollY+"px";
		shadow.style.width = width+"px";
		shadow.style.height = height+"px";

		var dialog = document.getElementById("Sending");
		dialog.style.top = (height/2-50)+"px";
	}
}

var block = '<div id="Shadow" style="display:none;position:absolute;top:0;left:0;width:0px;height:0px;background-color:black;">';
block += '<div id="Sending" style="position:relative;width:30%;margin:auto;padding:16px 24px;text-align:center;color:blue;background-color:white;border:1px solid black;-moz-border-radius:5px;-webkit-border-radius:5px;">'
block += '<img src="/css/osx.gif" alt="Sending your email..."/>'
block += '<p style="font-size:1.2em;">Please Wait! Sending...</p>'
block += '</div></div>'
document.write(block);