



slideMenu = new createSlideMenu("slideMenu")



//Variables to set:
slideMenu.menuy=410 //The top placement of the menu.
slideMenu.menux=17 //The left placement of the menu
slideMenu.useImages = 0 //Are you using images or not?
slideMenu.pxspeed=16 //The pixel speed of the animation
slideMenu.timspeed=10//The timer speed of the animation
slideMenu.inset =0//How much the selected elements should pop to the left
slideMenu.arrow="clArrow"

//Needed dummy classes
slideMenu.bgClass =	"slideMenuBG"
slideMenu.txtClass = "slideMenuText"

//Level properties - ALL properties have to be spesified in level 0
//This works the same way as the CM4 script (if you have seen it)
slideMenu.level[0] = new slideMenu_makeLevel(
	left = 0,
	width = 155,
	height = 19,
	between = 5,
	className = "clSlideMenu0",
	classNameA = "clA0",
	regImage = "",
	roundImg = "",
	roundImg2 = "",
	subImg = "",
	subRound= "")

// largezza sottomenu livello1=140	
slideMenu.level[1] = new slideMenu_makeLevel(10,150,20,2,"clSlideMenu1","clA1","level1_regular.gif","level1_round2.gif","level1_round.gif","level1_sub.gif", "level1_sub_round.gif")

// largezza sottomenu livello2=140	
slideMenu.level[2] = new slideMenu_makeLevel(20,150,15,2,"clSlideMenu2","clA2","level2_regular.gif","level2_round2.gif","level2_round.gif", "level2_sub.gif", "level2_sub_round.gif")
slideMenu.level[3] = new slideMenu_makeLevel(30,140,15,2,"clSlideMenu3","clA3","level3_regular.gif","level3_round2.gif","level3_round.gif","level3_sub.gif","level3_sub_round.gif")
slideMenu.level[4] = new slideMenu_makeLevel(40,100,16,2,"clSlideMenu4","clA4","level4_regular.gif", "level4_round2.gif","level4_round.gif","level4_sub.gif", "level4_sub_round.gif")

//Image preload --- leave this
for(var i=0;i<slideMenu.level;i++){
	var l = slideMenu.level[i]
	new preLoadBackgrounds(l.regImage,l.roundImg,l.roundImg2,l.subImg,l.subRound)
}




//Menu 
slideMenu.makeMenu('top','Fotovoltaico')

    	 slideMenu.makeMenu('sub','Listino Pannelli Fotovoltaici','./pannelli_fotovoltaici.htm')  // 2 voce livello 1 del menu energia
    	 slideMenu.makeMenu('sub','Listino Kit Fotovoltaici','./kit_fotovoltaici.htm')   // 1 voce livello 3 del menu energia
	 slideMenu.makeMenu('sub','IL Conto Energia','./conto_energia.htm') 
    	 slideMenu.makeMenu('sub','Calcolo impianti Fotovoltaici','./Calcola_Impianti_Fotovoltaici.htm')  
	  

		
//Menu 
slideMenu.makeMenu('top','Inverter dc/ac')

    	 slideMenu.makeMenu('sub','Generalità','./inverter.htm')  // 1 voce livello 1 menu energia
	 slideMenu.makeMenu('sub','Inverter Soft-Start','./listino_inverter_sstart.htm')  // 2 voce livello 1 menu energia
    	 slideMenu.makeMenu('sub','Inverter G-Power','./listino_inverter_q.htm')  // 3 voce livello 1 menu energia
	 slideMenu.makeMenu('sub','Inverter Sinusoidali','./listino_inverter_s.htm')  // 4 voce livello 1 menu energia
	 slideMenu.makeMenu('sub','Inverter Grid connected','./inverter-grid-connected.htm')  // 5 voce livello 1 menu energia

 
//Menu 
slideMenu.makeMenu('top','Batterie/Regolatori')

    	 slideMenu.makeMenu('sub','Regolatori di Carica','./regolatori_batterie.htm')  // 1 voce livello 1 menu batterie
	 slideMenu.makeMenu('sub','Batterie al Pb','./batterie.htm')  // 2 voce livello 1 menu batterie




//Menu 
slideMenu.makeMenu('top','Kit VideoSorveglianza')

    	 slideMenu.makeMenu('sub','Kit Mpeg4 2/4 telecamere','http://www.elettronicashop.com/Kit_di_Videosorveglianza1.htm')  
    	 slideMenu.makeMenu('sub','Kit H.264 2/4 telecamere','http://www.elettronicashop.com/Kit_di_Videosorveglianza3.htm')  
	 slideMenu.makeMenu('sub','Kit H.264 8/16 telecamere','http://www.elettronicashop.com/Kit_di_Videosorveglianza2.htm')  
	 slideMenu.makeMenu('sub','Kit Wireless 4 telecamere','http://www.elettronicashop.com/Kit_Videosorveglianza_wireless.htm') 


 
