
/*******************************************************
* Pagina: scripts.js
* Descrizione: funzioni javascript/Ajax
* Note: Attualmente non usato
* Autore: L.Conti, 20.08.2007
* Mail: info@arcanet.ch
* Copyright (c) Arcaweb.ch - Tutti i diritti riservati
********************************************************/

function show_content(xpage) {
	live_el_input = document.getElementById('live_input');
	content_div = document.getElementById('main_content');

	/*@cc_on @if (@_win32 && @_jscript_version >= 5) if (!window.XMLHttpRequest)
	window.XMLHttpRequest = function() { return new ActiveXObject('Microsoft.XMLHTTP') }
	@end @*/
	
	this.req = new XMLHttpRequest();
	req.open('GET', xpage, true);
	req.onreadystatechange = function (aEvt) {
		if (req.readyState == 4) {
			if(req.status == 200){
				if (req.responseText){
					content_div.innerHTML = req.responseText;
				}
			} else {
				alert('Page not found: '+xpage);
				/*content_div.innerHTML =  'XMLHttp Error' ;*/
			}
		}
	}
	req.send(null); 
	
}
