function getbyid(id) {
    if (document.getElementById) {
        return document.getElementById(id);
    } else if (document.all) {
        return document.all[id];
    } else if (document.layers) {
        return document.layers[id];
    } else {
        return null;
    }
}
var isIE = navigator.userAgent.toLowerCase().indexOf('ie');
function showajaxdiv(url, width) {
    var x = new Ajax('statusid', 'HTML');
    x.get(url, function(s){
        if(getbyid("xspace-ajax-div")) {
            var divElement = getbyid("xspace-ajax-div");
        } else {
            var divElement = document.createElement("DIV");
            divElement.id = "xspace-ajax-div";
            divElement.className = "xspace-ajaxdiv";
            document.body.appendChild(divElement);
        }
        divElement.style.cssText = "width:"+width+"px;";
        var userAgent = navigator.userAgent.toLowerCase();
        var is_opera = (userAgent.indexOf('opera') != -1);
        var clientHeight = 0;
        var scrollTop = 0;
        if(is_opera) {
            clientHeight = document.body.clientHeight /2;
            scrollTop = document.body.scrollTop;
        } else {
            clientHeight = document.documentElement.clientHeight /2;
            scrollTop = document.documentElement.scrollTop;
        }
        divElement.innerHTML = s;
        divElement.style.left = (document.documentElement.clientWidth/2 + document.documentElement.scrollLeft - width/2)+"px";
        divElement.style.top = (clientHeight + scrollTop - divElement.clientHeight/2)+"px";
    });
}