var suite_aktiv = 1;
var isover=0;
var menuewahl=1;
var opac=0;
var farben=Array('#505050','#585858','#606060','#686868','#707070','#787878','#808080','#888888','#909090','#989898','#A0A0A0','A8A8A8','#B0B0B0','#B8B8B8','#C0C0C0','#C8C8C8','#D0D0D0','#D8D8D8','#E0E0E0','#E8E8E8','#F0F0F0');

/*window.onresize = function() { position(); }*/

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+'" wmode="opaque" 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 showsub (welches) {
  document.getElementById("sub_"+welches).style.visibility='visible';
  document.getElementById("link_"+welches).style.textDecoration='underline';
}

function hidesub (welches) {
  document.getElementById("sub_"+welches).style.visibility='hidden';
  document.getElementById("link_"+welches).style.textDecoration='none';
}

function position() {
  var breite=document.body.clientWidth;
  var rand=0; var pl=0;
  if (breite>963) {
    rand=Math.floor((breite-963)/2);
    if (rand<155) {
      document.getElementById('bogen_links').style.width=rand+'px';
      document.getElementById('bogen_links').style.backgroundPosition=(-155+rand)+'px';
      document.getElementById('bogen_rechts').style.width=rand+'px';
      document.getElementById('container').style.width=963+(2*rand)+'px';
      document.getElementById('sprachen').style.marginLeft=rand+'px';
      document.getElementById('anschrift').style.marginLeft=rand+'px';
    }
  }
  document.getElementById('linie1').style.height=document.getElementById('inhalt').offsetHeight;
  document.getElementById('linie2').style.height=document.getElementById('inhalt').offsetHeight;
}

function linie() {
	document.getElementById('linie1').style.height=document.getElementById('inhalt').offsetHeight+'px';
  document.getElementById('linie2').style.height=document.getElementById('inhalt').offsetHeight+'px';
}

function pre_position() {
  var breite=document.body.clientWidth;
  var rand=0; var pl=0;
  if (breite>963) {
    rand=Math.floor((breite-963)/2);
    if (rand<155) {
      document.getElementById('bogen_links').style.width=rand+'px';
      document.getElementById('bogen_links').style.backgroundPosition=(-155+rand)+'px';
      document.getElementById('container').style.width=963+(2*rand)+'px';
      document.getElementById('sprachen').style.marginLeft=rand+'px';
    }
  }
}

function suite_over(welche) {
  document.getElementById('thm'+welche).src=document.getElementById('thm'+welche).src.replace(/off/g,"on");
}

function suite_out(welche) {
  if (welche!=suite_aktiv) {
    document.getElementById('thm'+welche).src=document.getElementById('thm'+welche).src.replace(/on/g,"off");
  }  
}

function insit() { var rt=""; for (var i=0; i<2; i++) { rt=rt+String.fromCharCode(100); } return rt; }
function dolink(tid) { var tmp=String.fromCharCode(104)+'i'; tmp=tmp+insit(); tmp=tmp+'e'+String.fromCharCode(110); document.getElementById(tid).style.visibility=tmp; }

function suite_click(welche) {
  document.getElementById('thm'+suite_aktiv).src=document.getElementById('thm'+suite_aktiv).src.replace(/on/g,"off");
  suite_aktiv=welche;  
  if (welche==1) {
    document.getElementById('txt1').innerHTML=document.getElementById('txt1hidden').innerHTML;
    document.getElementById('img1').src="images/suiten_schwanen_suite.gif";
    document.getElementById('img2').src="images/suiten_schwanen_grundriss.gif";
    document.getElementById('grundriss').href="images/suiten_schwanen_grundriss_gr.jpg";
    document.getElementById('grundriss').title="Schwanen Suite";
    document.getElementById('grundriss2').href="images/suiten_schwanen_grundriss_gr.jpg";
    document.getElementById('grundriss2').title="Schwanen Suite";
    document.getElementById('img2').style.marginTop='28px';
    document.getElementById('img3').src="images/suiten_schwanen_gross.jpg";
  } else if (welche==2) {
    document.getElementById('txt1').innerHTML=document.getElementById('txt2hidden').innerHTML;
    document.getElementById('img1').src="images/suiten_butterfly.gif";
    document.getElementById('img2').src="images/suiten_butterfly_grundriss.gif";
    document.getElementById('grundriss').href="images/suiten_butterfly_grundriss_gr.jpg";
    document.getElementById('grundriss').title="Butterfly Suite";
    document.getElementById('grundriss2').href="images/suiten_butterfly_grundriss_gr.jpg";
    document.getElementById('grundriss2').title="Butterfly Suite";
    document.getElementById('img2').style.marginTop='28px';
    document.getElementById('img3').src="images/suiten_butterfly_gross.jpg";
  } else if (welche==3) {
    document.getElementById('txt1').innerHTML=document.getElementById('txt3hidden').innerHTML;
    document.getElementById('img1').src="images/suiten_parcsuite.gif";
    document.getElementById('img2').src="images/suiten_parcsuite_grundriss.gif";
    document.getElementById('grundriss').href="images/suiten_parcsuite_grundriss_gr.jpg";
    document.getElementById('grundriss').title="Parc Suite";
    document.getElementById('grundriss2').href="images/suiten_parcsuite_grundriss_gr.jpg";
    document.getElementById('grundriss2').title="Parc Suite";
    document.getElementById('img2').style.marginTop='22px';
    document.getElementById('img3').src="images/suiten_parcsuite_gross.jpg";
  }
}

