function checkFlashVersion() {
  var reqVer=7;
  var plugin = (navigator.mimeTypes &&
  navigator.mimeTypes["application/x-shockwave-flash"]) ?
  navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin : 0;
  var isVerOk=false;
  if (plugin) {
    var words = navigator.plugins["Shockwave Flash"].description.split(" ");
	  var flaVer;
      for (var i = 0; i < words.length; i++){
          if (isNaN(parseInt(words[i]))){
              continue;
		  }
          flaVer = words[i];
		  break;
      }
      isVerOk = (flaVer >= reqVer);
  }
  else if (navigator.userAgent && navigator.userAgent.indexOf("MSIE")>=0 && (navigator.appVersion.indexOf("Win") != -1)){
    try {
		  var instance=new ActiveXObject("ShockwaveFlash.ShockwaveFlash."+reqVer);
		  isVerOk = true;
	  }
      catch (e){isVerOk=false}
  }
  return isVerOk;
}

	

function writeFlashObject(movie, qs, width, height){
	document.write(
	   '<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"\n'+
	   ' codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0"\n'+
	   ' WIDTH="' + width + '" HEIGHT="' + height + '">\n'+
	   ' <PARAM NAME=movie VALUE="' + movie + '">\n'+
	   ' <PARAM NAME=FlashVars VALUE="'+qs+'">\n'+
	   ' <PARAM NAME=quality VALUE=high>\n'+
	   ' <PARAM NAME=menu VALUE=false>\n'+
	   ' <PARAM name="wmode" VALUE="transparent">\n'+
	   ' <EMBED src="' + movie +'"\n'+
	   '  FlashVars="'+qs+'"\n'+
	   '  wmode="transparent" ' +
	   '  quality=high menu="false" WIDTH="' + width + '" HEIGHT="' + height +
	   '  TYPE="application/x-shockwave-flash"\n'+
	   '  PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer"></EMBED>\n'+
	   '</OBJECT>');
}

	
function apripop(theURL,winName,features) { 
 
 myv=window.open(theURL,winName,features);

 
}


//funzione  INGRANDIMENTO
function lentep() {
//l'ingrandimento avviene moltiplicando per 2 i valori
//di altezza e larghezza dell'immagine
document.img1.width=document.img1.width*2
document.img1.height=document.img1.height*2
}
//funzione che rimpicciolisce
function lentem() {
//idem come sopra ma dividendo per 2
document.img1.width=document.img1.width/2
document.img1.height=document.img1.height/2
}



//funzione  SHOW PREVIEW
function showimg1()
 { 
document.getElementById('img1').style.display='block';
} 
function hideimg1()
 { 
document.getElementById('img1').style.display='none';
} 
function showimg2()
 { 
document.getElementById('img2').style.display='block';
} 
function hideimg2()
 { 
document.getElementById('img2').style.display='none';
} 
function showimg3()
 { 
document.getElementById('img3').style.display='block';
} 
function hideimg3()
 { 
document.getElementById('img3').style.display='none';
} 
function showimg4()
 { 
document.getElementById('img4').style.display='block';
} 
function hideimg4()
 { 
document.getElementById('img4').style.display='none';
} 
function showimg5()
 { 
document.getElementById('img5').style.display='block';
} 
function hideimg5()
 { 
document.getElementById('img5').style.display='none';
} 
function showimg6()
 { 
document.getElementById('img6').style.display='block';
} 
function hideimg6()
 { 
document.getElementById('img6').style.display='none';
} 


function Mostra(testo)
{
  livello.innerHTML = testo; // IMPOSTA IL TESTO NEL LIVELLO
  livello.style.visibility = "Visible"; // MOSTRA IL LIVELLO
  livello.style.position = "Absolute"; // POSIZIONA IL LIVELLO IN MODALITA' ASSOLUTA
  livello.style.left = event.clientX - 400; // IMPOSTA LE COORDINATE IN ORIZZONTALE
  livello.style.top = event.clientY + 15; // IMPOSTA LE COORDINATE IN VERTICALE
}
function Nascondi()
{
  livello.style.visibility = "Hidden"; // NASCONDE IL LIVELLO
}

/*'var _POPUP_FEATURES = 'resizable=yes,location=0,statusbar=0,menubar=0,width=800,height=600,scrollbars=yes';
'
'function raw_popup(url, target, features) {
'    // pops up a window containing url optionally named target, optionally having features
'    if (isUndefined(features)) features = _POPUP_FEATURES;
'    if (isUndefined(target  )) target   = '_blank';
'    var theWindow = window.open(url, target, features);
'    theWindow.focus();
'    return theWindow;
'}
'
'function link_popup(src, features) {
'    // to be used in an html event handler as in: <a href="..." onclick="link_popup(this,...)" 
'	//..
'    // pops up a window grabbing the url from the event source's href
'    return raw_popup(src.getAttribute('href'), src.getAttribute('target') || '_blank', features);
'}*/