function loadFlash(site) {
  document.Flash = new Image();
  document.Flash.src = domain+'/flash/'+site+'.swf';
  var str = '';
  str += '<object type="application/x-shockwave-flash" data="'+domain+'/flash/'+site+'.swf" width="534" height="284">';
  str += '  <param name="allowScriptAccess" value="sameDomain" />';
  str += '  <param name="movie" value="'+domain+'/flash/'+site+'.swf" />';
  str += '  <param name="src" value="'+domain+'/flash/'+site+'.swf" />';
  str += '  <param name="loop" value="true" />';
  str += '  <param name="menu" value="false" />';
  str += '  <param name="quality" value="high" />';
  str += '  <param name="play" value="true" />';
  str += '  <param name="swLiveConnect" value="false" />';
  str += '</object>';
  document.getElementById('headerflash').innerHTML = str;
}

function position(divhoehe,divhoehe2) {
  hoehe=(document.body.clientHeight-divhoehe)/2;
  if (hoehe>0) {
    document.getElementById('container').style.marginTop=hoehe+'px';
    document.getElementById('container2').style.backgroundPosition=(Math.round((document.body.clientWidth-953)/2)+478)+'px '+((document.getElementById('container').offsetTop)-divhoehe2);
  }
}

function preloadPictures(anzahlPictures,getdirname,seite) {
  document.Vorladen = new Array();
  if (anzahlPictures > 0) {
    for(var i = 0; i <= anzahlPictures; i++) {
      document.Vorladen[i] = new Image();
      document.Vorladen[i].src = getdirname+'/images/'+seite+'g'+i+'.jpg';
    }
  }
}

function init(sp) {
  overimg=0;
  browsertyp=1;
  scrollspeed=sp;
  if (document.getElementById) {
    browsertyp=3;
  } else if(document.layers) {
    browsertyp=2;
  } else if(document.all) {
    browsertyp=1;
  }
  pos=0;
  if (browsertyp==1) {
    if (inner) {
      inner.style.left=pos+'px';
    }
  } else if (browsertyp==2) {
    if (document.layers.inner) {
      document.layers.inner.style.left=pos+'px';
    }
  } else if (browsertyp==3) {
    if (document.getElementById('inner')) {
      document.getElementById('inner').style.left=pos+'px';
    }
  }
}

function scroll_left() {
  var flag=false;
  if (browsertyp==1 && inner.style.left) {
    x=inner.style.left;
    flag=true;
  } else if (browsertyp==2 && document.layers.inner.style.left) {
    x=document.layers.inner.style.left;
    flag=true;
  } else if (browsertyp==3 && document.getElementById('inner').style.left) {
    x=document.getElementById('inner').style.left;
    flag=true;
  }
  if (flag==true) {
    x=parseInt(x.substring(0, (x.length-2)));
    if (x<0) {
      x=x+2;
      if (browsertyp==1) {
        inner.style.left=x+'px';
      } else if (browsertyp==2) {
        document.layers.inner.style.left=x+'px';
      } else if (browsertyp==3) {
        document.getElementById('inner').style.left=x+'px';
      }
      if (over==1) {
        setTimeout("scroll_left();",scrollspeed);
      }
    }
  }
}

function scroll_right() {
  var iw=0;
  if (browsertyp==1 && tabelle.offsetWidth) {
    iw=tabelle.offsetWidth;
  } else if (browsertyp==2 && document.layers.tabelle.offsetWidth) {
    iw=document.layers.tabelle.offsetWidth;
  } else if (browsertyp==3 && document.getElementById('tabelle').offsetWidth) {
    iw=document.getElementById('tabelle').offsetWidth;
  }
  if (iw) {
    xlimit=iw-document.getElementById('outer').offsetWidth;
    if (xlimit>0) {
      xlimit=(-1)*xlimit;
    } else {
      xlimit=0;
    }
    if (browsertyp==1) {
      x=inner.style.left;
    } else if (browsertyp==2) {
      x=document.layers.inner.style.left;
    } else if (browsertyp==3) {
      x=document.getElementById('inner').style.left;
    }
    x=parseInt(x.substring(0, (x.length-2)));
    if (x>xlimit) {
      x=x-2;
      if (browsertyp==1) { inner.style.left=x+'px'; }
      else if (browsertyp==2) { document.layers.inner.style.left=x+'px'; }
      else if (browsertyp==3) { document.getElementById('inner').style.left=x+'px'; }
      if (over==1) { setTimeout("scroll_right("+xlimit+");",scrollspeed); }
    }
  }
}

function showmap() {
  Karte = window.open('karte.htm','Karte','width=481,height=308,dependent=yes,location=no,menubar=no,resizable=no,scrollbars=no,status=no,toolbar=no');
}

function bild_on(oben,links,bild,text) {
  document.getElementById('pic').style.visibility='visible';
  document.getElementById('pic').style.margin=oben+'px 0px 0px '+links+'px';
  document.getElementById('pic').src=bild;
  document.getElementById(text).style.visibility='visible';
}

function bild_out(text) {
  document.getElementById('pic').style.visibility='hidden';
  document.getElementById(text).style.visibility='hidden';
}

var pop = null;

function popdown() {
  if (pop && !pop.closed) pop.close();
}

<!-- START BookingPILOT Search -->
function sewaRequest(obj,hid,ln) {
  var url = (obj.getAttribute) ? obj.getAttribute('href') : obj.href;
  if (!url) return true;
  popdown();
  pop = window.open("http://bookingpilot.crmpilot.it/booking/anfrage.asp?hotel_id="+hid+"&pid=6&rid=6&lang="+ln+"&anzahl_erw=2&alterkind1=&alterkind2=&alterkind3=","sewaAPI","width=750, height=720, scrollbars=1");
  return (pop) ? false : true;
}
<!-- START BookingPILOT Search -->

window.onunload = popdown;
window.onfocus = popdown;