﻿
var StatusMessage = 'Benvenuti nella nostra Homepage'
var root = 'http://www.lestradenomadi.com/'
var timeout=5000

function visualizza(img,msg){
visualizzaGalleria(img,msg,new Array(),-1);
}

function visualizzaGalleria(img,msg,vec,idx){


document.write('<html><head><LINK REL=StyleSheet HREF="default.css" TYPE="text/css" ></head><body><div align=center>');

//document.write(vec.length + '<br>')
//document.write(idx)
document.write('<script>  \n');
document.write('idx = '+idx + '; \n');
document.write('vec = new Array() \n ');
document.write('zoommer = 0 \n ');
document.write('OrigSize = 0 \n ');


if (idx > -1){
	for(i=0; i<vec.length; i++){
		document.write('vec['+i+']=\''+vec[i]+'\'; \n');
	}
}

document.write('function Avanti(){ \n');
document.write('idx++; \n');
document.write('if (idx > vec.length-1) idx = 0; \n ');
document.write('image.src=vec[idx]; \n');
document.write('if (effetti.checked) ApplyEffect(image) \n');
//document.write('alert(vec.length + \' \'+ idx);');
document.write('} \n');

document.write('function Random(){ \n');
document.write('idx = Math.floor(Math.random()*vec.length)\n');
//document.write('if (idx > vec.length-1) idx = 0; \n ');
document.write('image.src=vec[idx]; \n');
document.write('if (effetti.checked) ApplyEffect(image) \n');
//document.write('alert(image.src);');
document.write('} \n');

document.write('function Indietro(){ \n');
document.write('idx--; \n');
document.write('if (idx < 0) idx = vec.length-1; \n ');
document.write('image.src=vec[idx]; \n');
document.write('if (effetti.checked) ApplyEffect(image) \n');
//document.write('alert(vec.length + \' \'+ idx);');
document.write('} \n');

document.write('function Auto(){ \n');
document.write('Avanti();\n');
document.write('setTimeout("Auto()",'+timeout+');\n');
document.write('} \n');

document.write('function Casual(){ \n');
document.write('Random();\n');
document.write('setTimeout("Casual()",'+timeout+');\n');
document.write('} \n');

document.write('function ApplyEffect(elemento){ \n ');
document.write('elemento.filters.revealTrans.Duration=2; \n');
document.write('elemento.filters.revealTrans.Transition=Math.floor(Math.random()*50); \n');
document.write('elemento.filters.revealTrans.apply(); \n');
document.write('elemento.filters.revealTrans.play() \n'); 
document.write('} \n');

document.write('function ZoomIn(elemento){ \n ');
//document.write('if (Original == -1) Original = elemento.width; \n ');
document.write('elemento.width=elemento.width + 25; \n');
document.write('zoommer++; \n');
document.write('} \n');

document.write('function ZoomOut(elemento){ \n ');
//document.write('if (Original == -1) Original = elemento.width; \n ');
document.write('elemento.width=elemento.width - 25; ');
document.write('zoommer--; \n');
document.write('} \n');

document.write('function ZoomOff(elemento){ \n ');

/*
document.write('if (zoommer > 0)  elemento.width = elemento.width - (zoommer * 25) ; \n ');
document.write('if (zoommer < 0)  elemento.width = elemento.width + Math.abs((zoommer * 25)) ; \n ');
document.write('zoommer=0\n');
*/
//document.write('alert(location.href);\n ');
//document.write('history.go(0) ');
document.write('elemento.width=OrigSize ; \n');
document.write('} \n');

document.write('</script> \n');


document.write('<OBJECT classid=clsid:D27CDB6E-AE6D-11cf-96B8-444553540000 ');
document.write('codeBase=http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0 ');
document.write('height=30 id=introblu0 width=584><PARAM NAME="movie" VALUE="pg.swf"><PARAM NAME="quality" VALUE="high">');
document.write('</OBJECT><br>');

if (idx > -1){
document.write('<table border=0 width="600" bgcolor="#aaaaaa"><tr> \n');
document.write('<td bgcolor="#888888" align="center"><a href="#" onclick="Indietro()">Precedente </a></td> \n ');    
document.write('<td bgcolor="#555555" align="center"><a href="#" onclick="Auto()"> Slide Show     </a></td> \n ');   
document.write('<td bgcolor="#555555" align="center"><a href="#" onclick="Casual()"> Casual Show </a></td> \n ');
document.write('<td bgcolor="#555555" align="center"><a href="#"  > Effetti <input type="checkbox" checked="true" name="effetti"></a></td> \n ');  
document.write('<td bgcolor="#555555" align="center"><a href="#" onclick="ZoomIn (image)"> Zoom In </a> - <a href="#" onclick="ZoomOff(image)"> Zoom Off </a> - <a href="#" onclick="ZoomOut(image)"> Zoom Out </a></td> \n ');  
document.write('<td bgcolor="#888888" align="center"><a href="#" onclick="Avanti();" > Successiva </a></td> \n ');   

document.write('</tr> \n');
}

document.write(' <table class="bordo"> <tr><td align=center><img name="immagine" style=" filter:revealTrans(duration=2,transition=1)"  onload="OrigSize=this.width;" id="image" src='+img+'  onclick="history.back()" border="0" width="100%"></td></tr> ');
document.write('<script>ApplyEffect(image)  ; </script></table>    ');
                                        
if (msg != ""){
document.write(msg + '<br>');
}
  
document.write('<img src="indietro.jpg" onclick="history.back()" >');                                          
document.write('</div>');
document.write('</body></html>                                                ');
}

