<!-- 
 
function scrivi_h (txt,dim,classe,col){
	document.write("<object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0' width='0' height='0' class='"+ classe +"'>");
	document.write("    <param name='movie' value='/swf/scrivi_h.swf?txt="+ txt +"&dim="+ dim +"&col="+ col +"' />");
	document.write("    <param name='wmode' value='transparent' />");
	document.write("    <embed src='/swf/scrivi_h.swf?txt="+ txt +"&dim="+ dim +"&col="+ col +"' wmode='transparent' pluginspage='http://www.macromedia.com/go/getflashplayer' type='application/x-shockwave-flash' width='0' height='0' class='"+ classe +"'></embed>");
	document.write("  </object>");
}

/*

Utilizzo funzione "scrivi_h"
_______________________________


scrivi_h("Informazioni generali",32,"tit_pag","0xcc0000")

		- Stringa visualizzata - corpo - classe - colore

::::::::::::::::::::::::::::

Stringa visualizzata 
Essendo un campo di testo in formato html utilizzare la conversione dei caratteri speciali (à, &egrave;, ecc) in formato ncr (&agrave;, &egrave;, ecc)

::::::::::::::::::::::::::::

Corpo 
Utilizzare le seguenti diemnsioni per la formattazione:

h1: 32
h2: 26
h3: 22
h4,h5,h6 : non testati e non utilizzati perch&egrave; inutili

::::::::::::::::::::::::::::

Classe 
Dato che gli swf vengono pubblicati con width = 0 e height = 0, viene associata di volta in volta una classe specifica.
Utlizzare le classi preimpostate seguenti per l'utilizzo nelle pagine interne:

.tit_pag		{ width:500px; height:50px; margin:42px 0 0 25px; }
Classe del titolo h1 con bg

.h2_pag			{ width:500px; height:40px; margin:5px -5px; padding:0 }
Classe del titolo h2

.h3_pag			{ width:500px; height:50px; }
Classe del titolo h3

Queste classi sono già testate e presenti su style.css.
Evenutulamente aggiungere delle ulteriori classi in caso di necessità.
Risordarsi di aggiungere il contenuto alternativo all'interno delle pag nei tag h.

::::::::::::::::::::::::::::

Colore
E' possibile personalizzare il colore del risultato finale con il colore esadecimale
Di default il colore &egrave; il rosso scuro ("0xCC0000");

::::::::::::::::::::::::::::

*/

function showRef(a) {
	if(document.getElementById(a).style.display != 'block') {
		document.getElementById(a).style.display = 'block';
	} else {
		document.getElementById(a).style.display = 'none';
	}
}

var numero_random = (Math.random()*1000);

//defult status
defaultStatus = "AITA NAZIONALE - Associazione Italiana di Tecnologia Alimentare"

// tira fuori dal frameset
setTimeout ("Killer()", 0);
function Killer()
    {
    if (self.parent.frames.length != 0)
    if (self.parent.location != document.location)
    {self.parent.location=document.location};
}

// javascript:PopupPic('imm/1.jpg')
function PopupPic(sPicURL) { 
	window.open("../popup.htm?"+sPicURL, "", "resizable=0,height=10,width=10");
}

// pop up NO SCROLL
function winnoscroll(pag,w,h,nome) {
  var l = Math.floor((screen.availWidth-w)/2); 
  var a = Math.floor((screen.availHeight-h)/2);
  fin = window.open(pag,nome,"width="+w+",height="+h+",menubar=no,toolbar=no,resizable=no,scrollbars=no,left=" + l + ",top=" + a);
}

// pop up CON SCROLL
function winscroll(pag,w,h,nome) {
  var l = Math.floor((screen.availWidth-w)/2); 
  var a = Math.floor((screen.availHeight-h)/2);
  fin = window.open(pag,nome,"width="+w+",height="+h+",menubar=no,toolbar=no,resizable=no,scrollbars=yes,left=" + l + ",top=" + a);
}