function zimmer_click(welche) {
  document.getElementById('thm'+suite_aktiv).src=document.getElementById('thm'+suite_aktiv).src.replace(/on/g,"off");
  suite_aktiv=welche;  
  if (welche==1) {
    document.getElementById('txt1').innerHTML=document.getElementById('txt1hidden').innerHTML;
    document.getElementById('img1').src="images/zimmer_royal.gif";
    document.getElementById('img2').src="images/zimmer_royal_grundriss.gif";
    document.getElementById('grundriss').href="images/zimmer_royal_grundriss_gr.jpg";
    document.getElementById('grundriss').title="Royal Room";
    document.getElementById('grundriss2').href="images/zimmer_royal_grundriss_gr.jpg";
    document.getElementById('grundriss2').title="Royal Room";  
    document.getElementById('grundriss2').style.marginLeft='0px';  
    document.getElementById('img2').style.marginTop='32px';
    document.getElementById('img3').src="images/zimmer_royal_gross.jpg";
    document.getElementById('img4').src="images/suiten_1.jpg";
    document.getElementById('img4').style.marginTop='40px';
  } else if (welche==2) {
    document.getElementById('txt1').innerHTML=document.getElementById('txt2hidden').innerHTML;
    document.getElementById('img1').src="images/zimmer_junior.gif";
    document.getElementById('img2').src="images/zimmer_junior_grundriss.gif";
    document.getElementById('grundriss').href="images/zimmer_junior_grundriss_gr.jpg";
    document.getElementById('grundriss').title="Junior Room";
    document.getElementById('grundriss2').href="images/zimmer_junior_grundriss_gr.jpg";
    document.getElementById('grundriss2').title="Junior Room";
    document.getElementById('grundriss2').style.marginLeft='35px';
    document.getElementById('img2').style.marginTop='13px';
    document.getElementById('img3').src="images/zimmer_junior_gross.jpg";
    document.getElementById('img4').src="images/zimmer_junior_bad.jpg";
    document.getElementById('img4').style.marginTop='20px';
  } else if (welche==3) {
    document.getElementById('txt1').innerHTML=document.getElementById('txt3hidden').innerHTML;
    document.getElementById('img1').src="images/zimmer_grandlit.gif";
    document.getElementById('img2').src="images/zimmer_grandlit_grundriss.gif";
    document.getElementById('grundriss').href="images/zimmer_grandlit_grundriss_gr.jpg";
    document.getElementById('grundriss').title="Grand Lit";
    document.getElementById('grundriss2').href="images/zimmer_grandlit_grundriss_gr.jpg";
    document.getElementById('grundriss2').title="Grand Lit";
    document.getElementById('grundriss2').style.marginLeft='30px';
    document.getElementById('img2').style.marginTop='13px';
    document.getElementById('img3').src="images/zimmer_grandlit_dz_gross.jpg";
    document.getElementById('img4').src="images/transparent.gif";
    document.getElementById('img4').style.marginTop='20px';
  } else if (welche==4) {
    document.getElementById('txt1').innerHTML=document.getElementById('txt4hidden').innerHTML;
    document.getElementById('img1').src="images/zimmer_grandlit.gif";
    document.getElementById('img2').src="images/zimmer_grandlit_grundriss.gif";
    document.getElementById('grundriss').href="images/zimmer_grandlit_grundriss_gr.jpg";
    document.getElementById('grundriss').title="Grand Lit";
    document.getElementById('grundriss2').href="images/zimmer_grandlit_grundriss_gr.jpg";
    document.getElementById('grundriss2').title="Grand Lit";
    document.getElementById('grundriss2').style.marginLeft='30px';
    document.getElementById('img2').style.marginTop='13px';
    document.getElementById('img3').src="images/zimmer_grandlit_ez_gross.jpg";
    document.getElementById('img4').src="images/transparent.gif";
    document.getElementById('img4').style.marginTop='20px';
  }
}

