function createXMLHttpRequest() {
    try { return new XMLHttpRequest(); } catch (e) { }
    try { return new ActiveXObject("Msxml2.XMLHTTP"); } catch (e) { }
    try { return new ActiveXObject("Microsoft.XMLHTTP"); } catch (e) { }
    alert("XMLHttpRequest not supported");
    return null;
}
function RC_GetCrossLinkHTML(appPath, ratingMode, tabModID, comobjtype, comobjval, comobjval2) {
    var xmlHttpObject = createXMLHttpRequest();
    var domainName = document.domain;
    if (comobjtype == 'Q') {
        if (comobjval2 == undefined)
            comobjval2 = '';
        xmlHttpObject.open("GET", window.location.protocol + "//" + window.location.host + appPath + "/desktopmodules/dnncentric-ratingandcomments/CrossLinking.ashx?comobjtype=" + comobjtype + "&comobjval=" + comobjval + ":" + comobjval2 + "&tabmodid=" + tabModID + "&ratingmode=" + ratingMode, false);
    }
    else {
        xmlHttpObject.open("GET", window.location.protocol + "//" + window.location.host + appPath + "/desktopmodules/dnncentric-ratingandcomments/CrossLinking.ashx?comobjtype=" + comobjtype + "&comobjval=" + comobjval + "&tabmodid=" + tabModID + "&ratingmode=" + ratingMode, false);
    }
    xmlHttpObject.send(null);
    var resString = xmlHttpObject.responseText;
    return resString;
}

function RC_getQuerystring(key, default_) {
    if (default_ == null) default_ = "";
    key = key.replace(/[\[]/, "\\\[").replace(/[\]]/, "\\\]");
    var regex = new RegExp("[\\?&]" + key + "=([^&#]*)");
    var qs = regex.exec(window.location.href);
    if (qs == null)
        return default_;
    else
        return qs[1];
} 