//
isIE = isIE4 = isIE5 = isIE6 = isIE7 = isNS = isNS4 = isNS6 = isNS7 = isNS8 = isFlash5 = isFlashMX = false;

// Browser Detection
if(navigator.appName.indexOf('Netscape') == 0) isNS = true;
if(navigator.appName.indexOf('Microsoft') == 0) isIE = true;
isUNIX = (window.navigator.appVersion.indexOf("X11") != -1) ||
         (window.navigator.appVersion.indexOf("Linux") != -1) ||
         (window.navigator.appVersion.indexOf("SunOS") != -1) ||
         (window.navigator.appVersion.indexOf("IRIX") != -1) ||
         (window.navigator.appVersion.indexOf("HP-UX") != -1);
isMac = (window.navigator.appVersion.indexOf("Mac") != -1);
isWindows = navigator.userAgent.indexOf("Windows 95") != -1 ||
            navigator.userAgent.indexOf("Windows 98") != -1 ||
            navigator.userAgent.indexOf("Windows NT") != -1;
isMacIE = (isMac && isIE);

// Netscape Version
if(isNS) {
  v = parseInt(navigator.appVersion);
  if(v == 4) {
    isNS4 = true;
  } else if(v == 5) {
    p = navigator.userAgent.lastIndexOf('/');
    v = parseInt(navigator.userAgent.substr(p+1));
    eval("isNS" + v + " = true");
  }
}

// Internet Explorer Version
if(isIE) {
  v = parseInt(navigator.appVersion.substr(navigator.appVersion.indexOf("MSIE")+5));
  eval("isIE" + v + " = true");
}


//Bookmark Page

function addbookmark() { 
  var bookmarktitle = "AITA NAZIONALE - Associazione Italiana di Tecnologia Alimentare";/*document.title;*/
  var bookmarkurl = "http://www.aita-nazionale.it";/*document.location;*/
  var netscape
  var macintosh
  netscape="Attenzione Utente Netscape. Per aggiungere questa pagina ai Preferiti premere CTRL+D.\n\nPer aggiungere questa pagina alla Sidebar di Netscape, premi OK alla schermata successiva.\n\nAttention Netscape Users. To Bookmark this page please click the page you would like to bookmark and press CTRL+D. If you would like to add this page to your Netscape Sidebar, please click OK on the next window which appears.";
  macintosh="Attenzione utente Macintosh. Per aggiungere ai Preferiti questa pagina premere CTRL+D.\n\nAttention Macintosh User. To Bookmark this page please click the page you would like to bookmark and press CTRL+D.";

  if (window.sidebar&&window.sidebar.addPanel) { 
    alert(netscape);
    window.sidebar.addPanel(bookmarktitle, bookmarkurl,""); 
  } else if (isMac) {
    alert(macintosh);
  } else if (document.all) {
    window.external.AddFavorite(bookmarkurl, bookmarktitle);
  } else if (window.opera && window.print) {
    return true;
  }
}



function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_validateForm() { //v4.0
  var i,p,q,nm,test,num,min,max,errors='',args=MM_validateForm.arguments;
  for (i=0; i<(args.length-2); i+=3) { test=args[i+2]; val=MM_findObj(args[i]);
    if (val) { nm=val.name; if ((val=val.value)!="") {
      if (test.indexOf('isEmail')!=-1) { p=val.indexOf('@');
        if (p<1 || p==(val.length-1)) errors+='- '+nm+' deve contenere un indirizzo Email.\n';
      } else if (test!='R') { num = parseFloat(val);
        if (isNaN(val)) errors+='- '+nm+' deve contenere un numero.\n';
        if (test.indexOf('inRange') != -1) { p=test.indexOf(':');
          min=test.substring(8,p); max=test.substring(p+1);
          if (num<min || max<num) errors+='- '+nm+' must contain a number between '+min+' and '+max+'.\n';
    } } } else if (test.charAt(0) == 'R') errors += '- '+nm+' inserimento obbligatorio.\n'; }
  } if (errors) alert('Si è verificato il seguente errore:\n'+errors);
  document.MM_returnValue = (errors == '');
}

 -->