<!--
var bookmarkurl="http://www.baobabamiciditampellin.org"
var bookmarktitle="Baobab - Amici di Tampellin onlus"

var myPopupWindow=null;
photo = new Array(10);
title = new Array(10);
title_eng = new Array(10);
w = new Array(10);
h = new Array(10);
logo   ='../images/logo_sito.jpg';
chiudi ='../images/chiudi.gif';
chiudi_eng ='../images/chiudi_eng.gif';
logo_h = 80;

video_width  = 660;
video_height = 620;

photo[1]='../images/image1.jpg'; w[1]=340; h[1]=550+logo_h; title[1]='Questa è l\'immagine di...';
photo[2]='../images/image2.jpg'; w[2]=390; h[2]=480+logo_h; title[2]='Questa è l\'immagine di...';
photo[3]='../images/chisiamo_large1.jpg'; w[3]=473; h[3]=380+logo_h; title[3]='Questa è l\'immagine di...';
photo[4]='../images/chisiamo_large2.jpg'; w[4]=473; h[4]=415+logo_h; title[4]='Questa è l\'immagine di...';
photo[5]='../images/chisiamo_large3.jpg'; w[5]=470; h[5]=415+logo_h; title[5]='Questa è l\'immagine di...';
photo[6]='../images/chisiamo_large4.jpg'; w[6]=470; h[6]=415+logo_h; title[6]='Questa è l\'immagine di...';
photo[7]='../images/chisiamo_large5.jpg'; w[7]=470; h[7]=415+logo_h; title[7]='Questa è l\'immagine di...';
photo[8]='../images/chisiamo_large6.jpg'; w[8]=470; h[8]=415+logo_h; title[8]='Questa è l\'immagine di...';
photo[9]='../images/chisiamo_large7.jpg'; w[9]=470; h[9]=415+logo_h; title[9]='Questa è l\'immagine di...';
photo[10]='../images/chisiamo_large8.jpg'; w[10]=470; h[10]=415+logo_h; title[10]='Questa è l\'immagine di...';
photo[11]='../images/chisiamo_large9.jpg'; w[11]=470; h[11]=415+logo_h; title[11]='Questa è l\'immagine di...';
photo[12]='../images/chisiamo_large10.jpg'; w[12]=470; h[12]=415+logo_h; title[12]='Questa è l\'immagine di...';
photo[13]='../images/progetti_large1.jpg'; w[13]=470; h[13]=415+logo_h; title[13]='Questa è l\'immagine di...';
photo[14]='../images/progetti_large2.jpg'; w[14]=470; h[14]=490+logo_h; title[14]='Questa è l\'immagine di...';
photo[15]='../images/progetti_large3.jpg'; w[15]=470; h[15]=415+logo_h; title[15]='Questa è l\'immagine di...';
photo[16]='../images/disp_large1.jpg'; w[16]=540; h[16]=450+logo_h; title[16]='Questa è l\'immagine di...';
photo[17]='../images/disp_large2.jpg'; w[17]=540; h[17]=450+logo_h; title[17]='Questa è l\'immagine di...';
photo[18]='../images/disp_large3.jpg'; w[18]=540; h[18]=450+logo_h; title[18]='Questa è l\'immagine di...';
photo[19]='../images/disp_large4.jpg'; w[19]=540; h[19]=450+logo_h; title[19]='Questa è l\'immagine di...';
photo[20]='../images/disp_large5.jpg'; w[20]=540; h[20]=450+logo_h; title[20]='Questa è l\'immagine di...';
photo[21]='../images/home_large1.jpg'; w[21]=470; h[21]=400+logo_h; title[21]='Questa è l\'immagine di...';
photo[22]='../images/home_large2.jpg'; w[22]=470; h[22]=360+logo_h; title[22]='Questa è l\'immagine di...';
photo[23]='../images/home_large3.jpg'; w[23]=470; h[23]=560+logo_h; title[23]='Questa è l\'immagine di...';
photo[24]='../images/home_large4.jpg'; w[24]=400; h[24]=450+logo_h; title[24]='Questa è l\'immagine di...';
photo[25]='../images/bambini_large1.jpg'; w[25]=480; h[25]=400+logo_h; title[25]='Questa è l\'immagine di...';
photo[26]='../images/bambini_large2.jpg'; w[26]=480; h[26]=400+logo_h; title[26]='Questa è l\'immagine di...';
photo[27]='../images/bambini_large3.jpg'; w[27]=480; h[27]=400+logo_h; title[27]='Questa è l\'immagine di...';
photo[28]='../images/bambini_large4.jpg'; w[28]=480; h[28]=360+logo_h; title[28]='Questa è l\'immagine di...';
photo[29]='../images/bambini_large5.jpg'; w[29]=480; h[29]=400+logo_h; title[29]='Questa è l\'immagine di...';
photo[30]='../images/bambini_large6.jpg'; w[30]=480; h[30]=400+logo_h; title[30]='Questa è l\'immagine di...';
photo[31]='../images/bambini_large7.jpg'; w[31]=480; h[31]=750+logo_h; title[31]='Questa è l\'immagine di...';
photo[32]='../images/bambini_large8.jpg'; w[32]=480; h[32]=660+logo_h; title[32]='Questa è l\'immagine di...';
photo[33]='../images/luoghi_large1.jpg'; w[33]=480; h[33]=360+logo_h; title[33]='Questa è l\'immagine di...';
photo[34]='../images/luoghi_large2.jpg'; w[34]=480; h[34]=400+logo_h; title[34]='Questa è l\'immagine di...';
photo[35]='../images/luoghi_large3.jpg'; w[35]=480; h[35]=400+logo_h; title[35]='Questa è l\'immagine di...';
photo[36]='../images/luoghi_large4.jpg'; w[36]=480; h[36]=290+logo_h; title[36]='Questa è l\'immagine di...';
photo[37]='../images/luoghi_large5.jpg'; w[37]=480; h[37]=410+logo_h; title[37]='Questa è l\'immagine di...';
photo[38]='../images/luoghi_large6.jpg'; w[38]=480; h[38]=400+logo_h; title[38]='Questa è l\'immagine di...';
photo[39]='../images/luoghi_large7.jpg'; w[39]=480; h[39]=400+logo_h; title[39]='Questa è l\'immagine di...';
photo[40]='../images/luoghi_large8.jpg'; w[40]=480; h[40]=400+logo_h; title[40]='Questa è l\'immagine di...';
photo[41]='../images/partners_large1.jpg'; w[41]=480; h[41]=400+logo_h; title[41]='Questa è l\'immagine di...';
photo[42]='../images/partners_large2.jpg'; w[42]=480; h[42]=500+logo_h; title[42]='Questa è l\'immagine di...';
photo[43]='../images/partners_large3.jpg'; w[43]=480; h[43]=400+logo_h; title[43]='Questa è l\'immagine di...';
photo[44]='../images/partners_large4.jpg'; w[44]=480; h[44]=640+logo_h; title[44]='Questa è l\'immagine di...';
photo[45]='../images/partners_large5.jpg'; w[45]=480; h[45]=800+logo_h; title[45]='Questa è l\'immagine di...';
photo[46]='../images/tampellin_large1.jpg'; w[46]=470; h[46]=400+logo_h; title[46]='Questa è l\'immagine di...';
photo[47]='../images/tampellin_large2.jpg'; w[47]=470; h[47]=620+logo_h; title[47]='Questa è l\'immagine di...';
photo[48]='../images/tampellin_large3.jpg'; w[48]=470; h[48]=660+logo_h; title[48]='Questa è l\'immagine di...';
photo[49]='../images/scuola_large1.jpg'; w[49]=470; h[49]=500+logo_h; title[49]='Questa è l\'immagine di...';
photo[50]='../images/scuola_large2.jpg'; w[50]=470; h[50]=600+logo_h; title[50]='Questa è l\'immagine di...';
photo[51]='../images/scuola_large3.jpg'; w[51]=470; h[51]=500+logo_h; title[51]='Questa è l\'immagine di...';
photo[52]='../images/scuola_large4.jpg'; w[52]=470; h[52]=500+logo_h; title[52]='Questa è l\'immagine di...';
photo[53]='../images/scuola_large5.jpg'; w[53]=600; h[53]=500+logo_h; title[53]='Questa è l\'immagine di...';
photo[54]='../images/bomboniera_large1.jpg'; w[54]=800; h[54]=600+logo_h; title[54]='Questa è l\'immagine di...';
photo[55]='../images/bomboniera_large2.jpg'; w[55]=800; h[55]=600+logo_h; title[55]='Questa è l\'immagine di...';
photo[56]='../images/bomboniera_large3.jpg'; w[56]=800; h[56]=600+logo_h; title[56]='Questa è l\'immagine di...';
photo[57]='../images/bomboniera_large.jpg'; w[57]=800; h[57]=1000+logo_h; title[57]='Questa è l\'immagine di...';
photo[58]='../images/corecorde_large1.jpg'; w[58]=800; h[58]=600+logo_h; title[58]='Questa è l\'immagine di...';
photo[59]='../images/corecorde_large2.jpg'; w[59]=800; h[59]=600+logo_h; title[59]='Questa è l\'immagine di...';
photo[60]='../images/corecorde_large3.jpg'; w[60]=800; h[60]=600+logo_h; title[60]='Questa è l\'immagine di...';
photo[61]='../images/salvatore_large1.jpg'; w[61]=600; h[61]=450+logo_h; title[61]='Questa è l\'immagine di...';
photo[62]='../images/salvatore_large2.jpg'; w[62]=500; h[62]=650+logo_h; title[62]='Questa è l\'immagine di...';
photo[63]='../images/salvatore_large3.jpg'; w[63]=600; h[63]=450+logo_h; title[63]='Questa è l\'immagine di...';
title_eng[1]='Questa è l\'immagine di...';
title_eng[2]='Questa è l\'immagine di...';
title_eng[3]='Questa è l\'immagine di...';
title_eng[4]='Questa è l\'immagine di...';
title_eng[5]='Questa è l\'immagine di...';
title_eng[6]='Questa è l\'immagine di...';
title_eng[7]='Questa è l\'immagine di...';
title_eng[8]='Questa è l\'immagine di...';
title_eng[9]='Questa è l\'immagine di...';
title_eng[10]='Questa è l\'immagine di...';
title_eng[11]='Questa è l\'immagine di...';
title_eng[12]='Questa è l\'immagine di...';
title_eng[13]='Questa è l\'immagine di...';
title_eng[14]='Questa è l\'immagine di...';
title_eng[15]='Questa è l\'immagine di...';
title_eng[16]='Questa è l\'immagine di...';
title_eng[17]='Questa è l\'immagine di...';
title_eng[18]='Questa è l\'immagine di...';
title_eng[19]='Questa è l\'immagine di...';
title_eng[20]='Questa è l\'immagine di...';
title_eng[21]='Questa è l\'immagine di...';
title_eng[22]='Questa è l\'immagine di...';
title_eng[23]='Questa è l\'immagine di...';
title_eng[24]='Questa è l\'immagine di...';

