var D = document;
var E = D.documentElement;
var h;
var t;
var tt;
var done;
function S(u, p){
    done = false;
    document.getElementById('loading').style.display = 'block';
    document.getElementById('ptext').innerHTML =  '';
    tt = function timedCount(){
        if (h.readyState != 4 & h.readyState == 1 & done == false) {
            //alert(h);
            if (navigator.appName == "Microsoft Internet Explorer") 
                h = new ActiveXObject("Microsoft.XMLHTTP");
            else 
                h = new XMLHttpRequest();
            h.open('POST', u, true);
            h.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
            h.send(p);
            h.onreadystatechange = hr;
            t = setTimeout("tt()", 15000);
        }
    }
    if (navigator.appName == "Microsoft Internet Explorer") 
        h = new ActiveXObject("Microsoft.XMLHTTP");
    else 
        h = new XMLHttpRequest();
    h.open('POST', u, true);
    h.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
    h.send(p);
    h.onreadystatechange = hr;
    t = setTimeout("tt()", 15000);
}

function hr(){
    if (h.readyState == 4) {
        clearTimeout(t);
        done = true;
        var r = h.responseText;
        if (window.ActiveXObject) {
            var d = new ActiveXObject("Microsoft.XMLDOM");
            d.async = "false";
            d.loadXML(r);
        }
        else {
            var p = new DOMParser();
            var d = p.parseFromString(r, "text/xml");
        }
        var n = d.firstChild.childNodes;
        for (i = 0; i < n.length; i++) {
            try {
                v = n[i];
                if (v == null) 
                    v = '';
                else 
                    if (D.all) {
                        v = v.text;
                    }
                    else {
                        v = v.textContent;
                    }
                v = v.replace(/%26/g, '&');
                v = v.replace(/%3e/g, '>');
                v = v.replace(/%3c/g, '<');
                if (n[i].tagName == 'js') 
                    eval(v);
                document.getElementById(n[i].tagName).innerHTML = v;
            } 
            catch (err) {
            }
        }
        document.getElementById('loading').style.display = 'none';
    }
}

function mywindow(i, y){
    this.y = y;
    this.Up = 0;
    this.m = document.getElementById(i);
    this.m.style.left = (E.clientWidth - parseInt(this.m.style.width)) / 2 + 'px';
    this.m.style.position = 'absolute';
    
    this.P = function(){
        if (window.innerHeight) 
            this.p = window.pageYOffset
        else 
            if (E && E.scrollTop) 
                this.p = E.scrollTop
            else 
                if (D.body) 
                    this.p = D.body.scrollTop
    }
    this.u = function(){
        if (this.Up == 0) 
            return;
        if (Math.abs(this.a - this.b) > .1) {
            this.a = (this.b - this.a) * .2 + this.a;
            this.m.style.top = (this.a + this.p) + 'px';
            t = this;
            setTimeout('t.u()', 50);
        }
        else {
            this.Up = 0;
            t = this;
            //setTimeout('t.d()', 30000);
        }
    }
    this.d = function(){
        if (this.Up == 1) 
            return;
        this.a = (this.a - this.b) * .2 + this.a;
        if ((D.body.clientHeight - this.m.clientHeight - 5 - this.a) > 0) {
            this.m.style.top = (this.a + this.p) + 'px';
            t = this;
            setTimeout('t.d()', 50);
        }
        else 
            this.m.style.display = "none";
    }
    this.Start = function(){
        this.m.style.display = "";
        this.a = E.clientHeight - this.m.clientHeight - 5;
        this.b = this.y;
        this.P();
        this.m.style.top = (this.a + this.p - 10) + 'px';
        this.Up = 1;
        t = this;
        setTimeout('t.u()', 50);
    }
    this.DragStart = function(e){
        this.Up = 0;
        if (e == null) 
            e = window.event;
        this.eElement = (e.srcElement) ? e.srcElement : e.originalTarget;
        if (this.eElement.nodeType == 3) 
            this.eElement = this.eElement.parentNode;
        this.f = e.clientX - parseInt(this.m.style.left);
        this.g = e.clientY - parseInt(this.m.style.top);
        t = this;
        D.body.onmousemove = function(e){
            t.Drag(e);
        };
        D.body.onmouseup = function(){
            D.body.onmousemove = "";
        };
    }
    this.Drag = function(e){
        if (e == null) 
            e = window.event;
        this.m.style.left = (e.clientX - this.f) + 'px';
        this.m.style.top = (e.clientY - this.g) + 'px';
        this.a = e.clientY - this.g - this.p;
    }
    this.Close = function(){
        this.m.style.display = "none";
    }
}

function send(i){
    S(i);
    return false;
}

function post(p, i){
    S(p, i);
    return false;
}
