/*
 * This is a mini first library in javascript
 *
 * 
 */


if(typeof window.Loo == "undefined")
{
	var Loo = window.Loo = function() {
		this.output = function(teste){
			alert(teste);
		}
		
		this.getUrl = function () {
    		var vars = [], hash;
    		var hashes = window.location.href.slice(window.location.href.indexOf('?') + 1).split('&');
 
    		for(var i = 0; i < hashes.length; i++)
    		{
        		hash = hashes[i].split('=');
				hash[1] = unescape(hash[1]);
				vars.push(hash[0]);
        		vars[hash[0]] = hash[1];
    		}
 
    		return vars;
		}
		
		this.getPos = function(id) {
			var offsetTrail = document.getElementById(id);
    		var offsetLeft = 0;
    		var offsetTop = 0;
    		
    		while (offsetTrail) {
        		offsetLeft += offsetTrail.offsetLeft;
        		offsetTop += offsetTrail.offsetTop;
        		offsetTrail = offsetTrail.offsetParent;
    		}
    		
    		if (navigator.userAgent.indexOf("Mac") != -1 && typeof document.body.leftMargin != "undefined") {
        		offsetLeft += document.body.leftMargin;
        		offsetTop += document.body.topMargin;
    		}
    		
    		
    		
    		return {left:offsetLeft, top:offsetTop};
		}
	};
	
	window.Loo = new Loo();
}
