<!--

function mmLoadMenus() {
  if (window.mm_menu_0126153614_0) return;
  window.mm_menu_0126153614_0 = new Menu("root",130,18,"Verdana, Arial, Helvetica, sans-serif",10,"#003366","#FF9900","#FFFFFF","#B7F0FF","left","middle",3,0,1000,-5,7,true,true,true,0,true,true);
  mm_menu_0126153614_0.addMenuItem("STANDORTE","location='/de/sedi.asp'");
  mm_menu_0126153614_0.addMenuItem("BOOTE","location='/de/imbarcazioni.asp'");
  mm_menu_0126153614_0.addMenuItem("TAUCHGÄNGE","location='/de/immersioni.asp'");
   mm_menu_0126153614_0.fontWeight="bold";
   mm_menu_0126153614_0.hideOnMouseOut=true;
   mm_menu_0126153614_0.bgColor='#555555';
   mm_menu_0126153614_0.menuBorder=1;
   mm_menu_0126153614_0.menuLiteBgColor='#FFFFFF';
   mm_menu_0126153614_0.menuBorderBgColor='#777777';

  window.mm_menu_0126164644_0 = new Menu("root",210,18,"Verdana, Arial, Helvetica, sans-serif",10,"#003366","#FF9900","#FFFFFF","#B7F0FF","left","middle",3,0,1000,-5,7,true,true,true,0,true,true);
  mm_menu_0126164644_0.addMenuItem("ÜBERNACHTUNGSMÖGLICHKEITEN","location='/de/dove_dormire.asp'");
  mm_menu_0126164644_0.addMenuItem("ANFAHRTSBESCHREIBUNG","location='/de/come_arrivare.asp'");
  mm_menu_0126164644_0.addMenuItem("FÄHREN","location='/de/traghetti.asp'");
   mm_menu_0126164644_0.fontWeight="bold";
   mm_menu_0126164644_0.hideOnMouseOut=true;
   mm_menu_0126164644_0.bgColor='#555555';
   mm_menu_0126164644_0.menuBorder=1;
   mm_menu_0126164644_0.menuLiteBgColor='#FFFFFF';
   mm_menu_0126164644_0.menuBorderBgColor='#777777';

  window.mm_menu_0210100426_0 = new Menu("root",100,16,"Verdana, Arial, Helvetica, sans-serif",10,"#003366","#FF9900","#FFFFFF","#B7F0FF","left","middle",3,0,1000,-5,7,true,true,true,0,true,true);
  mm_menu_0210100426_0.addMenuItem("ELBA&nbsp;ISLAND","location='/de/isola_elba.asp'");
  mm_menu_0210100426_0.addMenuItem("PARK","location='/de/parco.asp'");
   mm_menu_0210100426_0.fontWeight="bold";
   mm_menu_0210100426_0.hideOnMouseOut=true;
   mm_menu_0210100426_0.bgColor='#555555';
   mm_menu_0210100426_0.menuBorder=1;
   mm_menu_0210100426_0.menuLiteBgColor='#FFFFFF';
   mm_menu_0210100426_0.menuBorderBgColor='#777777';

mm_menu_0210100426_0.writeMenus();
}

function init()
{
	initScroller();
}

function printPage()
{
	window.location = window.location + "&forprint";
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_validateForm() { //v4.0
  var i,p,q,nm,test,num,min,max,errors='',args=MM_validateForm.arguments;
  for (i=0; i<(args.length-2); i+=3) { test=args[i+2]; val=MM_findObj(args[i]);
    if (val) { nm=val.name; if ((val=val.value)!="") {
      if (test.indexOf('isEmail')!=-1) { p=val.indexOf('@');
        if (p<1 || p==(val.length-1)) errors+='- '+nm+' must contain an e-mail address.\n';
      } else if (test!='R') { num = parseFloat(val);
        if (isNaN(val)) errors+='- '+nm+' must contain a number.\n';
        if (test.indexOf('inRange') != -1) { p=test.indexOf(':');
          min=test.substring(8,p); max=test.substring(p+1);
          if (num<min || max<num) errors+='- '+nm+' must contain a number between '+min+' and '+max+'.\n';
    } } } else if (test.charAt(0) == 'R') errors += '- '+nm+' obbligatoria!\n'; }
  } if (errors) alert('Errore di inserimento:\n'+errors);
  document.MM_returnValue = (errors == '');
}

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}


