function wincenter(width,height,t)
{
  if(navigator.appName == "Microsoft Internet Explorer") {
   ascreenY = document.body.offsetHeight;
   ascreenX = window.screen.availWidth;
  }
  else 
  {
   ascreenY = window.outerHeight
   ascreenX = window.outerWidth
  }
	
	leftvar = (ascreenX - width) / 2;
  rightvar = (ascreenY - height) / 2;
  if(navigator.appName == "Microsoft Internet Explorer") 
	{
   leftprop = leftvar;
   topprop = rightvar;
  }
  else 
	{
   leftprop = (leftvar - pageXOffset);
   topprop = (rightvar - pageYOffset);
  }
	if(t=='L') return leftprop; else return topprop;

}

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

function toggleDiv(theDiv, classVedi, classNascondi)
{

  if(document.getElementById(theDiv).className==classVedi)
			{
    			document.getElementById(theDiv).className=classNascondi;
					document.getElementById('imm_'+theDiv).src='../images/back/piu.gif';
			}
			else if(document.getElementById(theDiv).className==classNascondi)
    	{
					document.getElementById(theDiv).className=classVedi;
					document.getElementById('imm_'+theDiv).src='../images/back/meno.gif';
			}
 
}

function openTab(vsNome,vsTitolo,vbStato, classVedi, classNascondi)
{
		var classe='';
		var imm='';
		if(vbStato)
		{
		classe=classVedi;
		imm='../images/back/meno.gif'
		
		}
		else
		{
		classe=classNascondi;
		imm='../images/back/piu.gif'
		
		}
	
	document.write('<br>');
	document.write('<table width="100%" cellspacing="0" cellpadding="0">');
	document.write('<tr>');
	document.write('<td valign=\"middle\" class="campo_sezionetit" width="150px">');
	document.write('<img id=\"imm_'+vsNome+'\" src=\"'+imm+'\">   <a href="javascript:toggleDiv(\''+vsNome+'\',\''+classVedi+'\',\''+classNascondi+'\')">'+vsTitolo+'</a>');
	document.write('</td>');
	document.write('<td class="campo_sezione">');
	document.write('&nbsp');
	document.write('</td>');
	document.write('</tr>');
	document.write('</table>');
	document.write('<br>');
	document.write('<div style="width:665px" id="'+vsNome+'" name="'+vsNome+'" class="'+classe+'">');
	}
	
function closeTab()
{
document.write('</div>');
}
