var hlp = new Array("Back to home page", "Contact us", "Site map", "Add to favorites");
var currentHLP = -1;

function addText() {
    if (currentHLP == -1) return false;
    var txt = document.getElementById("hlpArea").innerHTML;
    if (txt != hlp[currentHLP]) {
        ch = hlp[currentHLP].substring(txt.length, txt.length + 1);
        document.getElementById("hlpArea").innerHTML += ch;
        setTimeout(addText, 0);
    }
}

function s(i) {
    currentHLP = i;
    document.getElementById("hlpArea").innerHTML = hlp[i];

    //setTimeout(addText, 0); 
}

function st(i) {
    currentHLP = -1;
    document.getElementById("hlpArea").innerHTML = "";
}

function openwindow2(name, nWidth, nHeight) {
    var hWnd = null;
    var nLeftPos, nTopPos;
    if (arguments.length == 1) {
        nWidth = 120;
        nHeight = 200;
    }

    nLeftPos = Math.round(screen.availWidth / 2) - Math.round(nWidth / 2);
    nTopPos = Math.round(screen.availHeight / 2) - Math.round(nHeight / 2);

    hWnd = window.open(name, null, "height=" + nWidth + ",width=" + nHeight + ",status=no,toolbar=no,menubar=no,location=no,scrollbars=no");

    hWnd.moveTo(nLeftPos, nTopPos);


} // -------------------------------------------------------------------------------------------

function openwindow(name, nWidth, nHeight) {
    var hWnd = null;
    var nLeftPos, nTopPos;
    if (arguments.length == 1) {
        nWidth = 120;
        nHeight = 200;
    }

    nLeftPos = Math.round(screen.availWidth / 2) - Math.round(nWidth / 2);
    nTopPos = Math.round(screen.availHeight / 2) - Math.round(nHeight / 2);

    hWnd = window.open(name, null, "height=" + nWidth + ",width=" + nHeight + ",status=no,toolbar=no,menubar=no,location=no,scrollbars=yes");

    hWnd.moveTo(nLeftPos, nTopPos);


} // -------------------------------------------------------------------------------------------


function MM_swapImgRestore() { //v3.0
    var i, x, a = document.MM_sr; for (i = 0; a && i < a.length && (x = a[i]) && x.oSrc; i++) x.src = x.oSrc;
}

function MM_preloadImages() { //v3.0
    var d = document; if (d.images) {
        if (!d.MM_p) d.MM_p = new Array();
        var i, j = d.MM_p.length, a = MM_preloadImages.arguments; for (i = 0; i < a.length; i++)
            if (a[i].indexOf("#") != 0) { d.MM_p[j] = new Image; d.MM_p[j++].src = a[i]; }
    }
}