
	imm1on = new Image();
	imm1on.src = "images/log_fad_on.gif";
	imm2on = new Image();
	imm2on.src = "images/log_quality_on.gif";
	imm1off = new Image();
	imm1off.src = "images/log_fad.gif";
	imm2off = new Image();
	imm2off.src = "images/log_quality.gif";
	
	//funzione che uso per fare il rollover delle immagini
	function imageChange(imageID,imageName) 
	{
		document.images[imageID].src = eval(imageName + ".src");
	}
	
	
	function setscreen()
	{
		if (screen.width == 800 || screen.height == 600)
			{
					document.all.logo.style.left = 120
			}
			if (screen.width == 1024 || screen.height == 768)
			{
				//if (document.all)
				//{
					//document.all.logo.style.top = 550
					document.all.logo.style.left = 240
					//document.all.google.style.left = 240
				//}
				//if (document.layers)
				//{
					//document.logo_ns.top = 550
				//}
			}
			if (screen.width == 1152 || screen.height == 864)
			{
				//if (document.all)
				//{
					//document.all.logo.style.top = 650
					document.all.logo.style.left = 300
					//document.all.google.style.left = 330
				//}
				//if (document.layers)
				//{
					//document.logo_ns.top = 650;
				//	document.logo_ns.left = -150
				//}
			}
			if (screen.width == 1280 || screen.height == 1024)
			{
				//if (document.all)
				//{
					//document.all.logo.style.top = 800
					document.all.logo.style.left = 360
					//document.all.google.style.left = 420
				//}
				//if (document.layers)
				//{
					//document.logo_ns.top = 800
				//	document.logo_ns.left = -220
				//}
			}
	}
	function validate_form(tipo)
	{
		if(frm_arearis.usr.value == "")
		{
			alert("Inserire la Username")
		}
		else if(frm_arearis.pwd.value == "")
		{
			alert("Inserire la Password")
		}
		else
		{
			if (tipo == "quality")
			{
				frm_arearis.action = "http://www.quality.bicomega.it/default.asp"
			}
			else if(tipo == "FAD")
			{
				frm_arearis.action = "http://www.bicomega.it/fad/log.asp"
			}
			frm_arearis.submit();
		}
	}
	/*
	########################serie di script che rilevano la versione flash e la elaborano 
	*/

// Variabili globali
var flash2Installed = false;    // boolean. true se flash 2 è installed
var flash3Installed = false;    // boolean. true se flash 3 è installed
var flash4Installed = false;    // boolean. true se flash 4 è installed
var flash5Installed = false;    // boolean. true se flash 5 è installed
var flash6Installed = false;    // boolean. true se flash 6 è installed
var flash7Installed = false;    // boolean. true se flash 7 è installed
var flash8Installed = false;    // boolean. true se flash 8 è installed
var flash9Installed = false;    // boolean. true se flash 9 è installed

var maxVersion = 9;             //la versione più recente di flash
var actualVersion = 0;          // la versione installata nel computer Client
var hasRightVersion = false;    // boolean. true se è possibile inserire il flash
var requiredVersion = 7; // la versione minima che un client deve disporre

