var Loader = {
	show: function() {
		var myWidth = 0, myHeight = 0;
		if (typeof(window.innerWidth) == 'number') {
			myWidth  = window.innerWidth;
			myHeight = window.innerHeight;
		} else if (document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
			myWidth  = document.documentElement.clientWidth;
			myHeight = document.documentElement.clientHeight;
		}	
		
		if (document.body.clientHeight + 20 > myHeight) myHeight = document.body.clientHeight + 20;
		
		dojo.byId('loader').style.height = myHeight + "px";
		dojo.byId('loader').style.width = document.body.clientWidth + 'px';
		dojo.byId('loader').style.display = '';
		
		dojo.animateProperty({
			node: "loader",
			properties:{
				opacity: { 
					start: 0, 
					end: 0.9 
				}
			}
		}).play();
		
	},
	
	hide: function() {
		dojo.animateProperty({
			node: "loader",
			properties:{
				opacity: { 
					end: 0.0 
				}
			},
			onEnd: function() {
				dojo.byId('loader').style.display = 'none';
			}
		}).play();
	}
}