
function flash(file,nome) {
	document.neim=nome;
    document.write("<object type='application/x-shockwave-flash' menu='false' data='"+file+".swf?nome="+nome+"' width='173' height='512' id='"+file+"'>\n");
    document.write("<param name='movie' value='"+file+".swf?nome="+nome+"' />\n");
    document.write("<param name='width' value='173' />\n");
	document.write("<param name='height' value='512' />\n");
	document.write("<param name='quality' value='high' /><param name='menu' value='false' /><param name='wmode' value='transparent' />\n");
    document.write("</object>\n");
}

function loop(file) {
    document.write("<object type='application/x-shockwave-flash' menu='false' data='"+file+".swf' width='776' height='291' id='"+file+"'>\n");
    document.write("<param name='movie' value='"+file+".swf' />\n");
    document.write("<param name='width' value='776' />\n");
	document.write("<param name='height' value='291' />\n");
	document.write("<param name='quality' value='high' /><param name='menu' value='false' /><param name='wmode' value='transparent' />\n");
    document.write("</object>\n");
}

function cambiafoto(pic){
	switch(document.neim){
		case "gallery1": cartella="ristorante/"; break;
		case "gallery2": cartella="albergo/"; break;
		case "gallery3": cartella="cesi/"; break;
	}
	switch(pic){
		case "P1040508.jpg":
			document.getElementById("txtTitolo").innerHTML="Piscina in costruzione. Stiamo lavorando per voi";
			break;
		default:document.getElementById("txtTitolo").innerHTML="";
	}
	if(document.images)document.images['big'].src="gallery/"+cartella+pic;
	collapse1.slideup();
	collapse2.slidedown();
}
/*
function flash(num) {   
    document.write("<object type='application/x-shockwave-flash' menu='false' data='"+num+".swf' width='776' height='412' id='"+num+"'>\n");
    document.write("<param name='movie' value='"+num+".swf' />\n");
    document.write("<param name='width' value='776' />\n");
	document.write("<param name='height' value='412' />\n");
	document.write("<param name='quality' value='high' /><param name='menu' value='false' /><param name='wmode' value='transparent' />\n");
    document.write("</object>\n");
}
*/

var isInternetExplorer = navigator.appName.indexOf("Microsoft") != -1;
function testa_DoFSCommand(command, args) {
	var testaObj = isInternetExplorer ? document.all.testa : document.testa;
	if(command=='menu'){
		go(args+'.html');
	}
}
if (navigator.appName && navigator.appName.indexOf("Microsoft") != -1 && navigator.userAgent.indexOf("Windows") != -1 && navigator.userAgent.indexOf("Windows 3.1") == -1) {
	document.write('<script language=\"VBScript\"\>\n');
	document.write('On Error Resume Next\n');
	document.write('Sub testa_FSCommand(ByVal command, ByVal args)\n');
	document.write('	Call testa_DoFSCommand(command, args)\n');
	document.write('End Sub\n');
	document.write('</script\>\n');
	
}function loadswf(swf, ivp, w, h){
	ivp="ivp/" + ivp;
	document.write("<object");
	document.write("width=\""+w+"\" height=\""+h+"\"");
	document.write("codebase=\"http://fpdownload.macromedia.com/get/flashplayer/current/swflash.cab#version=9,0,0,0\">");
	document.write("<param name=\"movie\" value=\""+swf+"\" />");
	document.write("<param name=\"allowScriptAccess\" value=\"sameDomain\" />");
	document.write("<param name=\"allowFullScreen\" value=\"true\" />");
	document.write("<param name='flashvars' value='panorama="+ivp+"' />");
	document.write("<embed src=\""+swf+"\""); 
	document.write("width=\""+w+"\" height=\""+h+"\" align=\"middle\"");
	document.write("play=\"true\"");
	document.write("loop=\"false\"");
	document.write("quality=\"high\"");
	document.write("allowScriptAccess=\"sameDomain\"");
	document.write("allowFullScreen=\"true\"");
	document.write("flashvars=\"panorama="+ivp+"\"");
	document.write("type=\"application/x-shockwave-flash\"");
	document.write("pluginspage=\"http://www.adobe.com/go/getflashplayer\">");
	document.write("</embed>");
	document.write("</object>");
}