function apriEmail() {
		document.getElementById('contact').style.visibility='visible'; 
		completeAHAH.ahah('contatta.html', 'contact', '', 'GET', '', this);
}
function chiudiEmail() {
		document.getElementById('contact').style.visibility='hidden'; 
		completeAHAH.ahah('contatta.html', 'contact', '', 'GET', '', this);
}
function inviaEmail() {
		//document.getElementById('contact').style.visibility='hidden'; 
		completeAHAH.ahah('contatta.php', 'contact', '', 'GET', '', this);		
}

function showTab(name) {		completeAHAH.ahah('toptabmenu/'+name+'.php', 'topcontent', '', 'GET', '', this);
}

function openPopupDettagliTrasmissione2(anno,numero)
{
  WindowObjectReference = window.open("data/trasmissione/"+anno+"/"+numero+".html",
        "DescriptiveWindowName",
        "width=670,height=550,resizable,scrollbars=yes,status=1,statusbar=no");
}
function openPopupDettagliTrasmissione(anno,numero)
{
		completeAHAH.ahah('data/trasmissione/'+anno+'/'+numero+'.html', 'archivio', '', 'GET', '', this);
}

function advShowCode(id)
{
		document.getElementById(id).style.visibility='visible';
		document.getElementById(id).rows='5';
		document.getElementById(id).cols='60';
}
function addEvent(elm, evType, fn, useCapture)
// addEvent and removeEvent
// cross-browser event handling for IE5+,  NS6 and Mozilla
// By Scott Andrew
{
  if (elm.addEventListener){
    elm.addEventListener(evType, fn, useCapture);
    return true;
  } else if (elm.attachEvent){
    var r = elm.attachEvent("on"+evType, fn);
    return r;
  } else {
    alert("Handler could not be removed");
  }
} 
function mostradettagli(object) {
		document.getElementById('dettagliWin').style.visibility='visible'; 
		//ahah('data/squadra/'+object+'.html', 'dettagli');
		completeAHAH.ahah('data/squadra/'+object+'.html', 'dettagli', '', 'GET', '', this);
}

function Button1_onclick() 
{
    //faccio la richiesta alla pagina a.asp che restituisce
    //<p>Ciao</p><_script language=\"javascript\">alert('pippo')</_script>
    //ajax("a.asp", onload);
    //showTab('photogalleryload');
    function onload()
    {
		//t contiene la risposta
		var t = this.request.responseText;
		
		//execJS esegue javascript contenuto in t e restituisce
		//t senza javascript
		t = execJS(t);
		
        //finalmente metto t 'pulito' dento il div
        $("div1").innerHTML = t;
        
    }
}