ref = {
    
    url: 'http://hithron.com/stuff/ref.php',

    init: function () {
        var url = location.href + "";
        var c;
        var a;
        if ((c = url.indexOf("#referer/")) > 1) {
            if (a = url.substr(c + 9)) {
                this.makeform(encodeURIComponent(a));
            }
        }
    },

    makeform: function (url) {
        if (!document.body) {
            try {
                document.write("<body><pre></pre></body>");
            }
            catch (d) {
            }
        }

        var form = document.createElement('form');
        form.setAttribute('action', this.url);

        var input = document.createElement('input');
        input.setAttribute('type', 'hidden');
        input.setAttribute('name', 'ref');
        input.setAttribute('value', url);
        form.appendChild(input);
        document.getElementsByTagName('body').item(0).appendChild(form);
        return form.submit();
    },

    test: function (url) {
        alert(url);
    }


}
ref.init();
