zoo_source = "http://my.zoowee.com/workspace/";
_zoo_wait = null;
_zoo_mouse_y = 0;
if (document.addEventListener)
    document.addEventListener("mousemove",_zoo_follow,false);
else if (document.attachEvent)
    document.attachEvent("onmousemove",_zoo_follow,false);
function _zoo_follow(e) {
    if (!e) e = window.event;
    _zoo_mouse_y = e.clientY;
}
Zoo = {};
_func = 0;
_a=0; _b=0; _c=0; _d=0; _e=0; _f=0; _g=0;
_startLoad = function() {
    if (!_zoo_wait) {
        _zoo_wait= document.createElement("span");
        _zoo_wait.innerHTML = "<div style='width:55px;height:55px;background:url("+zoo_source+"images/loader_bg.png)'><img style='margin:11px' src='"+zoo_source+"images/zoowee-loader.gif'/></div>";
        _zoo_wait.style.position="absolute";
        var _y = 0;
        if (self.pageYOffset)
                _y = self.pageYOffset;
        else if (document.documentElement && document.documentElement.scrollTop)
                _y = document.documentElement.scrollTop;
        else if (document.body)
                _y = document.body.scrollTop;
        _zoo_wait.style.top=(_y+120)+"px"; // _zoo_mouse_y+"px";
        _zoo_wait.style.left="49%";
        document.body.appendChild(_zoo_wait);
    }
	var zoo_s = document.createElement("script");
    zoo_s.src = zoo_source+"library.js";
    document.getElementsByTagName("HEAD")[0].appendChild(zoo_s);
	setTimeout(zoo_doWinLoad,500);
}
Zoo.createBubble = function(a) {
    _startLoad();
    _func = 'create';
	_a = a;
}
Zoo.hover = function(a,b,c,d,e,f,g) {
    _startLoad();
    _func = 'hover';
    _a=a; _b=b; _c=c; _d=d; _e=e; _f=f; _g=g;
}
function zoo_doWinLoad() {
	if (! window.zoo_doInit) {
		setTimeout(zoo_doWinLoad,500);
	} else {		
		window.zoo_doInit();
        document.body.removeChild(_zoo_wait);
        if (_func=='create')
            Zoo.createBubble(_a);
        else
            Zoo.hover(_a,_b,_c,_d,_e,_f,_g);
        if (document.removeEventListener)
            document.removeEventListener("mousemove",_zoo_follow,false);
        else if (document.detachEvent)
            document.detachEvent("onmousemove",_zoo_follow,false);

	}
}

