﻿// File JScript

function menu(nomeDiv,azione,menuPrincipale){
      document.getElementById(nomeDiv).style.display=azione;
	  
	  
		
  }
  
  
  function coloraRigaSottoMenu(riga,azione){
	  var coloreOn="#CCCCCC";
	  var coloreOff="";
	  
	  if(azione=="on")
	  	riga.style.backgroundColor=coloreOn;
	  else
	  	riga.style.backgroundColor=coloreOff;
	   
  }
  
  
  function fotoGrande(x,larghezza,altezza)
  {
	xtop = ((screen.height - altezza) /2);
	xleft = ((screen.width - larghezza) /2);
	xaltezza = parseInt(altezza)+25;
	xlarghezza = larghezza;
	
	
	xtools="top="+ xtop +",left="+ xleft +"toolbar=no,"
	xtools+="location=no,directories=no,status=no,menubar=no,"
	xtools+="scrollbars=no,resizable=no,copyhistory=no,width="+ xlarghezza +",height="+ xaltezza;
	
	win = window.open('','',xtools);
	
	Html='<html>';
	Html+='<head>';
	Html+='<title>FOTO</title>';
	Html+='<style type="text/css">';
	Html+='html,body {margin:0;}';
	Html+='body {font:11px Arial; color:#000000;}';
	Html+='a {color:#483D8B;text-decoration:none;font-weight:bold;}';
	Html+='a:hover {color:#000000;text-decoration:none;font-weight:bold;}';
	Html+='</style>';
	Html+='</head>';
	Html+='<body bgcolor="#CCCCCC" onload="window.self.focus();">';
	Html+='<div align="center"><img src="'+ x +'" alt="" border=""><br><div style="margin-top:5px;">';
	Html+='<a href="#" onclick="window.self.close();">&#149; Chiudi &#149;</a></div></div></body></html>';
	
	win.document.write(Html);
	win.focus();

	return false;
}    


function apriVideo(path){	  
	   var so = new SWFObject("video/flvplayer.swf","video","480","270","8","#000000");  	   
	   so.addParam("allowfullscreen","true");
	   so.addParam("allowscriptaccess","always");
	   so.addVariable("file",path);  
	   so.addVariable('image','video/logo.jpg'); 
	   so.addVariable("displayheight","2000"); 
	   //so.addVariable("width","320"); 
	   //so.addVariable("height","240");	   
	   so.addParam("scale", "maintainAspectRatio"); // "maintainAspectRatio", "noScale", "fitToWindow"   	   
	   so.write("divVideo");	
	   
	   
	   return false;
	   
	   
	  
	     
  }  