var arTXT = new Array(

'<A href="/it/news_promozioni.asp" class="piccolo_bianco"><strong>Diving in Elba riapre la stagione nel blu a fine marzo 2006</strong></A>'
,'<A href="/it/news_promozioni.asp" class="piccolo_bianco"><strong>Diving in Elba avrà una nuova prestigiosa terza sede c/o Hotel Hermitage nel Golfo della Biodola</strong></A>'
,'<A href="/it/news_promozioni.asp" class="piccolo_bianco"><strong>Diving in Elba diventa PADI DIVING CENTER con servizi sempre più completi e professionali</strong></A>'
,'<A href="/it/news_promozioni.asp" class="piccolo_bianco"><strong>DA QUESTO ANNO ANCHE NITROX! Super offerte...</strong></A>'
);



NS4=(document.layers);IE4=(document.all);isDOM=((document.getElementById)&&(!IE4))?true:false;
isOP=(navigator.userAgent.indexOf('Opera') != -1)?true:false;
if((NS4||IE4||isDOM)&&(!isOP)){

interval=30;
increment=1;
pause=4000;
bannerColor="#99CCFF";
leftPadding=10;
topPadding=3;
maxLoops=50;
loopCount = 0;
numheadlines = 4;
target=' TARGET="_top" '
classid=' CLASS="headlines" '
isMac=(navigator.userAgent.indexOf('Mac') != -1)?true:false;

function reDo(){
	window.location.reload();
}

function getObj(i){
   if (isDOM) {
      obj=document.getElementById("msg"+i).style;
   }else{
      obj=eval("msg"+i+((IE4)?".style":""));
   }
   return obj;
}

function showMsg(n,show){
   var theEl=getObj(n);
   theEl.visibility=(show)?"visible":"hidden";
}

function nextMsg(){
   var fm=current;
   current=(fm==ar.length-1)?0:fm+1;
   if(current==1)loopCount++;
   if( (maxLoops > 0) && (loopCount >= maxLoops) ) return;
   scrollBnr(fm,current);
}

function moveUp(){
   if (isDOM) {
		var inttoeltopdec = parseInt(toEl.top)-increment;
		fmEl.top=parseInt(fmEl.top) - increment; // + "px" not nec
      if(inttoeltopdec<=toElTarget){
         toEl.top=toElTarget;
         clearInterval(intervalID);
        fmEl.visibility="hidden";
         timeoutID=setTimeout("nextMsg()",pause);
      }else{
         toEl.top=inttoeltopdec; // no px
      }
   }else{
      if(NS4){
         var inttoeltopdec = toEl.top-increment;
         fmEl.top-=increment;
         if(inttoeltopdec<=toElTarget){
            toEl.top=toElTarget;
            clearInterval(intervalID);
            fmEl.visibility="hidden";
            timeoutID=setTimeout("nextMsg()",pause);
         }else{
            toEl.top=inttoeltopdec;
         }
      }else{
         var inttoeltopdec = toEl.pixelTop-increment;
         fmEl.pixelTop-=increment;
         if(inttoeltopdec<=toElTarget){
            toEl.pixelTop=toElTarget;
            clearInterval(intervalID);
            fmEl.visibility="hidden";
            timeoutID=setTimeout("nextMsg()",pause);
         }else{
            toEl.pixelTop=inttoeltopdec;
         }
      }
   }
}

function scrollBnr(fm,to){
   fmEl=getObj(fm);
   toEl=getObj(to);
   if (isDOM) {
	toElTarget=parseInt(fmEl.top);        // save one parseInt 010224
	toEl.top=(toElTarget+bnrHit) + "px"; 
//      toEl.top=(parseInt(fmEl.top)+bnrHit) + "px";
//      toElTarget=parseInt(fmEl.top);
   }else{
      if(NS4){
         toEl.top=fmEl.top+bnrHit;
         toElTarget=fmEl.top;
      }else{
         toEl.pixelTop=fmEl.pixelTop+bnrHit;
         toElTarget=fmEl.pixelTop;
      }
   }
   showMsg(to,true);
	intervalID=setInterval("moveUp()",interval);
	// can use setTimeout for evengreater speed - abk 010227
}

function moveIE(lPos,tPos){this.style.pixelLeft=lPos;this.style.pixelTop=tPos;}
function moveDOM(lPos,tPos){this.style.left=lPos+"px";this.style.top=tPos+"px";}

function makeIE(){
	var text='<DIV ID="bnr" STYLE="position:absolute;overflow:hidden;top:'+bnrTop+';left:'+bnrLft +';width:'+bnrWid+';height:'+bnrHit+'">';
	msgWid=bnrWid-leftPadding;
	for(var i=ar.length-1;i>=0;i--){
		text+='<DIV ID="msg'+i+'" STYLE="position:absolute;overflow:hidden;visibility:hidden;top:'+ topPadding +';left:'+leftPadding+';width:'+msgWid+'"><\/DIV>';
	}
	text+='<\/DIV>';	
	document.body.insertAdjacentHTML("BeforeEnd",text);
	
	for(i=0;i<ar.length;i++){
		var scroller = eval("msg"+i);
		scroller.moveTo=moveIE;
	}
}

function makeDOM(){
	var elmParentDiv;
   
	elmParentDiv = document.createElement('div');
	elmParentDiv.id = 'bnr';
	elmParentDiv.style.position = 'absolute';
	elmParentDiv.style.overflow = 'hidden';
	elmParentDiv.style.top = bnrTop + 'px';
	elmParentDiv.style.left = bnrLft + 'px';
	elmParentDiv.style.width = bnrWid + 'px';
	elmParentDiv.style.height = bnrHit + 'px';
	
	var elmChildDiv;
	var i;

	msgWid=bnrWid-leftPadding;

   for (i = ar.length - 1; i >= 0; i--)
   {
       elmChildDiv = document.createElement('div');
       elmChildDiv.id = 'msg' + i;
       elmChildDiv.style.position = 'absolute';
       elmChildDiv.style.visibility = 'hidden';
       elmChildDiv.style.overflow = 'hidden';
       elmChildDiv.style.top = topPadding + 'px';
       elmChildDiv.style.left = leftPadding + 'px';
       elmChildDiv.style.width = msgWid + 'px';

       elmParentDiv.appendChild(elmChildDiv);
       
       elmChildDiv.moveTo=moveDOM;
   }
   
   document.body.appendChild(elmParentDiv);
}

function makeNS(){
   bnr=new Layer(bnrWid);
   with(bnr){
      clip.right=bnrWid;
      clip.bottom=bnrHit;
      moveTo(bnrLft,bnrTop);
      visibility="show";
   }	

   for(var i=0;i<ar.length;i++){
      eval("msg"+i+"="+"new Layer(bnrWid-leftPadding,bnr)");
      with(eval("msg"+i)){
         moveTo(leftPadding,topPadding);
      }
   }
}

function fillBnr(){
   var theEl;
   for(i=0;i<ar.length;i++){
      if (isDOM){
         theEl=document.getElementById("msg"+i);
      }else{
         theEl=eval("msg"+i);
      }

      newsStr="<font face='Verdana, Arial, Helvetica, sans-serif' size='-1'><A "+target+classid+
              ">"+ar[newsCount][1]+"<\/A></font>";
	

      if(NS4){
         with(theEl.document){write(newsStr);close();}
      }else{
         theEl.innerHTML=newsStr;
      }
      newsCount++;if(newsCount==ar.length)newsCount=0;
   }
}

function startBnr(){
   if (isDOM){makeDOM();}
      else{(NS4)?makeNS():makeIE();}
   fillBnr();
   showMsg(0,true);
   current=0;
   window.onresize=reDo;
   timeoutID=setTimeout("nextMsg()",pause);
}

function initScroller() {
   ar=[];
   for(i=0;i<numheadlines;i++){ar[i]=['',arTXT[i]];}
   newsCount=0;
   ispaused=0;
   bnrWid = 560; // parseInt(pHT.width)-20;
   bnrHit = 20; //parseInt(pHT.height)-20;
   bnrTop=bnrLft=0;

   if (document.getElementById){
      pHT=document.getElementById('ph1');
   }else{pHT=document.images['ph1'];}
   if(pHT){
      bnrWid=560 // parseInt(pHT.width)-20;
      bnrHit=20 //parseInt(pHT.height)-20;
      bnrOffsetLeft=(parseInt(pHT.width)-bnrWid) / 2;
      bnrOffsetTop=(parseInt(pHT.height)-bnrHit) / 2;
      if(document.getElementById){
         bnrTop=((isMac)&&(IE4))?pHT.clientTop:pHT.offsetTop;
         bnrLft=((isMac)&&(IE4))?pHT.clientLeft:pHT.offsetLeft;
         tEl=pHT;
         while(tEl.offsetParent != null) {
            tEl=tEl.offsetParent;
            bnrTop+=((isMac)&&(IE4))?tEl.clientTop:tEl.offsetTop;
            bnrLft+=((isMac)&&(IE4))?tEl.clientLeft:tEl.offsetLeft;
         }
      }else{
         if (IE4) {
            arPH=[level1,level2,level3,level4,level5];
            bnrTop=bnrLft=0;
            for(i=0;i<arPH.length;i++){
               tEl = arPH[i];
               bnrTop+=tEl.offsetTop;
               bnrLft+=tEl.offsetLeft;
            }
         }else{
            bnrTop = pHT.y;
            bnrLft = pHT.x;
         }
      }
      bnrLft+=bnrOffsetLeft;
      bnrTop+=bnrOffsetTop;
      startBnr();
   }
}
}


//-->