/*******************************************************************************************************************
 * Site Loading Box
 * This shows and hides a div when data is being loading
 */
	function c_LoadingBox( loading_box_name, loading_box_class, width, height ) {

		this.div				= document.createElement("div");
		this.div.id				= loading_box_name;
		this.div.style.display	= 'none';
		this.div.className		= loading_box_class;
		this.div.style.position	= 'absolute';
		this.div.style.top		= parseInt((this.getClientHeight()-parseInt(height, 10))/2, 10);
		this.div.style.left		= parseInt((this.getClientWidth()-parseInt(width, 10))/2, 10);
		this.div.style.zIndex	= 100;
		document.body.appendChild(this.div);

		return this;
	}


	c_LoadingBox.prototype.getClientWidth = function() {

		if (self.innerWidth) //Mozilla
			return self.innerWidth;
		else if (document.documentElement && document.documentElement.clientWidth)
			return document.documentElement.clientWidth;
		else if (document.body) //Internet Explorer
			return document.body.clientWidth;
	}


	c_LoadingBox.prototype.getClientHeight = function() {

		if (self.innerHeight) //Mozilla
			return self.innerHeight;
		else if (document.documentElement && document.documentElement.clientHeight)
			return document.documentElement.clientHeight;
		else if (document.body) //Internet Explorer
			return document.body.clientHeight;
	}


	c_LoadingBox.prototype.show = function( element ) {

		this.div.style.display	= 'block';
	}


	c_LoadingBox.prototype.hide = function() {

		this.div.style.display	= 'none';
	}