﻿/// <reference name="MicrosoftAjax.js"/>

function getRightNow() {
    var url = "RightNowProxy.ashx";
    var keyWord = "";
    if (arguments[0] != null) {
        keyWord = "?kw=" + arguments[0];
    }
    httpRequest("GET", url + keyWord, true, handleProxyRs);
}

function handleProxyRs() {
    if (request.readyState == 4) {
        if (request.status == 200) {
            var sRsDoc = request.responseText;
            //alert(sRsDoc);
            var close = "<div id='rightnowHdr' onclick='javascript:clearRightNow();' >&nbsp;</div>";
            document.getElementById("rightnowblock").innerHTML = close + sRsDoc;
        } else {
            alert("Error: " + request.statusText);
        }
    }
}

function clearRightNow() {
    document.getElementById("rightnowblock").innerHTML = "";
}