function ApplyEffect(elemento){
	
elemento.filters.revealTrans.Transition=Math.floor(Math.random()*50); 
elemento.filters.revealTrans.apply(); 



}

function Next(){
alert(idx)
idx++; 
image.src=vec[idx];

}
function SetNews(){
str = '<OBJECT classid=clsid:D27CDB6E-AE6D-11cf-96B8-444553540000 ';
str = str + 'codeBase=http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0 ';
str = str +  'height=15 id=introblu0 width=40><PARAM NAME="movie" VALUE="new.swf"><PARAM NAME="quality" VALUE="high">';
str = str +  '</OBJECT>';
return str;
}

function visualizza1(img){
	
	document.write('<html><head><LINK REL=StyleSheet HREF="default.css" TYPE="text/css" ></head><body>');
	document.write('<div align=center>');
	document.write('<img src='+img+' onclick="history.back()">');
	document.write('<div></body></html>');

	
}

function PlayVideo(videoFile,msg,tipo){
	play.titolo.value=msg;
	play.filename.value=videoFile;
	play.tipo.value=tipo;
	play.submit();
/*
document.write('<html>																																																														');
document.write('<head><LINK REL=StyleSheet HREF="default.css" TYPE="text/css" ></head>                                                            ');
document.write('<body><br><center><br><b><img src="bullet.jpg"> '+msg+' <img src="bullet.jpg"></b><br><br>                                                                                               ');
document.write('<OBJECT id = "Player"  CLASSID = "CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6">                                                    ');
document.write('<PARAM Name = "autoStart"  Value = "true"><PARAM Name = "uiMode" Value = "none">                                                  ');
document.write('</OBJECT><SCRIPT>                                                                                                                 ');
document.write('Player.uiMode = "full";Player.width = 500;Player.height = 400;Player.URL = "http://www.lestradenomadi.com/'+videoFile+'";   ');
document.write('</SCRIPT><br><br><img src="indietro.jpg" onclick="history.back()"></center></body>             ');
document.write('</html>                                                                                                                           ');
*/
}

function Stats(){



}

function testi(titolo,nomefile){
		dest = "testi/testi.asp?titolo="+titolo+"&file="+nomefile;
    location.href=dest;
}

function Indietro(){
	
		document.write('<img src="indietro.jpg" onclick="history.back()">');
		
		
}

function HeaderPresentaione(nome){
    
    b1="";
    b2="";
    b3="";
    b4="";
    b5="";
    b6="";
    b7="";
       
    document.write('<a href="bruno.html">'+b1+'Bruno</a> :: ');
    document.write('<a href="giorgio.html">'+b2+'Giorgio</a> :: ');
    document.write('<a href="luciano.html">'+b3+'Luciano</a> :: ');
    document.write('<a href="raffaele.html">'+b4+'Raffaele</a> :: ');
    document.write('<a href="sara.html">'+b5+'Sara</a> :: ');
    document.write('<a href="stefano.html">'+b6+'Stefano</a> :: ');
    document.write('<a href="pierluca.htm">'+b7+'Pierluca</b></a>');


}

