function menueOn(id) {
  document.getElementById(id+'_label1').style.backgroundImage='url(./images/menue_on.gif)';
  document.getElementById(id+'_label2').style.backgroundColor='#EEAC4F';
  document.getElementById(id+'_link').style.textDecoration='underline';
}

function menueOff(id) {
  document.getElementById(id+'_label1').style.backgroundImage='none';
  document.getElementById(id+'_label2').style.backgroundColor='#FAD283';
  document.getElementById(id+'_link').style.textDecoration='none';
}

function submenueOn(id) {
  document.getElementById(id+'_label2').style.backgroundColor='#EEAC4F';
  document.getElementById(id+'_link').style.textDecoration='underline';
}

function submenueOff(id) {
  document.getElementById(id+'_label2').style.backgroundColor='#FAD283';
  document.getElementById(id+'_link').style.textDecoration='none';
}

function scroll_left() {
  if (navigator.userAgent.match(/msie/i) && navigator.userAgent.match(/6\.0/i)) {
    x=parseInt(document.getElementById('inner').style.left);
  } else {
    x=parseInt(document.getElementById('inner').style.marginLeft);
  }
  if (x>((document.getElementById('tabelle').offsetWidth-document.getElementById('outer').offsetWidth)*-1)) {
    x=x-2;
    if (navigator.userAgent.match(/msie/i) && navigator.userAgent.match(/6\.0/i)) {
      document.getElementById('inner').style.position='relative';
      document.getElementById('inner').style.left=x+'px';
    } else {
      document.getElementById('inner').style.marginLeft=x+'px';
    }
    if (over==1) {
      setTimeout("scroll_left();",1);
    }
  }
}

function scroll_right() {
  iw=document.getElementById('tabelle').offsetWidth;
  if (iw) {
    xlimit=iw-document.getElementById('outer').offsetWidth;
    if (xlimit>0) {
      xlimit=(-1)*xlimit;
    } else {
      xlimit=0;
    }
    if (navigator.userAgent.match(/msie/i) && navigator.userAgent.match(/6\.0/i)) {
      x=parseInt(document.getElementById('inner').style.left);
    } else {
      x=parseInt(document.getElementById('inner').style.marginLeft);
    }
    if (x<0) {
      x=x+2;
      if (navigator.userAgent.match(/msie/i) && navigator.userAgent.match(/6\.0/i)) {
        document.getElementById('inner').style.left=x+'px';
      } else {
        document.getElementById('inner').style.marginLeft=x+'px';
      }
      if (over==1) {
        setTimeout("scroll_right("+xlimit+");",1);
      }
    }
  }
}

function popup(picture,width,height) {
  width=parseInt(width)+parseInt(60);
  height=parseInt(height)+parseInt(60);
  F1=window.open('','F1','width='+width+',height='+height+',top=50,left=50,dependent=yes,location=no,menubar=no,resizable=no,scrollbars=no,status=no,toolbar=no');
  var str='';
  str+='<?xml version="1.0" encoding="utf-8"?>';
  str+='<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">';
  str+='<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="de" lang="de">';
  str+='  <head>';
  str+='    <title>Hotel Lagorai</title>';
  str+='  </head>';
  str+='  <body style="padding:0px;margin:0px;background-image:url(\''+picture+'\');background-repeat:no-repeat;background-position: 30px 30px;">';
  str+='  </body>';
  str+='</html>';
  F1.document.write(str);
}

function popupHTML(html,width,height) {
  window.open('zimmerfoto_'+html+'.htm','F1','width='+width+',height='+height+',top=0,left=0,dependent=yes,location=no,menubar=no,resizable=no,scrollbars=no,status=no,toolbar=no');
}

function scroll_left() {
  if (navigator.userAgent.match(/msie/i) && navigator.userAgent.match(/6\.0/i)) {
    x=parseInt(document.getElementById('inner').style.left);
  } else {
    x=parseInt(document.getElementById('inner').style.marginLeft);
  }
  if (x>((document.getElementById('tabelle').offsetWidth-document.getElementById('outer').offsetWidth)*-1)) {
    x=x-2;
    if (navigator.userAgent.match(/msie/i) && navigator.userAgent.match(/6\.0/i)) {
      document.getElementById('inner').style.position='relative';
      document.getElementById('inner').style.left=x+'px';
    } else {
      document.getElementById('inner').style.marginLeft=x+'px';
    }
    if (over==1) {
      setTimeout("scroll_left();",1);
    }
  }
}

function scroll_right() {
  iw=document.getElementById('tabelle').offsetWidth;
  if (iw) {
    xlimit=iw-document.getElementById('outer').offsetWidth;
    if (xlimit>0) {
      xlimit=(-1)*xlimit;
    } else {
      xlimit=0;
    }
    if (navigator.userAgent.match(/msie/i) && navigator.userAgent.match(/6\.0/i)) {
      x=parseInt(document.getElementById('inner').style.left);
    } else {
      x=parseInt(document.getElementById('inner').style.marginLeft);
    }
    if (x<0) {
      x=x+2;
      if (navigator.userAgent.match(/msie/i) && navigator.userAgent.match(/6\.0/i)) {
        document.getElementById('inner').style.left=x+'px';
      } else {
        document.getElementById('inner').style.marginLeft=x+'px';
      }
      if (over==1) {
        setTimeout("scroll_right("+xlimit+");",1);
      }
    }
  }
}

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 Larchhof</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);
}