// JavaScript Document
function ApriGruppo(cosa)
{
	var d=document.getElementById(cosa).style;
	d.display=d.display!="block"?"block":"none";
}
function MostraLog()
{
	var x=window.open("admin/trylog.htm","full","resizable=yes,menubar=no,locationbar=no,toolbar=no,statusbar=no,width=250,height=150");
	x.moveTo((screen.availWidth-250)/2,(screen.availHeight-150)/2 );
	x.focus();
}

function Evidenza()
{
	var x=window.open("evidenza.php","notice","resizable=yes,menubar=no,locationbar=no,toolbar=no,statusbar=no,width=640,height=480");
	x.focus();
	
}
function Dimensiona()
{
		x= screen.availWidth;
		y=screen.availHeight;
		g=Math.ceil(14600/x)*1.5;
		if(document.getElementById("MnSx"))
		{
			document.getElementById("MnSx").style.width=g+"%";
		}
		if(document.getElementById("MnDx"))
		{
			document.getElementById("MnDx").style.width=g+"%";
		}
}

/*function Sponsor()
{
	d=document.getElementById("sponsor");
	d.style.display=d.style.display!="block"?"block":"none";

}*/

function Sponsor_layer()
{
/***********VERSIONE LAYER **********/
	c=document.getElementById("pagina").contentDocument?document.getElementById("pagina").contentDocument.getElementById("main_content"):document.frames["pagina"].document.getElementById("main_content");
	c.style.display="none";
		g=document.getElementById("sponsor");
		d=document.getElementById("detSponsor");
		ht=0;
		if (window.pageYOffset)
			ht=window.pageYOffset+10;
			
		else if (document.documentElement.scrollTop)
// IE6 +4.01 but no scrolling going on
			ht=document.documentElement.scrollTop+10;
			
		else if (document.body.scrollTop)
		// IE5 or DTD 3.2
			ht=document.body.scrollTop+10;
				
		g.style.top = ht + "px";
		g.style.display=g.style.display!="block"?"block":g.style.display;
/**********************************/
}
function Sponsor_pagina(pagina)
{
	document.getElementById("pagina").src="main.php?p="+pagina;
}
function sponsorClose()
{
	document.getElementById("sponsor").style.display="none";
		c=document.getElementById("pagina").contentDocument?document.getElementById("pagina").contentDocument.getElementById("main_content"):document.frames["pagina"].document.getElementById("main_content");
	c.style.display="";

}

var tO;
function Muovi(quanto)
{
	c=document.getElementById("pagina").contentDocument?document.getElementById("pagina").contentDocument.getElementById("main_content"):document.frames["pagina"].document.getElementById("main_content");
	c.scrollTop+=quanto?10:-10;
	tO=setTimeout("Muovi("+quanto+")",30);
}

function Ferma()
{
	clearTimeout(tO);
}


function GO_Page(destinazione)
{

	if(destinazione.length>0)
	{
		document.getElementById("pagina").src=destinazione;
	}
}
var FUORI="";
function Open_Son(quale)
{
	c=document.getElementById("son_of_"+quale);
	if(FUORI && FUORI!=c)
	{
		FUORI.style.display="none";
	}	
	c.style.display=c.style.display!="block"?"block":"none";
	FUORI=c;
}
function MostraLog()
{
	var x=window.open("admin/trylog.htm","full","resizable=yes,menubar=no,locationbar=no,toolbar=no,statusbar=no,width=250,height=150");
	x.moveTo((screen.availWidth-250)/2,(screen.availHeight-150)/2 );
	x.focus();
}

function Stampa_Articolo(id)
{
	x=window.open("prnart.php?id="+id);
	x.focus();
}

function fnGO(targ)
{
	c=document.getElementById("pagina").contentDocument?document.getElementById("pagina").contentDocument:document.frames["pagina"].document;
	c.getElementById(targ).scrollTop=0;
}


