function OpenWindow(URL, Width, Height, ScrollBars) {
    window.open(URL, "_blank", "toolbar=0,menubar=0,location=no,directories=no,scrollbars="+ (ScrollBars != null ? ScrollBars : "yes") +",resizable=yes,status=no,width=" + Width + ",height=" + Height + ",top=80,left=80");
}

// **************************************************************************************************************************
// AJAX functions
// **************************************************************************************************************************

var xmlhttp = null;

var ajaxResultsXML = null;
var ajaxResultsText = "";

var ajaxResultReady = false;
var ajaxLoadingData = false;

function AjaxTransfer(url)
{
    ajaxLoadingData = true;
    ajaxResultReady = false;
    ajaxResultsXML = null;
    ajaxResultsText = "";

    // setting right object according to web browser
    if (window.XMLHttpRequest)
    {
        xmlhttp = new XMLHttpRequest(); // code for Mozilla, etc.
    } 
    else 
    {
        try {
            xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
        } catch (error) {
            xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
        }
    }

    if (xmlhttp != null) 
    {
        // setting the action after receiving data
        xmlhttp.onreadystatechange = function()
        { 
            if (xmlhttp.readyState == 4)  // check if receiving action is completed
            {
                if(xmlhttp.status == 200) // check if there is not any error
                {
                    // ******************************************************************************
                    // work with received data ------------------------------------------------------
                    ajaxResultsXML = xmlhttp.responseXML;
                    ajaxResultsText = xmlhttp.responseText;
                    ajaxResultReady = true;
                    ajaxLoadingData = true;
                    // end of work with received data -----------------------------------------------
                    // ******************************************************************************
                }
                else
                {
                    //alert("Problem retrieving XML data.");
                }
            }
        };
        xmlhttp.open("GET", url + "&dsasfkiugbgadwqtruzozs=" + Math.random().toString(), true);
        xmlhttp.send(null);
    }
    else alert("Your browser does not support XMLHTTP.");
}