var isNav4, isIE4;

if (parseInt(navigator.appVersion.charAt(0)) >= 4) 
{
	isNav4 = (navigator.appName == "Netscape") ? 1 : 0;
	isIE4 = (navigator.appName.indexOf("Microsoft") != -1) ? 1 : 0;
}

var pos=1;
var pos2=1;
var pos3=1;
var verso=1;
var conta_rit=1;

	
    
	    
	
	
function adatta_div(){
        
	var larghezza=document.body.clientWidth;
	var spostamento=510+((larghezza-1002)/2);    
	   
	if (larghezza>995){

		   document.all("Layer1").style.left=spostamento;
                    document.all("Layer2").style.left=spostamento;
                    document.all("Layer3").style.left=spostamento;
			
			
		
	}
	 else {
	      document.all("Layer1").style.left=510;
                    document.all("Layer2").style.left=510;
                    document.all("Layer3").style.left=510;
			
			
		
	}	
	
}

function rand_new() {
  var today=new Date();
  var num=today.getTime();
  num=Math.round(Math.abs(Math.sin(num))*1000000)%15;
  return num;

}

function apri_dettaglio()
{
var browName = navigator.userAgent;
browName=browName.toLowerCase();
var test=browName.indexOf("safari");
var num=rand_new();

if (test==-1){
                conta_rit=conta_rit+1;
                
                if (conta_rit>1) { 
                document.all("Layer1").style.top=128+((pos-1)*13);
                document.all("Layer2").style.top=128+((pos2-1)*13);
                document.all("Layer3").style.top=128+((pos3-1)*13);
                conta_rit=1   
                conta_rit=1
                conta_rit=1
                pos3=pos2;
                pos2=pos;
                if (verso==1) {
                        pos=pos+1;
                        if (pos>35) {
                           verso=0;
                        }
      	        } else {
                        pos=pos-1;
                        if (pos<2) {
                           verso=1;
                        }
      	        } 
                
                }
      for (i=1;i<num+1;i=i+1)
                {
                document.all("curs_sx_"+i).style.display = 'block';
                document.all("curs_dx_"+i).style.display = 'block';
                 
                
                
                }
     
      for (i=num+1;i<15;i=i+1)
               {
		document.all("curs_sx_"+i).style.display = 'none';
                document.all("curs_dx_"+i).style.display = 'none';
      	        }
               	
}else {

    
		document.getElementById("curs_sx_14").style.display = 'block';
	
		document.getElementById("curs_sx_14").style.display = 'none';
	
	
}
setTimeout("apri_dettaglio()",150);	
}


function apri_dettaglio_int()
{
var browName = navigator.userAgent;
browName=browName.toLowerCase();
var test=browName.indexOf("safari");

if (test==-1){
                 document.all("Layer1").style.top=128+((pos-1)*13);
                document.all("Layer2").style.top=128+((pos2-1)*13);
                document.all("Layer3").style.top=128+((pos3-1)*13);
                conta_rit=1   
                conta_rit=1
                conta_rit=1
                pos3=pos2;
                pos2=pos;
                if (verso==1) {
                        pos=pos+1;
                        if (pos>35) {
                           verso=0;
                        }
      	        } else {
                        pos=pos-1;
                        if (pos<2) {
                           verso=1;
                        }
      	        } 
                
               	
}else {

    
		
	
	
}
setTimeout("apri_dettaglio_int()",150);	
}
