function insertflash(flashmovie,breite,hoehe) {
  document.write('<object classid="CLSID:D27CDB6E-AE6D-11cf-96B8-444553540000" width="'+breite+'" height="'+hoehe+'" codebase="http://active.macromedia.com/flash2/cabs/swflash.cab#version=4,0,0,0">');
  document.write('<param name="movie" value="'+flashmovie+'" />');
  document.write('<param name="quality" value="high" />');
  document.write('<param name="menu" value="false" />');
  document.write('<embed src="'+flashmovie+'" border="0" quality="high" menu="false" width="'+breite+'" height="'+hoehe+'" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer"></embed>');
  document.write('</object>');
}

function info_inklusiv() {
  if(document.getElementById("infobox_inklusiv").style.display == "inline") {
    document.getElementById("infobox_inklusiv").style.display = "none";
  } else {
    document.getElementById("infobox_inklusiv").style.display = "inline";
  }
}

function showmap(picture,width,height) {
  F1 = window.open('','Fenster','width='+width+',height='+height+',dependent=yes,location=no,menubar=no,resizable=no,scrollbars=no,status=no,toolbar=no')
  var str = '';
  str += '<html>';
  str += '<head>';
  str += '<title>Hotel Watles</title>';
  str += '</head>';
  str += '<body onclick="self.close();" style="background-image:url('+picture+');background-repeat:no-repeat;background-position:0px 0px;cursor:pointer;">';
  str += '</body>';
  str += '</html>';
  F1.document.write(str);
}

function init(sp) {
  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) {
    inner.style.left=pos+'px';
  } else if (browsertyp==2) {
    document.layers.inner.style.left=pos+'px';
  } else if (browsertyp==3) {
    document.getElementById('inner').style.left=pos+'px';
  }
  if (navigator.userAgent.match(/msie/i) && navigator.userAgent.match(/7\.0/i)) {
    document.getElementById('inner').style.marginLeft='0px';
  } else {
    if (browsertyp==1) {
      inner.style.position='relative';
    } else if (browsertyp==2) {
      document.layers.inner.style.position='relative';
    } else if (browsertyp==3) {
      document.getElementById('inner').style.position='relative';
    }
  }
}

function scroll_left() {
  if (navigator.userAgent.match(/msie/i) && navigator.userAgent.match(/7\.0/i)) {
    iw=document.getElementById('tabelle').offsetWidth;
    if (iw) {
      xlimit=iw-document.getElementById('outer').offsetWidth;
      if (xlimit>0) {
        xlimit=(-1)*xlimit;
      } else {
        xlimit=0;
      }
      x=parseInt(document.getElementById('inner').style.marginLeft);
      if (x<0) {
        x=x+2;
        document.getElementById('inner').style.marginLeft=x+'px';
        if (over==1) {
          setTimeout("scroll_left("+xlimit+");",scrollspeed);
        }
      }
    }
  } else {
    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() {
  if (navigator.userAgent.match(/msie/i) && navigator.userAgent.match(/7\.0/i)) {
    x=parseInt(document.getElementById('inner').style.marginLeft);
    if (x>((document.getElementById('tabelle').offsetWidth-document.getElementById('outer').offsetWidth)*-1)) {
      x=x-2;
      document.getElementById('inner').style.marginLeft=x+'px';
      if (over==1) {
        setTimeout("scroll_right();",1);
      }
    }
  } else {
    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+");",1);
        }
      }
    }
  }
}

function panorama(ivr,initialview,autospin) {
  document.write('<applet archive="../panoramen/panoapplet.jar" code="panoapplet" style="width:451px; height:315px; margin:auto;">');
  document.write('<param name="file" value="../panoramen/ivr/'+ivr+'" />');
  document.write('<param name=initialView value="'+initialview+'" />');
  document.write('<param name="autospin" value="'+autospin+'" />');
  document.write('</applet>');
}