function openChat(){
	msg=open("chat.php","","width=600,height=400 ,toolbar=no, location=no,status=no,menubar=no,scrollbars=yes,resizable=yes");
}
function Stat(tipo,cod){
	Stat(tipo,cod,"")
}
function Stat(tipo,cod,anno){
	lun="";
	res="yes";
	if(tipo==1) str = "rendimento.php?tipo=champ&team="+cod;
	else if(tipo==2) str = "riepilogo.php?tipo=champ&team="+cod;
	else if(tipo==3){
		str = "stat_ind.php?tipo=champ&statistica="+cod+"&anno="+anno;
		lun=",width=500,height=600";
	}else if(tipo==4){
		str = "stat_ind.php?tipo=cup&statistica="+cod+"&anno="+anno;
		lun=",width=500,height=600";
	}else if(tipo==5){
		str = "stat_ind.php?tipo=seriea&statistica="+cod+"&anno="+anno;
		lun=",width=500,height=600";
	}else if(tipo==6){
		str = "inserimento2.php?tipo=champ";
	}else if(tipo==7){
		str = "insert.php?tipo=champ";
	}else if(tipo==8){
		str = "insert.php?tipo=cup";
	}else if(tipo==9){
		str = "view1.php?cod="+cod;
		lun=",width=750,height=650";
	}else if(tipo==10){
		str = "dati/organico/"+cod+".jpg";
		lun=",width=190,height=140";
	}else if(tipo==11){
		str = "com_view.php?cod="+cod;
		lun=",width=300,height=200";
		res="no";
	}else if(tipo==12){
		str = "com_list.php?cod="+cod;
		lun=",width=750,height=650";
		res="no";
	}
	msg=open(str,"","resizable="+res+",toolbar=no,directories=no,menubar=no,scrollbars=yes"+lun);
}
function Grafico(){
	msg=open("grafico.php","","resizable=yes,toolbar=no,directories=no,menubar=no,scrollbars=yes,width=900,height=600");
}
/*
//functions.js
//Create a boolean variable to check for a valid IE instance.
var xmlhttp = false;
//Check if we are using IE.
try {
	//If the javascript version is greater than 5.
	xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
} catch (e) {
	//If not, then use the older active x object.
	try {
		//If we are using IE.
		xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
	} catch (E) {
		//Else we must be using a non-IE browser.
		xmlhttp = false;
	}
}

//If we are using a non-IE browser, create a JavaScript instance of the object.
if (!xmlhttp && typeof XMLHttpRequest != 'undefined') {
	xmlhttp = new XMLHttpRequest();
}

function getData(dataSource, divID){
	if(xmlhttp) {
		var obj = document.getElementById(divID);
		xmlhttp.open("GET", dataSource);
		xmlhttp.onreadystatechange = function(){
			if (xmlhttp.readyState == 4 && xmlhttp.status == 200) {
				obj.innerHTML = xmlhttp.responseText;
			}
		}
		xmlhttp.send(null);
	}
}
*/