﻿function RequestB(strName)
{    
    var strHref = window.document.location.href;
    var intPos = strHref.indexOf("?");
    var strRight = strHref.substr(intPos + 1);    
    var arrTmp = strRight.split("&");
    for(var i = 0; i < arrTmp.length; i++)
    {
        var arrTemp = arrTmp[i].split("=");        
        if(arrTemp[0].toUpperCase() == strName.toUpperCase()) return arrTemp[1];
    }
    return "";
}


var xmlHttpB;
function createXMLHttpBRequest()
{
    if(window.ActiveXObject)
    {
    xmlHttpB=new ActiveXObject("Microsoft.XMLHTTP");
    }
    else if(window.XMLHttpRequest)
    {
    xmlHttpB=new XMLHttpRequest();
    }
}
function startBRequest(rId,orgin,entry)
{                
createXMLHttpBRequest();                
var url="/unionDataInsert/?rId="+rId+"&orgin="+orgin+"&entry="+entry+"";                 
xmlHttpB.open("GET",url,true);
xmlHttpB.send(null);                                  
}      
var rId =RequestB("rid");
var orgin=window.document.referrer;
var entry=window.document.location.href;
if(rId!="")
{
startBRequest(rId,orgin,entry)
}
