function start_xmlhttp( script, contentID )
{
	var method = "POST";
	var html_to_load;
	var xmlhttp;
	xmlhttp = xmlhttp_init();
	if ( xmlhttp )
	{
		html_to_load = xmlhttp_request( xmlhttp, script, method, contentID );
		//xmlhttp_action( contentID, html_to_load );
		
	}else
	{
		alert("cos nie tak");
		return false;
	}
}

function xmlhttp_init()
{
	var xmlhttp=false;
	/*@cc_on @*/
	/*@if (@_jscript_version >= 5)
	// JScript gives us Conditional compilation, we can cope with old IE versions.
	// and security blocked creation of the objects.
	try {
		xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
	} catch (e) {
		try {
	   		xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
	  	} catch (E) {
	   		xmlhttp = false;
	  	}
	}
	@end @*/
	if (!xmlhttp && typeof XMLHttpRequest!='undefined') {
	  	xmlhttp = new XMLHttpRequest();
	}
	if ( xmlhttp )
	{
		return xmlhttp;
	}else
	{
		alert( "Could not create connection object." );
		return false;
	}
}

function xmlhttp_request( xmlhttp, script, method, contentID )
{
	var contentObj = document.getElementById(contentID);
	var html_to_load;
	xmlhttp.open( method, script + "&xmlhttp=1", true);
 	xmlhttp.onreadystatechange=function() {
  		if (xmlhttp.readyState==4) {
   			html_to_load = xmlhttp.responseText;
   			contentObj.innerHTML = html_to_load;
  		}else
  		{
  			html_to_load = "trwa wczytywanie...";
  			contentObj.innerHTML = html_to_load;
  		}
 	}
 	xmlhttp.send(null);
 	
 	//return html_to_load;
}

function xmlhttp_action( contentID, html_to_load )
{
	var contentObj = document.getElementById(contentID);
	contentObj.innerHTML = html_to_load;
}