//Function NEWIMAGE (Definisce l' oggetto image)
function newImage(arg) {
	if (document.images) {
		rslt = new Image();
		rslt.src = arg;
		return rslt;
	}
}

//Function CHANGEIMAGES (Usata nel preload)
function changeImages() {
	if (document.images && (preloadFlag == true)) {
		for (var i=0; i<changeImages.arguments.length; i+=2) {
			document[changeImages.arguments[i]].src = changeImages.arguments[i+1];
		}
	}
}

//Preload immagini
var preloadFlag = false;
function preloadImages() {
	if (document.images) {
	    spacer_01 = newImage("gfx/spacer.gif");
	    spacer_02 = newImage("gfx/spacert.gif");		
	    splash_01 = newImage("gfx/splash_03.gif");
	    splash_02 = newImage("gfx/splash_04.gif");
	    splash_03 = newImage("gfx/splash_05.gif");
	    splash_04 = newImage("gfx/splash_08.gif");
	    splash_05 = newImage("gfx/splash_09.gif");
		button_01 = newImage("gfx/but_notizie.gif");
		button_02 = newImage("gfx/but_gruppo.gif");
		button_03 = newImage("gfx/but_clan.gif");		
		button_04 = newImage("gfx/but_reparto.gif");
		button_05 = newImage("gfx/but_branco.gif");
		button_06 = newImage("gfx/but_base.gif");		
		button_07 = newImage("gfx/but_links.gif");
		button_08 = newImage("gfx/but_foto.gif");
		barras_01 = newImage("gfx/barrasx_new.gif");
		barras_02 = newImage("gfx/barrasx_gru.gif");
		barras_03 = newImage("gfx/barrasx_cla.gif");
		barras_04 = newImage("gfx/barrasx_rep.gif");
		barras_05 = newImage("gfx/barrasx_bra.gif");
		barras_06 = newImage("gfx/barrasx_bas.gif");
		barras_07 = newImage("gfx/barrasx_lin.gif");
		barras_08 = newImage("gfx/barrasx_fot.gif");
		header_01 = newImage("gfx/header.gif");		

		preloadFlag = true;
	}
}

//Function HIGH (Illumina l' elemento passato)
function high(which2){
 theobject=which2
 highlighting=setInterval("highlightit(theobject)",2)
}

//Function LOW (Oscura l' elemento passato)
function low(which2){
 clearInterval(highlighting)
 which2.filters.alpha.opacity=30
}

//Function HIGHLIGHTIT (Funzione di servizio)
function highlightit(cur2){
 if (cur2.filters.alpha.opacity<100)
  cur2.filters.alpha.opacity+=5
 else if (window.highlighting)
 clearInterval(highlighting)
}

