//prepare request
var req;
var responseHandler;
var _processingDiv;
if (window.ActiveXObject) 
{
	req = new ActiveXObject("Microsoft.XMLHTTP");
}
else if (window.XMLHttpRequest) 
{
	req = new XMLHttpRequest();
}

//make request
function MakeRequest(requestUrl,responseHandlingMethod)
{
	responseHandler = responseHandlingMethod;
	
	req.open("GET",requestUrl,true);
	req.onreadystatechange = HandleResponse;
	req.send(null);
}

function HandleResponse()
{
	if (req.readyState == 4)
	{
		eval(responseHandler + "('" + escape(req.responseText) + "')");
	}
}

//Wait Animation
function ShowStickerWindow() {
    var width;
    var height;
    //calculating body width. handle IE 6
    if ($.browser.msie && $.browser.version < 7) {
        var scrollWidth = Math.max(document.documentElement.scrollWidth, document.body.scrollWidth);
        var offsetWidth = Math.max(document.documentElement.offsetWidth, document.body.offsetWidth);
        if (scrollWidth < offsetWidth) {
            width = $(window).width() + 'px';
        } else {
            width = scrollWidth + 'px';
        }
        // handle "good" browsers
    } else {
        width = $(document).width() + 'px';
    }
    //calculating body width. handle IE 6
    // handle IE 6
    if ($.browser.msie && $.browser.version < 7) {
        var scrollHeight = Math.max(document.documentElement.scrollHeight, document.body.scrollHeight);
        var offsetHeight = Math.max(document.documentElement.offsetHeight, document.body.offsetHeight);
        if (scrollHeight < offsetHeight) {
            height = $(window).height() + 'px';
        } else {
            height = scrollHeight + 'px';

        }
        // handle "good" browsers
    } else {
        height = $(document).height() + 'px';
    }
    var wnd = $(window), doc = $(document), pTop = doc.scrollTop(), pLeft = doc.scrollLeft();
    pLeft += (wnd.width() - 200) / 2;
    pTop += (wnd.height() - 200) / 2;
    $('#' + _processingDiv).css({ 'left': pLeft + 'px', 'top': pTop + 'px', 'zIndex': 10001 }).show();
    //IE6 Bug with SELECT element always showing up on top
    if ($.browser.msie && $.browser.version < 7) {
        $('select').each(function() {
            $(this).hide();
        });
    }
}
function HideStickerWindow() {

    $('#' + _processingDiv).hide();
    //IE6 Bug with SELECT element always showing up on top  
    if ($.browser.msie && $.browser.version < 7) {
        $('select').each(function() {
            $(this).show();
        });
    }

}

