// JavaScript Document
 function menu(nomeDiv,azione,menuPrincipale){
      document.getElementById(nomeDiv).style.display=azione;
	  /*if(azione=="visible")
	    document.getElementById(menuPrincipale).style.height="60px";
		else
		 document.getElementById(menuPrincipale).style.height="20px";
		 */
  }
  
  function dimensioneSchermo(){
     
//      if(screen.Height==1024)
//        document.getElementById("container").style.height=761;
//      else if(screen.Height==960)
//        document.getElementById("container").style.height=697;
//      else if(screen.Height==768)
//        document.getElementById("container").style.height=505;

        
  }
  
    
    
  
  function centerPopUp(larghezza,altezza){
	    var _top;
		var _left;
		_top=0;
		_left=0;
	   l=screen.width;
	   h=screen.height;
	   _top=(parseInt(h)/2)-((altezza)/2);
	   _left=(parseInt(l)/2)-(larghezza/2);
	   
	   window.moveTo(_top,_left)
  }  
  
   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="#f5f5f5" 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 swapImageMenu(obj, strImage)
{
    document.getElementById(obj).src="images/" + strImage;
}


function chiudiDivVideo(obj)
    {
       
       document.getElementById("lblCodiceVideo").innerHTML = "";
       document.getElementById(obj).style.display="none";
       
       return true;
    } 

   


function apriVideo(path,img,nota){
	  
	  document.getElementById("lblTitoloVideo").innerHTML = nota;
	  
	   var so = new SWFObject("video/flvplayer.swf","video","500","282","8","#000000");  	   
	   so.addParam("allowfullscreen","true");
	   so.addParam("allowscriptaccess","always");
	   so.addVariable("file",path);  
	   so.addVariable('image',img); 
	   so.addVariable("displayheight","2000"); 
	   //so.addVariable("width","320"); 
	   //so.addVariable("height","240");	   
	   so.addParam("scale", "maintainAspectRatio"); // "maintainAspectRatio", "noScale", "fitToWindow"   	   
	   so.write("lblCodiceVideo");	
	   
	   document.getElementById("divVideo").style.display="block";
	   
	   
	   return false;
	   	     
  }  
