function hideAll(){
	var i;
	for(i=1; i<=7; i++){
		var ele = document.getElementById('cala_piccola_eventi_'+i);
		ele.style.display = "none";
	}
}

function display(target){
	var ele = document.getElementById(target);
	ele.style.display = "block";

}

function popup(target, desc){
//	window.open('preview.php?pic='+target+'&desc='+escape(desc), 'preview', 'resizable=yes', 'status=no, location=no, width=815, height=700, x=100, y=100');
//per sbloccare le finestra
	window.open('preview.php?pic='+target+'&desc='+escape(desc), 'preview', 'status=no, location=no, width=815, height=700, x=100, y=100');	
}

function showwebcam(){
	window.open('webcam.php', 'webcam', 'status=no, location=no, width=750, height=720, x=100, y=100');
}

function popupPage(url, name, additionalParam){
	// 'status=no, location=no, width=440, height=380, x=100, y=100'
	window.open(''+url, ''+name, additionalParam);
}

function loadVideo(div, v){
	hideAll();
	display('cala_piccola_eventi_'+div);
	var ele = document.getElementById('video_number');
	ele.value = v;
}

function stopVideo() {
	var n = document.getElementById('video_number').value;
	try{
		thisMovie("video"+n).stopall();
		
	} catch (e) {
	}
}


// recupero l'oggetto in accordo a quanto previsto da Adobe
function thisMovie(movieName) {
    if (navigator.appName.indexOf("Microsoft") != -1) {
        return window[movieName]
    }
    else {
        return document[movieName]
    }
}


function mainSWF(lang){
	if (AC_FL_RunContent == 0) {
		alert("This page requires AC_RunActiveContent.js.");
	} else {
		AC_FL_RunContent(
			'codebase', 'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0',
			'width', '729',
			'height', '342',
			'src', 'xmlphotoalbum',
			'quality', 'high',
			'pluginspage', 'http://www.macromedia.com/go/getflashplayer',
			'align', 'middle',
			'play', 'true',
			'loop', 'true',
			'scale', 'showall',
			'wmode', 'window',
			'devicefont', 'false',
			'id', 'xmlphotoalbum',
			'bgcolor', '#fffde1',
			'name', 'xmlphotoalbum',
			'menu', 'true',
			'allowFullScreen', 'false',
			'allowScriptAccess','sameDomain',
			'movie', 'xmlphotoalbum?lang='+lang,
			'salign', ''
			); //end AC code
	}
}



/*
inizialmente ...
'width', '222',
'height', '300',
*/
function videoPlayer(n){
	if (AC_FL_RunContent == 0) {
		alert("This page requires AC_RunActiveContent.js.");
	} else {
		AC_FL_RunContent(
			'codebase', 'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0',
			'width', '210',
			'height', '300',
			'src', 'video',
			'quality', 'high',
			'pluginspage', 'http://www.macromedia.com/go/getflashplayer',
			'align', 'middle',
			'play', 'true',
			'loop', 'true',
			'scale', 'showall',
			'wmode', 'window',
			'devicefont', 'false',
			'id', 'video'+n,
			'bgcolor', '#fffde1',
			'name', 'video'+n,
			'menu', 'true',
			'allowFullScreen', 'true',
			'allowScriptAccess','sameDomain',
			'movie', 'video?file='+n,
			'salign', ''
			); //end AC code
	}
}

