var wobinich=0;
var browsertyp=0;
if (document.getElementById) {
  browsertyp=3;
} else if(document.layers) {
  browsertyp=2;
} else if(document.all) {
  browsertyp=1;
}
function chg_class_over(btn,cls) {
  if (document.getElementById(btn)) {
    document.getElementById(btn).className=cls;
  }
}
function chg_class_out(btn,cls) {
  if (document.getElementById(btn)) {
    document.getElementById(btn).className=cls;
  }
}

var heute = new Date();
var monat = heute.getMonth()+1;
if(monat>=11 || monat<=4) { 
	var Startbild = 2;
} else {
	var Startbild = 0;
}

function startbild_sw(page,Lng) {
  if (Startbild == 0) {
    if (document.getElementById('image0')) {
      document.getElementById('image0').src='images/'+page+'2_'+Lng+'.jpg';
      Startbild = 1;
    }
  } else {
    if (document.getElementById('image0')) {
      document.getElementById('image0').src='images/'+page+'0_'+Lng+'.jpg';
      Startbild = 0;
    }
  }
  return false;
}

function vrundgang(x,lng) {
	if (lng == 'de') {
    x = './rundgang/deutsch/popup.php?pano_id=' + x;
	} else if (lng == 'it') {
    x = '../rundgang/italienisch/popup.php?pano_id=' + x;
	} else if (lng == 'en') {
    x = '../rundgang/englisch/popup.php?pano_id=' + x;
	} else if (lng == 'nl') {
    x = '../rundgang/niederlaendisch/popup.php?pano_id=' + x;
	}
  window.open(x, 'rg', 'width=900,height=600,top=50,left=50');
}
    
function rundgang(where,Lng) {
  if (Lng == 'de') {
    window.open('./rundgang/'+where+'/deutsch/low/popup.html', 'rg', 'width=760,height=450,top=100,left=150');
  } else if (Lng == 'it') {
    window.open('../rundgang/'+where+'/ital/low/popup.html', 'rg', 'width=760,height=450,top=100,left=150');
  } else if (Lng == 'en') {
    window.open('../rundgang/'+where+'/englisch/low/popup.html', 'rg', 'width=760,height=450,top=100,left=150');
  }
}

function load_flash(nummer) {
  var str = '';
  str += '<object type="application/x-shockwave-flash" data="flash/header'+nummer+'.swf" width="475" height="216">';
  str += '  <param name="movie" value="flash/header'+nummer+'.swf" />';
  str += '  <param name="quality" value="high" />';
  str += '</object>';
  document.getElementById('header_flash').innerHTML = str;
}

var scroll=1;
var merkpos=1;

function getposy() {
  var pos = 0;
  if (window.innerHeight) {
    pos = window.pageYOffset
  } else if (document.documentElement && document.documentElement.scrollTop) {
    pos = document.documentElement.scrollTop
  } else if (document.body) {
    pos = document.body.scrollTop
  }
  return pos;
}

function doscroll(pos,oldpos) {
  window.scrollTo(0,pos);
  if (oldpos==getposy()) {
    pos=0;
  }
  if (scroll==1) {
    setTimeout('doscroll('+(pos+1)+','+getposy()+')',20);
  }
}

function webcam() {
  var str = '';
  str += '<html>';
  str += '  <head>';
  str += '    <title>Hotel Traube Post Webcam</title>';
  str += '  </head>';
  str += '  <body style="margin:0px;padding:0px;cursor:pointer;" background="http://obervinschgau.eu/webcam/webcam.jpg" onclick="self.close();">';
  str += '  </body>';
  str += '</html>';
  F1 = window.open('','','width=640,height=480');
  F1.document.write(str);
}

function BilderVorladen() {
  document.Vorladen = new Array();
  if(document.images) {
    document.Vorladen[0] = new Image();
    document.Vorladen[0].src = BilderVorladen.arguments[0];
  }
}

function flash(sprache,pfad) {
  document.write('<OBJECT codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" WIDTH="108" HEIGHT="80" id="film" ALIGN="">');
  document.write('<PARAM NAME=movie VALUE="'+pfad+'/flash/film_'+sprache+'.swf"> <PARAM NAME=quality VALUE=high> <param name="wmode" value="transparent"><PARAM NAME=bgcolor VALUE=#FFFFFF> <EMBED src="'+pfad+'/flash/film_'+sprache+'.swf" quality=high wmode="transparent" bgcolor=#FFFFFF  WIDTH="108" HEIGHT="80" NAME="film" ALIGN="" TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer"></EMBED>');
  document.write('</OBJECT>');
}
