var EPD_WS_USERS = "http://ws.elpais.com.uy";
var OVA_WS_USERS = "http://ws.ovaciondigital.com.uy";
ajaxDomain = function(){
    // webreflection.blogspot.com - Mit Style License
    var uid = 0, iframe, unset;
    return  {
		getParam:function(params){
			var regexS = "[\\?&]"+name+"=([^&#]*)";
			var regex = new RegExp ( regexS );
			var tmpURL = params;
			var results = regex.exec( tmpURL );
			if( results == null )
				return"";
			else
				return results[1];
		},
        get:function(location){
            for(var
                search = location.search.substring(1).split("&"),
                i = 0,
                length = search.length,
                value;
                i < length;
                i++
            ){
                value = search[i].split("=");
                if(value[0] === "uid"){
                    search = this[value[1]];
                    delete  this[value[1]];
                    return  search;
                }
            }
        },
        unset:function(){
            document.domain = unset;
            return  this;
        },
        send:function(domain, value){
            var id = Math.random() + "." + uid++;
            this[id] = value;
            if(!iframe){
                (document.body || document.documentElement).appendChild(
                    iframe = document.createElement("iframe")
                ).style.position = "absolute";
                iframe.style.width = iframe.style.height = "1px";
                iframe.style.top = iframe.style.left = "-10000px";
            };
            iframe.src = domain + ((domain.indexOf("?")!=-1) ? "&" : "?" ) + "uid=" + id;
            return  this;
        },
        set:function(){
            if(!unset)
                unset = document.domain;
            document.domain = unset.split(".").slice(1).join(".");
            return  this;
        }
    }
}();
