function caricaFoto(img){
	w=200;
	h=120;
	var left = Math.floor((screen.width-w)/2);
	var top = Math.floor((screen.height-h)/2);
	var setting="location=no,menubar=no,resizable=no,scrollbars=yes,toolbar=no,width="+w+",height="+h+",top="+top+",left="+left;
	newWin=window.open("openimg.php?img="+img, 'popUp', setting);
	newWin.focus();
}

function gId(id){
	return document.getElementById(id);
}


function apri(URL,width,height) {

var left = (screen.width/2) - width/2;
var top = (screen.height/2) - height/2;
var styleStr = 'toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0,width='+width+',height='+height+',left='+left+',top='+top+',screenX='+left+',screenY='+top;

window.open(URL,"", styleStr);
}



function caricaFotoPhotoGallery(url) {
	var left= 0;
	var top= 0;	
	wid = window.open(url, "popupimmagine", 'toolbar=no,directories=no,resizable=NO,menubar=no,scrollbars=NO,width=100,height=100,top='+top+',left='+left);
	wid.focus();
}




function createFlash(src){
    if (navigator.appVersion.indexOf("MSIE") != -1){
    var strContent = '<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=4,0,0,0" ';
    strContent += 'width="990" ';
    strContent += 'height="205">';
    strContent += '<param name="menu" value="false" />';
    strContent += '<param name="movie" value="'+src+'">';
    strContent += '<param name=quality value=high>';
    strContent += '<param name="wmode" value="transparent">';
    strContent += 'Flash plug-in not installed.';
    strContent += '</object>';
    document.write(strContent);
  }else{
	document.write('<object type="application/x-shockwave-flash" data="'+ src +'" width="990" height="205" wmode="transparent">Flash plug-in not installed.</object>');
  }
}


function cambiaLingua(){
	var param = document.data.select_lingua.options[document.data.select_lingua.selectedIndex].value;

	switch (param){
	case "1":
		window.location="index.php";
	break;

	case "2":
		window.location="index.php?l=2";
	break;

	case "3":
		alert('Under construction');
	break;
	case "4":
		alert('Under construction');
	break;
	case "5":
		alert('Under construction');
	break;

	}
}