//AJAX FUNCTIONs  ---------------------------------------------------------------


//GET CONTENT  ----------------------------------------------------------------

function getcontent(responseitem){

document.getElementById('temp_content').style.display = 'block';
document.getElementById('temp_content').innerHTML= responseitem ;

}

function closecontent(obj){
obj.innerHTML ="";
obj.style.display = 'none';
}

//------------------------------------------------------------------------------



function doRequest(action_url,parameters,use_reqFunction) {

if(use_reqFunction == "") use_reqFunction="fontResize";

        var http_request    = false;
        var url             = action_url;

        if (window.XMLHttpRequest) { // Mozilla, Safari, ...
            http_request = new XMLHttpRequest();
            if (http_request.overrideMimeType) {
                http_request.overrideMimeType('text/html');
                // See note below about this line
            }
        } else if (window.ActiveXObject) { // IE
            try {
                http_request = new ActiveXObject("Msxml2.XMLHTTP");
            } catch (e) {
                try {
                    http_request = new ActiveXObject("Microsoft.XMLHTTP");
                } catch (e) {}
            }
        }

        if (!http_request) {
            alert('Giving up :( Cannot create an XMLHTTP instance');
            return false;
        }
        http_request.onreadystatechange = function() { getRequest(http_request,use_reqFunction); };
        http_request.open('POST', url, true);
        http_request.setRequestHeader('Content-type','application/x-www-form-urlencoded;charset=iso-8859-15;');
        http_request.send(parameters);


}

function getRequest(http_request,use_reqFunction) {

        if (http_request.readyState == 4) {
            if (http_request.status == 200) {

            if(use_reqFunction == "getcontent"){
            getcontent(http_request.responseText);
            }

            if(use_reqFunction == "sendrecomend"){
            sendrecomend(http_request.responseText);
            }



            } else {
                alert('There was a problem with the request. : '+http_request.status);
            }
        }

}

// END OF AJAX FUNCTIONS -------------------------------------------------------
function init(){

if(document.getElementById('temp_content')){
  document.getElementById('temp_content').style.display='none';
  }

}


//------------------------------------------------------------------------------

