function toggleSeminar(divID,divText) {
	var e=document.getElementById(divID);
	
	  if(!e)return true;
		if(e.style.height=="auto") {
			e.style.height="100px"
			divText.innerHTML = "Alle Kurse >>";
			} else {

				e.style.height="auto"
				divText.innerHTML = "Kurse schließen >>";
			}
		return true;
		}



function rollIMG( paraHide, paraShow ){
	document.getElementById(paraHide).style.display = 'none';
	document.getElementById(paraShow).style.display = 'inline';
}

function Lesezeichen() {
	if (window.sidebar) {
		//FF
		window.sidebar.addPanel( window.document.title, location.href, "" );
	} else if ( window.external ) {
		// IE Favorite
		window.external.AddFavorite( location.href, window.document.title );
	} else if (window.opera && window.print) {
		return true;
	}
}



function tabview_aux(TabViewId, id)
{
  var TabView = document.getElementById(TabViewId);

  var Tabs = TabView.firstChild;
  while (Tabs.className != "Tabs" ) Tabs = Tabs.nextSibling;

  var Tab = Tabs.firstChild;
  var i   = 0;

  do
  {
    if (Tab.tagName == "A")
    {
      i++;
      Tab.href      = "javascript:tabview_switch('"+TabViewId+"', "+i+");";
      Tab.className = (i == id) ? "Active" : "";
      Tab.blur();
    }
  }
  while (Tab = Tab.nextSibling);

  var Pages = TabView.firstChild;
  while (Pages.className != 'Pages') Pages = Pages.nextSibling;

  var Page = Pages.firstChild;
  var i    = 0;

  do
  {
    if (Page.className == 'Page')
    {
      i++;
      if (Pages.offsetHeight) Page.style.height = "auto";
      Page.style.overflow = "auto";
      Page.style.display  = (i == id) ? 'block' : 'none';
    }
  }
  while (Page = Page.nextSibling);
}

//create onDomReady Event
window.onDomReady = DomReady;

//Setup the event
function DomReady(fn)
{
	//W3C
	if(document.addEventListener)
	{
		document.addEventListener("DOMContentLoaded", fn, false);
	}
	//IE
	else
	{
		document.onreadystatechange = function(){readyState(fn)}
	}
}

//IE execute function
function readyState(fn)
{
	//dom is ready for interaction
	if(document.readyState == "interactive" || document.readyState == "complete") {
		fn();
	}
}

function tabview_switch(TabViewId, id) { tabview_aux(TabViewId, id); }
function tabview_initialize(TabViewId) {

	var hash = window.location.hash;
	if (hash == '#hotel') {
		tabview_aux(TabViewId,  4);
	} else {
		tabview_aux(TabViewId,  1);
	}
	
}

