function getSessionAttribute(attribute, callback){
    atcJsLogging('Function getSessionInfo Called', 'info');
    var xmlHttp;
    try{    // Firefox, Opera 8.0+, Safari
        xmlHttp=new XMLHttpRequest();
    }catch (e){    // Internet Explorer
        try{
            xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
        }catch (e){
            try{
                xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
            }catch (e){
                atcJsLogging('Could not create object for AJAX Request', 'warn');
                return false;
            }
        }
    }

    //when onreadystatechange occurrs check for the readystate value of 4 (The request is complete)
    xmlHttp.onreadystatechange=function(){
        if(xmlHttp.readyState==4){
            callback(xmlHttp.responseText);
        }
    }

    xmlHttp.open("GET","/ajax/getSessionAttribute.jsp?Log=0&rand=" + (Math.round((Math.random()*9000)+1)) + "&attribute=" + attribute, true);
    atcJsLogging('AJAX request made', 'info');
    xmlHttp.send(null);
}

function setSessionAttribute(attribute, value){
    atcJsLogging('Function getSessionInfo Called', 'info');
    var xmlHttp;
    try{    // Firefox, Opera 8.0+, Safari
        xmlHttp=new XMLHttpRequest();
    }catch (e){    // Internet Explorer
        try{
            xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
        }catch (e){
            try{
                xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
            }catch (e){
                atcJsLogging('Could not create object for AJAX Request', 'warn');
                return false;
            }
        }
    }

    //when onreadystatechange occurrs check for the readystate value of 4 (The request is complete)
    xmlHttp.onreadystatechange=function(){
        if(xmlHttp.readyState==4){
            return xmlHttp.responseText;
        }
    }

    xmlHttp.open("GET","/ajax/setSessionAttribute.jsp?rand=" + (Math.round((Math.random()*9000)+1)) + "&attribute=" + attribute + "&value=" + value, true);
    atcJsLogging('AJAX request made', 'info');
    xmlHttp.send(null);
}
