var g_cGif = 9;
var g_ixGif = 1;
var g_rgGif = new Array(g_cGif);
var g_cLoops = 1; //old
var g_cLoopsMax = 300; //old

function ShowWait() {
    showWait();
}

function showWait() {
    // Get the dot image in order to update the position
    var imgDot = document.getElementById("imgDot");
    var imgDotDiv = document.getElementById("imgDotDiv");

    if (navigator.userAgent.indexOf('MSIE') > 0) {
        window.attachEvent('onresize', setParameters);
        setParameters();
        g_o = document.all.imgDot;
        document.getElementById("pleaseWait").style.display = 'inline';
        document.getElementById("divMainContent").style.display = 'none';
        if (g_o != null) {
            animate();
        }
    } else {        
        imgDotDiv.style.paddingLeft = "140px";

        if (navigator.userAgent.indexOf('Safari') > 0) {
            //imgDot.style.left = "150px";
        } else {
            document.getElementById("pleaseWait").style.display = 'inline';
            document.getElementById("divMainContent").style.display = 'none';

            for (i = 1; i <= 9; i++) {
                g_rgGif[i - 1] = document.createElement("IMG");
                g_rgGif[i - 1].src = "/images/07/wait" + i + "_1.gif";
                g_rgGif[i - 1].alt = "Please wait...";
            }
            updateGif();
        }
    }
}


function updateGif() {
    imgAnim = document.imgDot;
    imgAnim.src = g_rgGif[g_ixGif % g_cGif].src;
    imgAnim.alt = g_rgGif[g_ixGif % g_cGif].alt;
    g_ixGif++;
    setTimeout("updateGif()", 250);
}

