(function(){
    YAHOO.namespace("YAHOO.sbuilder.wait");
    // Initialize the temporary Panel to display while waiting for external content to load
    var Event = YAHOO.util.Event;
    var Dom = YAHOO.util.Dom;
    YAHOO.sbuilder.wait = {
        init : function (){

        },

        show : function (){
            document.getElementById("loading_span").style.visibility="";
            document.getElementById("loading_img").src="/sb/images/loading_bar.gif";
            YAHOO.sbuilder.wait.fadeIn();
        },
        hide : function (){
            var t=1000;
            YAHOO.sbuilder.wait.fadeOut();
            setTimeout(function(){
                //document.getElementById("loading_span").style.visibility="hidden";
                document.getElementById("loading_img").src="/sb/images/loading_bar.png";
            }, t);
        },
        fadeIn : function(){
            var glow = new YAHOO.util.ColorAnim('loading_span', {
                color: {
                    from: "#BBB",
                    to: "#000"
                }
            },1);
            glow.animate();
        },
        fadeOut : function (){
            var fade = new YAHOO.util.ColorAnim('loading_span', {
                color: {
                    from: "#000",
                    to: "#BBB"
                }
            },1);
            fade.animate();
        }
                
    }
    Event.onDOMReady(YAHOO.sbuilder.wait.init, YAHOO.sbuilder.wait, true);
})();