//Menu 
slideMenu.makeMenu('top','VideoSorveglianza')

	 slideMenu.makeMenu('sub','Indice Videosorveglianza','./videosorveglianza.htm')  // 1 voce livello 1 
 	 slideMenu.makeMenu('sub','Offerte Promozionali','./offerte_videosorveglianza.htm')  // 2 voce livello 1 
	 slideMenu.makeMenu('sub','Microtelecamere Colori','./microtelecamere.htm')  // 4 voce livello 1 
	 slideMenu.makeMenu('sub','Microtelecamere Wireless','./microtelecamere_listini.htm')  
 	 slideMenu.makeMenu('sub','Obiettivi per Telecamere CCS','./obiettivi_ccs.htm')  
	 slideMenu.makeMenu('sub','Telecamere CCD CCS','./telecamere_colori.htm')  // 9voce livello 1 
	 slideMenu.makeMenu('sub','Telecamere Visione Notturna','./telecamere_infrarossi.htm')  // 10 voce livello 1 
	 slideMenu.makeMenu('sub','Telecamere da Esterni','./telecamere_infrarossi.htm')  // 10 voce livello 1 
	 slideMenu.makeMenu('sub','Telecam. Dome&Speed Dome','./telecamere_speed_dome.htm')  // 11 voce livello 1 
	 slideMenu.makeMenu('sub','Telecamere Speciali','./telecamere-speciali.htm')  // 12 voce livello 1 
	 slideMenu.makeMenu('sub','Trasmettitori Audio/Video','./trasmettitori_video_audio.htm')  // 13 voce livello 1 
	 slideMenu.makeMenu('sub','Videoregistratori Digitali','./videoregistratori_dvr.htm') 


//Menu 
slideMenu.makeMenu('top','Videosorveglianza IP')

    	 slideMenu.makeMenu('sub','Telecamere Wireless Lan','./telecamere_wireless_Lan.htm') 
 	 slideMenu.makeMenu('sub','Telecamere Cable Lan','./telecamere_network_ip.htm')
 	 slideMenu.makeMenu('sub','Telecamere IP con Infrarossi','./telecamere_network_ip_infrared.htm')  
 	 slideMenu.makeMenu('sub','Telecamere IP da Esterni','./telecamere_network_ip_infrared.htm')  
 	 slideMenu.makeMenu('sub','Video Web Server IP','./video_web_server.htm')  


//Menu 
slideMenu.makeMenu('top','Preventivi Online')

    	 slideMenu.makeMenu('sub','Richiedi un Preventivo','./preventivi.htm')



//Menu 
slideMenu.makeMenu('top','Condiz. &  Pagamenti')

    	 slideMenu.makeMenu('sub','Condizioni Vendita','./cond_vendita.htm')  // 1 voce livello 1 menu 13



//-----------------------------------------------------------------------------------------------------------------------------------------------------------------------

slideMenu.init()


//-------------------------------------------------------------------------------------------------------------------------------


// non usata (primo tentativo)
var cnt=0
function inc_cnt () {
 cnt=(cnt+1)
 document.form1.timespent.value = cnt
 //document.write ("value",cnt)
 if (cnt > 50){ slideMenu.init(); cnt = 0; clearTimout(X); return}
 X=setTimeout('inc_cnt()',3000)  
 clearTimout(X);		}




// OK è funzionante

startday = new Date();
clockStart = startday.getTime();
function initStopwatch() { 
 var myTime = new Date(); 
var timeNow = myTime.getTime();  
var timeDiff = timeNow - clockStart; 
this.diffSecs = timeDiff/1000; 
return(this.diffSecs); 
} 


var secsrif //fissa i secondi di riferimento

function initSecs() { 
var mySecs = initStopwatch(); 
var mySecs1 = ""+mySecs; 
//mySecs1= mySecs1.substring(0,mySecs1.indexOf(".")) + " secs."; 
secsrif=mySecs1 
//document.form1.timespent.value = mySecs1 
return (mySecs1)
}


function getSecs() { 
var mySecs0 = initStopwatch(); 
var mySecs2 = ""+mySecs0; 
//mySecs2= mySecs2.substring(0,mySecs2.indexOf(".")) + " secs."; 
//document.form1.timespent.value = mySecs2 - secrif
timedif1= mySecs2 - secrif

//debug visualizza il valore del timer
//document.form1.timespent.value = 20- timedif1 
if (30-timedif1 < 1) { slideMenu.init(); return}

//if (timedif1 > 10){ slideMenu.init(); return}
window.setTimeout('getSecs()',1000); 
}

  



function right(e) {
//document.write (navigator.appName)
//document.write (e.which) //stampa a schermo i valori restituiti dal mouse 

// su netscape e firefox il tasto sx restituisce 3
// su explorer il tasto dx restituisce 2

  if (navigator.appName == 'Netscape' && e.which == 1) {
      //alert("prova tasto dx");
     
      secrif=initSecs() //prende il riferimento
 
      // esegue la diff tra T.riferim e i secondi correnti se diff>20 allora resetta il menu
      getSecs() 
      return      }
			        	



  if (navigator.appName == 'Microsoft Internet Explorer' && event.button == 1) {
      
      //alert("prova tasto dx"); 
      secrif=initSecs() //prende il riferimento
 
      // esegue la diff tra T.riferim e i secondi correnti se diff>20 allora resetta il menu
      getSecs() 

      return }
			        	




return true;
                  }


//event handler
document.onmousedown=right;
if (document.layers) window.captureEvents(Event.MOUSEDOWN);
window.onmousedown=right;