function detectFlash() {  
  
  var isIE  = (navigator.appVersion.indexOf("MSIE") != -1) ? true : false;    // true if we're on ie
  var isWin = (navigator.appVersion.toLowerCase().indexOf("win") != -1) ? true : false; // true if we're on windows
  var flashVersion = 0;
  
  //In IE/Win si procede a tentativi cercando di istanziare l'oggetto ActiveX ShockwaveFlash
  if(isIE && isWin){	
	var i=maxVersion + 1;
	var trovato = false;
	while( i>0 & trovato==false){
		i--;
		try{
			var flash = new ActiveXObject("ShockwaveFlash.ShockwaveFlash." + i);
			flashVersion = i;
			trovato = true;
		}
		catch(e){
		}
	}
  
  }
   // If navigator.plugins esiste...(Firefox.....)
  else if (navigator.plugins) {
    // ...then check for flash 2 or flash 3+.
    if (navigator.plugins["Shockwave Flash 2.0"]
        || navigator.plugins["Shockwave Flash"]) {

      // Una versione di Flash è stata riconosciuta.
      
      // Reference per flash 2.0.
      var isVersion2 = navigator.plugins["Shockwave Flash 2.0"] ? " 2.0" : "";
      var flashDescription = navigator.plugins["Shockwave Flash" + isVersion2].description;

      // DEBUGGING: decommentare la linea sottostante per visualizzare la descrizione.
      // alert("Flash plugin description: " + flashDescription);
      
      // Un flash plugin-description compare in questa maniera: Shockwave Flash 4.0 r5
      // We can get the major version by grabbing the character before the period
      // note that we don't bother with minor version detection. 
      // Do that in your movie with $version or getVersion().
      flashVersion = parseInt(flashDescription.substring(16));

    }
  }
  
  if (flashVersion != 0)
  {
	// Una versione di flash è stata trovata .
	// Utilizziamo  >= per le future versioni del flash
	// Il test IE/Win però parte dalla versione 9
	flash2Installed = flashVersion == 2;    
	flash3Installed = flashVersion == 3;
	flash4Installed = flashVersion == 4;
	flash5Installed = flashVersion == 5;
	flash6Installed = flashVersion == 6;
	flash7Installed = flashVersion == 7;
	flash8Installed = flashVersion == 8;
	flash9Installed = flashVersion >= maxVersion;
  
	// Ciclo for per valutare la versione installata
	// Settiamo il valore della  versione presente nel client
	for (var i = 2; i <= maxVersion; i++) {  
    if (eval("flash" + i + "Installed") == true) actualVersion = i;
	}
  
  }
    
  // Se siamo in msntv (formalmente webtv), la versione supportata è la 4
  // (come per 1 Gennaio , 2004). 
  if(navigator.userAgent.indexOf("WebTV") != -1) actualVersion = 4;  
  
  // Se l'utente ha una versione del flash idonea
  if (actualVersion >= requiredVersion) {
    //Settiamo il flag e demandiamo a flash-swap.js
    // la scrittura dei tag html.
    hasRightVersion = true;                
  } 

}

detectFlash();  // Richiamiamo la funzione





	function swap(Flash, Image, alternateImg, larghezzaFlash, altezzaFlash, larghezzaImg, altezzaImg)
	{      
	if(hasRightVersion) {  // Se la versione del flash è accettabile (Version=> 7; in IE/WIN  7<=Version<=9)
		var oeTags = 	
		'<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" width="'+larghezzaFlash+'" height="'+altezzaFlash+'" " >'
		+	'<param name="allowScriptAccess" value="sameDomain" />'
		+	'<param name="movie" value="'+Flash+'" />'
		+	'<param name="quality" value="high" />'
		+	'<param name="bgcolor" value="#000000" />'
		+	'<param name="wmode" value="transparent" />'
		+	'<param name="scale" value="exactfit" />'
		+	'<param name="align" value="middle" />'
		+	'<embed src="'+Flash+'" wmode="transparent" align="middle" scale="exactfit" quality="high" bgcolor="#000000" width="'+larghezzaImg+'" height="'+altezzaImg+'" name="ideeper" align="right" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />'
		+	'</object>'
		document.write(oeTags);   // Inserisce  il filmato flash
		
	} else if (Image!=''){  // Il flash non può essere visualizzato correttamente è l'immagine alternativa non è nulla
		var alternateContent = '<img class="imgAlign"src="'+ Image +'" width="'+larghezzaImg+'" height="'+altezzaImg+'" alt="'+ alternateImg +'" title="'+ alternateImg +'" />'
		document.write(alternateContent);  // Inserisce l'immagine alternativa
	}
	}
