// ======================== FLASH FIX ======================== 
function showFlash(flashfile, w, h) {
 document.write('<object id="flaa" classid="clsid:D27CDB6E-AE6D-11CF-96B8-444553540000" id="obj1" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0" border="0" width="'+w+'" height="'+h+'">');
 document.write(' <param name="movie"   value="'+flashfile+'">');
 document.write(' <param name="quality" value="high">');
 //document.write(' <param name="wmode"   value="transparent">');
 document.write(' <param name="AllowScriptAccess" value="always">');
 document.write(' <embed src="'+flashfile+'" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" name="obj1" quality="High" AllowScriptAccess="always" width="'+w+'" height="'+h+'">');
 document.write('</object>');
}
function showFlashAlpha(flashfile, w, h) {
 document.write('<object id="flaa" classid="clsid:D27CDB6E-AE6D-11CF-96B8-444553540000" id="obj1" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0" border="0" width="'+w+'" height="'+h+'">');
 document.write(' <param name="movie"   value="'+flashfile+'">');
 document.write(' <param name="quality" value="high">');
 document.write(' <param name="wmode"   value="transparent">');
 document.write(' <param name="AllowScriptAccess" value="always">');
 document.write(' <embed src="'+flashfile+'" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" name="obj1" wmode="transparent" quality="High" AllowScriptAccess="always" width="'+w+'" height="'+h+'">');
 document.write('</object>');
}


// ======================== MAPPA LOMBARDIA ======================== 
function provincia(posizione) {
 p = 0;
 if(posizione=='bergamo')  p = 1;
 if(posizione=='brescia')  p = 2;
 if(posizione=='como')p = 3;
 if(posizione=='cremona')  p = 4;
 if(posizione=='lecco')p = 5;
 if(posizione=='lodi')p = 6;
 if(posizione=='mantova')  p = 7;
 if(posizione=='milano')   p = 8;
 if(posizione=='monza')p = 9;
 if(posizione=='pavia')p = 10;
 if(posizione=='sondrio')  p = 11;
 if(posizione=='varese')   p = 12;
 document.getElementById('lombardia').style.backgroundPosition = '-' + (p*130) + 'px 0px';
}

// ======================== AGRITURISMO ======================== 
function preview(agriturismo, file) {
 document.getElementById('foto').style.backgroundImage = 'url(agriturismi/'+agriturismo+'/foto/agriturismo/preview/' + file + ')';
}
function previewZoom(agriturismo, file) {
 document.getElementById('zoom').style.backgroundColor= '#000000';
 document.getElementById('zoom').style.backgroundImage= 'url(agriturismi/'+agriturismo+'/foto/agriturismo/' +file + ')';
 document.getElementById('zoom').style.backgroundPosition = 'center center';
 document.getElementById('zoom').style.backgroundRepeat   = 'no-repeat';
 document.getElementById('zoom').style.display = '';
}
function previewClose() {
document.getElementById('zoom').style.display = 'none';
document.getElementById('zoom').style.backgroundImage = '';
}
function info(txt) {
 document.getElementById('ico_info').innerHTML = txt;
 document.getElementById('ico_info').style.display = '';
}

// ======================== EVENTI ======================== 
function cambiaMese(valore) {
 mese = mese + valore;
 if(mese>12) { mese = 1;  anno = anno + 1; }
 if(mese<1)  { mese = 12; anno = anno - 1; }
 if(mese==1)  mex = 'Gennaio';
 if(mese==2)  mex = 'Febbraio';
 if(mese==3)  mex = 'Marzo';
 if(mese==4)  mex = 'Aprile';
 if(mese==5)  mex = 'Maggio';
 if(mese==6)  mex = 'Giugno';
 if(mese==7)  mex = 'Luglio';
 if(mese==8)  mex = 'Agosto';
 if(mese==9)  mex = 'Settembre';
 if(mese==10) mex = 'Ottobre';
 if(mese==11) mex = 'Novembre';
 if(mese==12) mex = 'Dicembre';
 document.getElementById('m').innerHTML = mex;
 document.getElementById('anno_label').innerHTML = anno;
 exe.location.replace('exe_calendario.php?mese='+mese+'&anno='+anno);
}