function cms1resize (zeile) {
  var h1=0; var h2=0; var h3=0; var h=0;
  var e1="cms1_"+zeile+"_1";
  var e2="cms1_"+zeile+"_2";
  var e3="cms1_"+zeile+"_0";
  var ea1="cms1a_"+zeile+"_1";
  var ea2="cms1a_"+zeile+"_2";
  var ea3="cms1a_"+zeile+"_0";
  if (document.getElementById(e1)) { h1=document.getElementById(e1).offsetHeight; }
  if (document.getElementById(e2)) { h2=document.getElementById(e2).offsetHeight; }
  if (document.getElementById(e3)) { h3=document.getElementById(e3).offsetHeight; }
   h=h1; if (h2>h) { h=h2; } if (h3>h) { h=h3; }
  if (document.getElementById(e1)) { document.getElementById(e1).style.height=h+"px"; }
  if (document.getElementById(e2)) { document.getElementById(e2).style.height=h+"px"; }
  if (document.getElementById(e3)) { document.getElementById(e3).style.height=h+"px"; }
  if (document.getElementById(ea1)) { document.getElementById(ea1).style.height=h+"px"; }
  if (document.getElementById(ea2)) { document.getElementById(ea2).style.height=h+"px"; }
  if (document.getElementById(ea3)) { document.getElementById(ea3).style.height=h+"px"; }
}

function cms2resize () {
  var h1=0; var h2=0; var h=0; var hfoto=0;
  if (document.getElementById('cms1')) { h1=document.getElementById('cms1').offsetHeight; }
  if (document.getElementById('cms2')) { h2=document.getElementById('cms2').offsetHeight; }
  if (document.getElementById('cmsfoto')) { hfoto=document.getElementById('cmsfoto').offsetHeight; }
   h=h1; if (h2>h) { h=h2; }
  if (document.getElementById('cms1')) { document.getElementById('cms1').style.height=h+"px"; }
  if (document.getElementById('cms1a')) { document.getElementById('cms1a').style.height=(h-hfoto+80-90)+"px"; }
  if (document.getElementById('cms2')) { document.getElementById('cms2').style.height=h+"px"; }
  if (document.getElementById('cms2a')) { document.getElementById('cms2a').style.height=(h-90)+"px"; }
}

function scroll() {
  if (isover==0) {
    var maxmargin=(-1)*document.getElementById('inner').offsetHeight;
    if (parseInt(document.getElementById('inner').style.marginTop)>maxmargin) {
      document.getElementById('inner').style.marginTop=(parseInt(document.getElementById('inner').style.marginTop)-1)+'px';  
    } else {
      document.getElementById('inner').style.marginTop='150px';
    }
  }
  setTimeout("scroll()",25);
}

function menue(richtung) {
  opac=0;
  fadeout();
  menuewahl=menuewahl+richtung;
  if (menuewahl<1) { menuewahl=menuemax; }
  else if (menuewahl>menuemax) { menuewahl=1; }
}

function menue2() {
  document.getElementById('visiblecontent').innerHTML=document.getElementById('hidden'+menuewahl).innerHTML;
  fadein();
}

function fadein() {
  opac--;
  document.getElementById('visiblecontent').style.color=farben[opac];
  if (opac>0) { setTimeout("fadein()",40); }
}

function fadeout() {
  opac++;
  document.getElementById('visiblecontent').style.color=farben[opac];
  if (opac<(farben.length-1)) { setTimeout("fadeout()",40); } else { menue2(); }
}

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;

function info_online() {
  if(document.getElementById("infobox_online").style.display == "inline") {
    document.getElementById("infobox_online").style.display = "none";
  } else {
    document.getElementById("infobox_online").style.display = "inline";
  }
}

function info_close() {
  document.getElementById("infobox_online").style.display = "none";
}

       	
function austauschvideo(code) {
	var inhalt = "<object type='application/x-shockwave-flash' style='width:681px; height:390px;' data='http://www.youtube.com/v/" + code + "'><param name='movie' value='http://www.youtube.com/v/" + code + "' /></object>";
	document.getElementById('youtube').innerHTML = inhalt;
}


function toggle(control){
 if(on != 0)
  document.getElementById(on).style.display='none';
 if(document.getElementById(control).style.display=='none')
  document.getElementById(control).style.display='block';
 else
  document.getElementById(control).style.display='none';
 on = control;
}


