// ajax init...
function createRequestObject()
{
	var xmlHttp=null;
	try
	{
 		// Firefox, Opera 8.0+, Safari
 		xmlHttp=new XMLHttpRequest();
 	}
	catch (e)
 	{
 		//Internet Explorer
	 	try
	  	{
	  		xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
	  	}
 		catch (e)
	  	{
	  		xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
	  	}
	}
	return xmlHttp;
}

var http = createRequestObject();

// noutati ajax...
function noutatiDinamic_handleResponse()
{
	if (http.readyState==4 || http.readyState=="complete")
	{
		var response = http.responseText;
		document.getElementById('noutatiDinamic').innerHTML = response;
	}
}

function noutatiDinamic_generate()
{
	var el = document.getElementById('noutatiDinamic');
	if (el)
	{
		http.open('GET', 'boxes/noutati.html');
		http.onreadystatechange = noutatiDinamic_handleResponse;
		http.send(null);	
	}
}