function BilderVorladen() {
  document.Vorladen = new Array();
  if(document.images) {
    for(var i = 0; i < BilderVorladen.arguments.length; i++) {
      document.Vorladen[i] = new Image();
      document.Vorladen[i].src = BilderVorladen.arguments[i];
    }
  }
}
BilderVorladen('/images/r_button.gif','/images/r_button_marked.gif');

function popup(site,picture,width,height) {
  var html = '';
  F1=window.open('','','top=10,left=10,width='+width+',height='+height+',dependent=yes,location=no,hotkeys=no,menubar=no,resizable=no,scrollbars=no,status=no,toolbar=no');
  html += '<html>';
  html += '  <head>';
  html += '    <title>Hotel Tyrol</title>';
  html += '  </head>';
  html += '  <body style="cursor:pointer;margin:0px;padding:0px;background-image:url('+site+'/images/'+picture+');" onclick="self.close();">';
  html += '  </body>';
  html += '</html>';
  F1.document.write(html);
  return false;
}

function position() {
	hoehe=(document.body.clientHeight-585)/2;
	if (hoehe>0) {
		document.getElementById('container').style.marginTop=hoehe+'px';
	}
}

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) {
    inner.style.top=pos+'px';
  } else if (browsertyp==2) {
    document.layers.inner.style.top=pos+'px';
  } else if (browsertyp==3) {
    document.getElementById('inner').style.top=pos+'px';
  }
}

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

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