//File di stile.
//SVILUPPATORE: 	DAVIDE LOFFREDO
//PROGETTO:     	MAYOTTE
//DATA CREAZIONE: 20 MARZO 2000

function ApriFinestra(destinazione,nome) 
{
	msg=open(destinazione,nome,"left=0,top=0,width=790,height=545,scrollbars=yes,resizable=no");
}
function ApriDida(destinazione)
{
	finestra=open(destinazione,"","left=0,top=0,width=300,height=300,scrollbars=yes,resizable=no");
}
function ApriLink(destinazione,nome) 
{
	finestra=open(destinazione,nome);
}
function Apri(destinazione)
{
	finestra=open(destinazione,"");
}
function Chiudi()
{
	window.close();
}

////////////////////////
//Inizio Menu laterale//
////////////////////////
	ie=document.all?1:0;
	n=document.layers?1:0;

	lshow=71;
	var move=10;
	menuSpeed=40;
	var moveOnScroll=true;
	var tim;
	var ltop;

	//Costruttore
	function makeMenu(obj,nest)
	{
		nest=(!nest) ? '':'document.'+nest+'.';
		this.css=(n) ? eval(nest+'document.'+obj):eval(obj+'.style');
		this.state=1;
		this.go=0;
		this.width=n?this.css.document.width:eval(obj+'.offsetWidth');
		this.left=b_getleft;
		this.obj = obj + "Object"; 	
		eval(this.obj + "=this");
	}

	//Cattura Posizione.
	function b_getleft()
	{
		var gleft=(n) ? eval(this.css.left):eval(this.css.pixelLeft);
		return gleft;
	}

	function moveMenu()
	{
		if(!oMenu.state)
		{
			clearTimeout(tim);
			mIn();
		}
		else
		{
			clearTimeout(tim);
			mOut();
		}
	}

	function mIn()
	{
		if(oMenu.left()>-oMenu.width+lshow)
		{
			oMenu.go=1;
			oMenu.css.left=oMenu.left()-move;
			tim=setTimeout("mIn()",menuSpeed);
		}
		else
		{
			oMenu.go=0;
			oMenu.state=1;
		}	
	}

	function mOut()
	{
		if(oMenu.left()<0)
		{
			oMenu.go=1;
			oMenu.css.left=oMenu.left()+move;
			tim=setTimeout("mOut()",menuSpeed);
		}
		else
		{
			oMenu.go=0;
			oMenu.state=0;
		}	
	}

	function checkScrolled()
	{
		if(!oMenu.go) 
			oMenu.css.top=eval(scrolled)+ltop;
		if(n) 
			setTimeout('checkScrolled()',30);
	}

	function menuInit()
	{
		oMenu=new makeMenu('Menu');
		scrolled=n?"window.pageYOffset":"document.body.scrollTop";
		oMenu.css.left=-oMenu.width+lshow;
		ltop=(n)?oMenu.css.top:oMenu.css.pixelTop;
		oMenu.css.visibility='visible'
		if(moveOnScroll) 
			ie?window.onscroll=checkScrolled:checkScrolled();
	}
//////////////////////
//Fine menu laterale//
//////////////////////