function getClientWidth() {
if (window.innerWidth)
	theWidth=window.innerWidth;
else if (document.documentElement && document.documentElement.clientWidth)
	theWidth=document.documentElement.clientWidth;
else if (document.body)
	theWidth=document.body.clientWidth;
	return theWidth;
}
function getClientHeight() {
if (window.innerHeight)
	theHeight=window.innerHeight;
else if (document.documentElement && document.documentElement.clientHeight)
	theHeight=document.documentElement.clientHeight;
else if (document.body)
	theHeight=document.body.clientHeight;
	return theHeight;
}

//presente anche in common.js dei template.
function getAjax() {
	var XHR = null;
	browser = navigator.userAgent.toUpperCase();
	if(typeof(XMLHttpRequest) === "function" || typeof(XMLHttpRequest) === "object") {
		XHR = new XMLHttpRequest();
	} else if(window.ActiveXObject && browser.indexOf("MSIE 4") < 0) {
		if(browser.indexOf("MSIE 5") < 0) {
			XHR = new ActiveXObject("Msxml2.XMLHTTP");
		} else {
			XHR = new ActiveXObject("Microsoft.XMLHTTP");
		}
	}
	return XHR;
}
