/*
 * IdeaValley Innovation
 * FlipSite
 * Maio 2006
 * Luiz Paulo dos Prazeres Júnior
 * 
 * Loadding Class
 */


var LoadingPath = toolsPath+"flipTracking/";
var Loading 	= Class.create();

Loading.prototype = {

    initialize: function (obj) {

        this.father            = obj;
        this.divLoad           = document.createElement("DIV");
        this.divLoad.className = "loadingDiv";

        this.father.appendChild(this.divLoad);

        this.imgLoad     = document.createElement("IMG");
        this.imgLoad.src = themePath+"imgs/loading.gif";

        setStyle(this.imgLoad, "loadding");
        this.divLoad.appendChild(this.imgLoad);

        this.display();
        this.resize();

    }, //Method initialize


	display: function (param) {

        if(isUndefined(param)) param = "block";
	    this.divLoad.style.display = param;

	}, //Method display


    resize: function (obj) {

        this.divLoad.style.width     = this.father.offsetWidth+"px";
        this.divLoad.style.height    = this.father.offsetHeight+"px";

        this.imgLoad.style.marginTop = ((( this.divLoad.offsetHeight - this.imgLoad.offsetHeight ) / 2) - (this.divLoad.offsetHeight / 15) )+"px";

    }, //Method resize


	end: function () {
	} //Method end

}