function callWS(sezione,mese,anno,lang){
	try{	 	
		var xmlHttp = SOAPClient._getXmlHttp();
		xmlHttp.open("POST", window.location.protocol + "//" + window.location.host + "/azienda/"+lang+"/investor_relations/box_cal.aspx?categoria="+sezione+"&mese="+mese+"&anno="+anno+"&calPostBack=S&Lang=" + lang, true);
		xmlHttp.onreadystatechange=function() {
		  if (xmlHttp.readyState==4) {
			var text = xmlHttp.responseText;
			if (text){
				var obj = window.document.getElementById("box_calendario").parentNode.parentNode;
				if (obj != null){
					obj.innerHTML = text;
				}
			}
		  }
		 }
		xmlHttp.send("");
	}catch(e){
		alert("Errore:"+e.description);
	}
}

function SOAPClient(){}

SOAPClient._getXmlHttp = function()
{
	try
	{
		if(window.XMLHttpRequest)
		{
			var req = new XMLHttpRequest();
			// some versions of Moz do not support the readyState property and the onreadystate event so we patch it!
			if(req.readyState == null)
			{
				req.readyState = 1;
				req.addEventListener("load",
									function()
									{
										req.readyState = 4;
										if(typeof req.onreadystatechange == "function")
											req.onreadystatechange();
									},
									false);
			}
			return req;
		}
		if(window.ActiveXObject)
			return new ActiveXObject(SOAPClient._getXmlHttpProgID());
	}
	catch (ex) {}
	throw new Error("Your browser does not support XmlHttp objects");
}
SOAPClient._getXmlHttpProgID = function()
{
	if(SOAPClient._getXmlHttpProgID.progid)
		return SOAPClient._getXmlHttpProgID.progid;
	var progids = ["Msxml2.XMLHTTP.5.0", "Msxml2.XMLHTTP.4.0", "MSXML2.XMLHTTP.3.0", "MSXML2.XMLHTTP", "Microsoft.XMLHTTP"];
	var o;
	for(var i = 0; i < progids.length; i++)
	{
		try
		{
			o = new ActiveXObject(progids[i]);
			return SOAPClient._getXmlHttpProgID.progid = progids[i];
		}
		catch (ex) {};
	}
	throw new Error("Could not find an installed XML parser");
}

function setSpalla(l) 
{
	var broName=navigator.appName;
	var broVers=navigator.appVersion;
	
	if (broName == "Microsoft Internet Explorer" && broVers.indexOf("MSIE 7.0")>0) { // Solo per IE7
		if (l=="f" || l=="h") {
			var con1 = document.getElementById("con1").clientHeight-160;
			var con2 = document.getElementById("con2").clientHeight-160;
			var con = con1+con2;
			if (l=="h") {
				var bsx = document.getElementById("bsx").clientHeight;
				var bdx = document.getElementById("bdx").clientHeight;
			}
		} else {
			var con = document.getElementById("con").clientHeight-320;
		}
		document.getElementById("ssx").style.height = con;
		document.getElementById("sdx").style.height = con;
		if (l!="h") {
			document.getElementById("con").style.height = document.getElementById("ssx").clientHeight;
		}
		if (l=="h") {
			if (bsx>bdx) {
				document.getElementById("bdx").style.height = document.getElementById("bsx").clientHeight;
			} else if (bsx<bdx) {
				document.getElementById("bsx").style.height = document.getElementById("bdx").clientHeight;
			}
		
		}

	}
}
