
 function mytoggle(arg){
  
  

  var num ;
  var lipos=$w('enq sta don etu web') ;
  var chi = lipos.indexOf(arg) + 1 ;
  
  switch(arg) {
	
  case 'enq': num = Math.floor(Math.random()* 2) ; break;
  case 'sta': num = Math.floor(Math.random()* 2) + 2 ; break;
  case 'don': num = Math.floor(Math.random()* 2) + 4  ; break;
  case 'etu': num = Math.floor(Math.random()* 2) + 6 ; break;
  case 'web': num = 8 ; break;
 
 }
    
 
  
  $('screen').src= folio[num][1] + '300200.jpg' ;
  $('screen').alt= folio[num][2] ;
  
  $('subtitle').update( folio[num][0]);
  $$('#menuslide li.selected').invoke('removeClassName','selected');
  $$('#menuslide li:nth-child('+ chi +')').invoke('addClassName','selected');
  
  }

var gcallcount=0 ;


new Event.observe(window, "load", function (evt) {
	var leTimer;
	leTimer = new PeriodicalExecuter(function(pe) {
	 if (++gcallcount > 10) pe.stop();
	 else {
	  
	  var t = Math.floor(Math.random()*5) ;
	  mytoggle($w('enq sta don etu web')[t] );
	 }
	 }, 4);

 
	new Event.observe("slide","click", function(evt) {
		
		leTimer.stop();
	});
});




