function ShowWin(name)
{
	//document.getElementById(name).style.left=(document.body.clientWidth-val)/2+"px";
	document.getElementById(name).style.top=(document.documentElement.scrollTop+60)+"px";
	document.getElementById(name).style.display="block";
	
	//if (name=="kommentbox") document.getElementById("comment_body").focus();
}

function HideWin(name)
{
   document.getElementById(name).style.display="none";  
}

function showWWF()
{
document.getElementById('wwf').style.display='block';
document.getElementById('legambiente').style.display='none';
document.getElementById('greenpeace').style.display='none';
document.getElementById('wb').className='wb_on';
document.getElementById('gb').className='gb_off';
document.getElementById('lb').className='lb_off';
}

function showLegambiente()
{
document.getElementById('wwf').style.display='none';
document.getElementById('legambiente').style.display='block';
document.getElementById('greenpeace').style.display='none';
document.getElementById('wb').className='wb_off';
document.getElementById('gb').className='gb_off';
document.getElementById('lb').className='lb_on';
}

function showGreenpeace()
{
document.getElementById('wwf').style.display='none';
document.getElementById('legambiente').style.display='none';
document.getElementById('greenpeace').style.display='block';
document.getElementById('wb').className='wb_off';
document.getElementById('gb').className='gb_on';
document.getElementById('lb').className='lb_off';
}


/*

function valoreCookie (nome) {
   var valore=document.cookie; //ottiene la stringa di cookie
   var inizioCookie=valore.indexOf(" " + nome + "="); //trova il cookie desiderato
 
   //se non esiste, magari è all'inizio della stringa
   if (inizioCookie == -1) { 
      inizioCookie = valore.indexOf(nome + "=");
   }
 
   if (inizioCookie == -1) { //il cookie non esiste proprio
      valore = null;
   }
 
   if (inizioCookie >= 0) //il cookie esiste
      //qui inizia la stringa del valore
      inizioCookie = valore.indexOf("=", inizioCookie) + 1; 
      var fineCookie = valore.indexOf(";", inizioCookie); //qui finisce
      if (fineCookie == -1)  //se non viene trovato, allora è l'ultimo cookie
         fineCookie = valore.length;
      //elimina i caratteri commutati
      valore = unescape(valore.substring(inizioCookie, fineCookie)); 
   }
 
   return valore;
}

function impostaCookie (nome, valore, scadenza) {
 
    if (scadenza == "") {
        var oggi = new Date();
        oggi.setMonth(oggi.getMonth() + 3);
        //restituisce la data nel formato necessario
        scadenza = oggi.toGMTString();
    }
    valore = escape(valore);
    document.cookie=nome + "=" + valore + ";expires=" + scadenza;
}


function swapStyle()
{
	var ora = new Date();
	
	ora.setDate(ora.getDate+7);
	
	actual=valoreCookie("tnstyle");
	
	if (actual=="nero")
	{
		impostaCookie("tnstyle","bianco", ora.toGMTString());
		
	}

	if (actual==-1)
	{
		impostaCookie("tnstyle","bianco", ora.toGMTString());
		
	}
	
	if (actual=="bianco")
	{
		impostaCookie("tnstyle","nero", ora.toGMTString());
		
	}

}
*/