// to show a picture inside a new popup window
function ShowPicture(ver, pic)
{
LeftPosition=(screen.width)?(screen.width-w[pic])/2:100;
TopPosition=(screen.height)?(screen.height-h[pic])/2:100;

settings='width='+ w[pic] + ',height='+ h[pic] + ',top=' + TopPosition + ',left=' + LeftPosition + ',location=no,directories=no,menubar=no,toolbar=no,status=no,scrollbars=no,resizable=no,dependent=no';
myPopupWindow = window.open('','myPopupWindow'+pic,settings);

myPopupWindow.focus();
myPopupWindow.document.write('<html><head>');
if (ver == 'ita')
   {
   myPopupWindow.document.write('<title>'+title[pic]+'</title>');
   myPopupWindow.document.write('<link rel=stylesheet href="../css/tampellin.css" type="text/css">');
   myPopupWindow.document.write('</head>');
   myPopupWindow.document.write('<body bgcolor="#F8F6E3">');
   myPopupWindow.document.write('<div id="immagine_popup">');
   myPopupWindow.document.write('<center><img src="'+logo+'"></center>');
   myPopupWindow.document.write('<img src="'+photo[pic]+'"><br><br>');
   //myPopupWindow.document.write('<center>'+title[pic]+'</center>');
   myPopupWindow.document.write('</div>');
   myPopupWindow.document.write('<div align="center"> <img class="immagine" src="'+chiudi+'" alt="Chiudi pop-up" onClick="window.close()"> </div>');
   myPopupWindow.document.write('</body></html>');
   }
else
   {
   myPopupWindow.document.write('<title>'+title_eng[pic]+'</title>');
   myPopupWindow.document.write('<link rel=stylesheet href="../css/tampellin.css" type="text/css">');
   myPopupWindow.document.write('</head>');
   myPopupWindow.document.write('<body bgcolor="#F8F6E3">');
   myPopupWindow.document.write('<div id="immagine_popup">');
   myPopupWindow.document.write('<center><img src="'+logo+'"></center>');
   myPopupWindow.document.write('<img src="'+photo[pic]+'"><br><br>');
   //myPopupWindow.document.write('<center>'+title_eng[pic]+'</center>');
   myPopupWindow.document.write('</div>');
   myPopupWindow.document.write('<div align="center"> <img class="immagine" src="'+chiudi_eng+'" alt="Close pop-up" onClick="window.close()"> </div>');
   myPopupWindow.document.write('</body></html>');
   }
}

