//ajax menu script
var ajaxdestination="";

function display(what,where) {

	//create xmlhttprequest object
	try {
		xmlhttp = window.XMLHttpRequest?new XMLHttpRequest():
  		new ActiveXObject("Microsoft.XMLHTTP");
	}
	
	catch (e) { /* do nothing */ }

	// store destination div
	ajaxdestination=where;
	
	 //when request finished call function to exchange data
	xmlhttp.onreadystatechange = triggered;
	xmlhttp.open("GET", what);
	xmlhttp.send(null);
	return false;
}

// put data returned by requested url to selected div
function triggered() {
	if (xmlhttp.readyState == 4) 
		if (xmlhttp.status == 200) 
			document.getElementById(ajaxdestination).innerHTML =xmlhttp.responseText;
}


