
var IE4 = (document.all) ? 1 : 0;    
var NS4 = (document.layers) ? 1 : 0;
var ver4 = (IE4 || NS4) ? 1 : 0;
var clickedstr=""; var clickedx, clickedy;

if (NS4) {origWidth = innerWidth; origHeight = innerHeight;}  //FUER RESIZE NS4

window.onload = rcInit;   //LAYER BZW. IFRAME INITIALISIEREN
window.onresize = redo;   //NEU LADEN BEI RESIZE

function redo() {
  if (document.body.clientWidth != origWidth || document.body.clientHeight != origHeight) {location.reload()}}

function spot_r_out(x,y) {
  spot1.style.visibility = 'hidden'; spot2.style.visibility = 'hidden'}

function spot_g_out(x,y) {
  spot3.style.visibility = 'hidden'; spot4.style.visibility = 'hidden'}

function list_out(str) {
  document.all[str].style.backgroundColor = "transparent"}

function list_out_courses(str) {
  document.all[str].style.backgroundColor = "transparent"}

function list_out_sevilla(str) {
  document.all[str].style.backgroundColor = "transparent"}

function spot_r_on(x,y) {
  if(x<150) {spot1.style.left = x; spot1.style.top = y; spot1.style.visibility = 'visible'}
  else      {spot2.style.left = x; spot2.style.top = y; spot2.style.visibility = 'visible'}}

function spot_g_on(x,y) {
  if(x<150) {spot3.style.left = x; spot3.style.top = y; spot3.style.visibility = 'visible'}
  else      {spot4.style.left = x; spot4.style.top = y; spot4.style.visibility = 'visible'}}

function list_on(str,color) {
  document.all[str].style.backgroundColor = color}

function list_on_courses(str,color) {
  document.all[str].style.backgroundColor = color}

function list_on_sevilla(str,color) {
  document.all[str].style.backgroundColor = color}

function load(htmlstr) {
  rcframe.location.href= htmlstr; 
  framecontainer.style.visibility = 'visible'}

function msover(str,x,y) {
  if (!ver4) { return };
  if (str==clickedstr) {return};
  if (msover.arguments.length > 1) { list_on(str,'orange'); spot_r_on(x,y) }
  else { list_on_courses(str,'orange') }}

function msout(str,x,y) {
  if (!ver4) { return };
  if (str==clickedstr) {return};
  if (msout.arguments.length > 1) { list_out(str); spot_r_out(x,y) }
  else { list_out_courses(str) };}

function oncl (str,x,y) {
if (!ver4) { return };
if (oncl.arguments.length == 3) {
  load(str + ".html");
  spot_r_out(x,y);
  spot_g_out(x,y);
  if (clickedstr != "") { list_out(clickedstr) };
  spot_g_on(x,y);
  list_on(str,'#c0c0c0');
  clickedstr=str; clickedx=x; clickedy=y;
} else {
  load ("../" + str + "/" + x + ".html");
  if (clickedstr != "") { list_out_courses(clickedstr) };
  list_on_courses(x,'#c0c0c0');
  clickedstr=x;
}
}

function ioncl (str1,str2,str3) {
  if (!ver4) { return };
  if (ioncl.arguments.length == 3) { load ("../" + str1 + "/" + str2 + ".html" + str3) } 
  else { load ("../" + str1 + "/" + str2 + ".html") }
  parent.scrollTo(0,0)}


function toncl (str1,str2,str3) {
  if (!ver4) { return };
  load ("../" + str1 + "/" + str2.substr(0,str2.length-1) + ".html" + str3)
  if (clickedstr != "") { list_out_sevilla(clickedstr) };
  list_on_sevilla(str2,'#c0c0c0');
  clickedstr=str2;}

function back () {
  if (!ver4) { return };
  if (clickedstr=="") { location.reload(); return };
  load(clickedstr + ".html");
  parent.scrollTo(0,0);
  return false}

function hotelback () {
  if (!ver4) { return };
  if (clickedstr=="") { location.reload(); return };
  load("../"+ clickedstr + ".html");
  parent.scrollTo(0,0);
  return false}

function rollover(imName,over) {
  if (!document.images) {return};
  if (over) { document.images[imName].src = "../buttons/" + imName + "2.gif" }
  else      { document.images[imName].src = "../buttons/" + imName + "1.gif" }}


function rcInit() {
  if (!ver4) { return };

  origWidth = document.body.clientWidth; origHeight = document.body.clientHeight; //FUER RESIZE IE4

  document.images["leftIm"].getRealLeft = getRealLeft;
  document.images["rightIm"].getRealLeft = getRealLeft;
  document.images["leftIm"].getRealTop = getRealTop;

  var rcleft = document.images["leftIm"].getRealLeft() + 0;
  rcwidth =    document.images["rightIm"].getRealLeft() - document.images["leftIm"].getRealLeft() + 0;
  var rctop =  document.images["leftIm"].getRealTop() + 0;

  var text =  '<DIV id="framecontainer" style="position: absolute; visibility: hidden">';
      text += '<IFRAME id="rcframe" width=';
      text += '"' + rcwidth + '"';
      text += 'height="5500" scrolling="no" frameborder="0"  marginwidth="0"></IFRAME></DIV>';
  
  document.body.insertAdjacentHTML("BeforeEnd", text);

  framecontainer.style.pixelLeft = rcleft;
  framecontainer.style.pixelTop = rctop;

//if (document.listcontainer) document.listcontainer.clip.width=110  //LISTE CLIPPEN FUER NETSCAPE
//if (document.coursescontainer) document.coursescontainer.clip.width=150  //LISTE CLIPPEN FUER NETSCAPE

//Abfrage Querystring
  str=location.search;
  if (str != "") { load(str.substring(1,str.length) + ".html") }

//Rechte Spalte löschen
  if (origWidth < 900) { lclmn.innerHTML=clmn.innerHTML; clmn.innerHTML=""; }


}


function getRealLeft() {
  xPos = this.offsetLeft;
  tempEl = this.offsetParent;
  while (tempEl != null) {xPos += tempEl.offsetLeft;tempEl = tempEl.offsetParent};
  return xPos}

function getRealTop() {
  yPos = this.offsetTop;
  tempEl = this.offsetParent;
  while (tempEl != null) {yPos += tempEl.offsetTop; tempEl = tempEl.offsetParent};
  return yPos;}