// to show a picture inside a new popup window
function ShowVideo(num) 
{
if (num == 0)
{
LeftPosition=(screen.width)?(screen.width-video_width)/2:100;
TopPosition=(screen.height)?(screen.height-video_height)/2:100;

settings='width='+ video_width + ',height='+ video_height + ',top=' + TopPosition + ',left=' + LeftPosition + ',location=no,directories=no,menubar=no,toolbar=no,status=no,scrollbars=no,resizable=no,dependent=no';
myPopupWindow = window.open('php/video_flv.php','videoPopupWindow',settings);
} 
else
{
LeftPosition=(screen.width)?(screen.width-video_width)/2:100;
TopPosition=(screen.height)?(screen.height-video_height)/2:100;

settings='width='+ video_width + ',height='+ video_height + ',top=' + TopPosition + ',left=' + LeftPosition + ',location=no,directories=no,menubar=no,toolbar=no,status=no,scrollbars=no,resizable=no,dependent=no';
myPopupWindow = window.open('php/video1_flv.php','videoPopupWindow',settings);
} 

myPopupWindow.focus();
// myPopupWindow.document.write('<html><head>');
// myPopupWindow.document.write('<title>Baobab - Amici di Tampellin</title>');
// myPopupWindow.document.write('<link rel=stylesheet href="../css/tampellin.css" type="text/css">');
// myPopupWindow.document.write('<script language="JavaScript1.2" src="../js/swfobject.js"></script>');
// myPopupWindow.document.write('</head>');
// myPopupWindow.document.write('<body bgcolor="#F8F6E3">');
// myPopupWindow.document.write('<div id="immagine_popup">');
// myPopupWindow.document.write('<center><img src="'+logo+'"></center>');
// myPopupWindow.document.write('<br>');
// myPopupWindow.document.write('<div id="container"> </div>');
// myPopupWindow.document.write('<script type="text/javascript">');
// myPopupWindow.document.write('var s1 = new SWFObject("swf/player.swf","ply","614","480","9","#FFFFFF");');
// myPopupWindow.document.write('s1.addParam("allowfullscreen","true");');
// myPopupWindow.document.write('s1.addParam("allowscriptaccess","always");');
// myPopupWindow.document.write('s1.addParam("flashvars","file=../video/video.flv&image=images/video_preview.jpg");');
// myPopupWindow.document.write('s1.write("container");');
// myPopupWindow.document.write('</script>');
// myPopupWindow.document.write('</div>');
// myPopupWindow.document.write('<div align="center"> <img class="immagine" src="'+chiudi+'" alt="Chiudi pop-up" onClick="window.close()"> </div>');
// myPopupWindow.document.write('</body></html>');
}

