﻿function createXMLHttpRequest() {
    try { return new ActiveXObject("Msxml2.XMLHTTP"); } catch (e) { }
    try { return new ActiveXObject("Microsoft.XMLHTTP"); } catch (e) { }
    try { return new XMLHttpRequest(); } catch (e) { }
    alert("XMLHttpRequest not supported");
    return null;
}


function Ajaxin(AjaxVisibility) {
    if (AjaxVisibility)
        $('AjaxLoaderPanel').style.display = 'block';
    else
        $('AjaxLoaderPanel').style.display = 'none';
}

function GetAjaxLoaderHTML(AjaxTitle, VisibleFlag) {
    var tmpReturn;
    if (VisibleFlag == true)
        tmpReturn = '<img src=\'images\ajax-loader.gif\' alt=\'' + AjaxTitle + '\' />&nbsp;' + AjaxTitle ;
    else
        tmpReturn = '';
    return tmpReturn;
}

function GetAJAXHeader() {
    var tmpHeader = 'ajax.aspx?getcode=' + Math.floor(Math.random() * 1000001)
    return tmpHeader;
}

