function createRequestObject() 
 {
    var ro;
    
    var browser = navigator.appName;
    
    try 
    {
    	// The big problem is that opera identify itself as "Microsoft Internet Explorer".
    	// That is why we first try to create the object & if impossible then try to
    	// check for IE below.
    	ro = new XMLHttpRequest();
    }
    catch(e)
    {
    	ro = null;
    }
    
    if ( !ro )
    {
    	if( browser == "Microsoft Internet Explorer" )
    	{
        	ro = new ActiveXObject("Microsoft.XMLHTTP");
    	}
    }
    
    return ro;
}

var http = createRequestObject();
var operationInProgress = false;

function sndReq(url) 
{
	if ( !operationInProgress )
	{
		operationInProgress = true;
     	http.open('get', url);
	    http.onreadystatechange = handleResponse;
	    http.send(null);
	}
	else
	{
		alert("Update operation is in progress now");
	}
}

function sndAjaxReq(url)
{
	if ( !operationInProgress )
	{
		operationInProgress = true;
    	http.open('get', url);
	    http.onreadystatechange = handleAjaxResponse;
	    http.send(null);
	}
	else
	{
		alert("Update operation is in progress now");
	}
}

function handleAjaxResponse() 
{
    if( http.readyState == 4 )
    {
    	operationInProgress = false;
    	
        if ( http.status != 200 || http.responseText.indexOf("ajax_update_ok") == -1 )
        {
        	alert("Operation failed. Status: " + http.status + ". Body: " + http.responseText);
        }
    }
}

function handleResponse() 
{
    if( http.readyState == 4 )
    {
        var response = http.responseText;
        document.getElementById("RSS").innerHTML = response;
    }
}