// to change mouse form when over a picture
function MouseChange(mouseForm)
{
if (mouseForm == 1) {
   document.body.style.cursor = "hand";
   } 
else {
   document.body.style.cursor = "auto";
   }
}

function getFlashMovieObject(movieName)
{
if(document.embeds[movieName])
return document.embeds[movieName];
if(window.document[movieName])
return window.document[movieName];
if(window[movieName])
return window[movieName];
if(document[movieName])
return document[movieName];

return null;
}

function Max(A, B, C)
{
return Math.max(Math.max(A,B),C);
}

// to pass variables to flash swf
function doPassVar(arg){
   FlashId = getFlashMovieObject("banner");
   FlashId.SetVariable("whichMenu", arg);
//   if (window.banner) window.document.banner.SetVariable("whichMenu", arg);
//   else document.banner.SetVariable("whichMenu", arg);
//   document.getElementById("banner").SetVariable("whichMenu", arg);
//   if (document.banner) window.document.banner.SetVariable("whichMenu", arg);
//   if (window.banner) window.document["banner"].SetVariable("whichMenu", arg);
   // window.document["banner"].SetVariable("whichMenu", arg);
}

// Set column_sx and column_dx height using the column_midle as reference
function setLongest() {
   browser = navigator.appName;

   divLen1 = document.getElementById("fine1").offsetTop;
   divLen2 = document.getElementById("fine2").offsetTop;
   divLen3 = document.getElementById("fine3").offsetTop;
   divLen = Max(divLen1, divLen2, divLen3);
   if (browser=="Microsoft Internet Explorer") 
      {
//      divLen1 = document.getElementById("colonna_sx").offsetHeight;
//      divLen2 = document.getElementById("colonnadimezzo").offsetHeight;
//      divLen3 = document.getElementById("colonna_dx").offsetHeight;
      topPiede = divLen-document.body.clientHeight-500;
      }
   else
      {
      topPiede = divLen-document.body.clientHeight+20;
      }

   //alert(divLen + " - " + divLen1 + " - " + divLen2 + " - " + divLen3);
   document.getElementById("colonna_sx").style.height = divLen+"px";
   if (document.getElementById("colonnadimezzo") != null)
      {
      document.getElementById("colonnadimezzo").style.height = divLen+"px";
      document.getElementById("colonna_dx").style.height = divLen+"px";
      }
   else
      {
      document.getElementById("cdm_wide").style.height = divLen+"px";
      document.getElementById("cdx_slim").style.height = divLen+"px";
      }
   document.getElementById("barretta").style.top = topPiede;
   document.getElementById("piede").style.top    = topPiede;
}

function addbookmark() {
if (window.sidebar) { // firefox
   window.sidebar.addPanel(bookmarktitle, bookmarkurl,"");
} else if (document.all) { //MSIE
   window.external.AddFavorite(bookmarkurl,bookmarktitle)
}
}

function homepage()
{
if (document.all) { //MSIE
   document.body.style.behavior='url(#default#homepage)';
   document.body.setHomePage(bookmarkurl);
} else if (window.sidebar) { // Firefox
   if(window.netscape) {
      try {  
         netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");  
         }  
      catch(e) {  
         alert("this action was aviod by your browser,if you want to enable,please enter about:config in your address line,and change the value of signed.applets.codebase_principal_support to true");  
         }
      } 
   var prefs = Components.classes['@mozilla.org/preferences-service;1'].getService(Components. interfaces.nsIPrefBranch);
   prefs.setCharPref('browser.startup.homepage',bookmarkurl);
}

}
//-->
