function bigger(id, id2, id3, maxHeight)
{
	if(navigator.appName == "Microsoft Internet Explorer")
		visible = 'inline';
	else
		visible = 'table-row';
	document.getElementById(id).style.display = visible;
	document.getElementById(id2).style.display = 'none';
	document.getElementById(id3).style.display = 'none';
}


function smaller(id, minHeight)
{
    var ele = document.getElementById(id);
    var h = ele.offsetHeight; // gibt immer ein int und die wirkliche höhe zurück
    
    if(h > minHeight)
    {
        h-= 24; // h um 6 erhöhen
        ele.style.height = h + 'px';
        setTimeout(function() { smaller(id, minHeight); }, 30); // 30-60 wirkt besser
    }
	
}

function showWK(id1, id2)
{
	if(navigator.appName == "Microsoft Internet Explorer")
		visible = 'inline';
	else
		visible = 'table-row';
		
	if(document.getElementById(id1).style.display == visible)
		document.getElementById(id1).style.display = 'none';
	else
		document.getElementById(id1).style.display = visible;
		
	if(document.getElementById(id2).style.display == visible)
		document.getElementById(id2).style.display = 'none';
	else
		document.getElementById(id2).style.display = visible;
}

function showtab(id, id2, id3, tab1, tab2, tab3)
{
	if(navigator.appName == "Microsoft Internet Explorer")
		visible = 'inline';
	else
		visible = 'table-row';
		
	document.getElementById(id).style.display = visible;
	document.getElementById(id2).style.display = 'none';
	document.getElementById(id3).style.display = 'none';
	document.getElementById(tab1).className = 'tab_a';
	document.getElementById(tab2).className = 'tab';
	document.getElementById(tab3).className = 'tab';
}

function MM_jumpMenu(targ,selObj,restore){ //v3.0
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}


function Checked(id)
{
	if (document.getElementById(id).checked == true)
		document.getElementById(id).checked=false;
	
	else if (document.getElementById(id).checked == false)
		document.getElementById(id).checked=true;
}

function SHOW_HRO() 
{
	var Guest;
	if(navigator.appName == "Microsoft Internet Explorer")
		visible = 'inline';
	else
		visible = 'table-row';
	
	if (document.getElementById('checkcourses').checked == true)
	{
		document.getElementById('COURSES').style.display = visible;
	} 
	else if (document.getElementById('checkcourses').checked == false)
	{
		document.getElementById('COURSES').style.display = 'none';
		document.getElementById('COURSES').style.display = 'none';
	}
}


var popUpWin=0;

function popUpWindow(URLStr, left, top, width, height)
{
  if(popUpWin)
  {
    if(!popUpWin.closed) popUpWin.close();
  }
  popUpWin = open(URLStr, 'popUpWin', 'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,copyhistory=yes,width='+width+',height='+height+',left='+left+', top='+top+',screenX='+left+',screenY='+top+'');
}

						
						
/****************************/
function sendRequestRooms() 
{
	try 
	{
		req = window.XMLHttpRequest?new XMLHttpRequest():
		new ActiveXObject("Microsoft.XMLHTTP");
	} 
	catch (e) 
	{
	//Kein AJAX Support
	}
	
	req.onreadystatechange = handleResponseRooms;
	id = document.getElementById('dropdown').value;
	req.open('get', 'Hotelzimmer.php?Hotel='+ id );
	req.send(null);
}


function handleResponseRooms() 
{
	if ((req.readyState == 4) && (req.status == 200)) {
		document.getElementById('Zimmertyp').innerHTML = req.responseText;
	}
}


/***************************************/
function sendRequestText() 
{
	try 
	{
		reqA = window.XMLHttpRequest?new XMLHttpRequest():
		new ActiveXObject("Microsoft.XMLHTTP");
	} 
	catch (e) 
	{
	//Kein AJAX Support
	}
	
	reqA.onreadystatechange = handleResponseText;
	id = document.getElementById('dropdown').value;
	reqA.open('get', 'HotelText.php?Hotel='+ id );
	reqA.send(null);
}

function handleResponseText() 
{
	if ((reqA.readyState == 4) && (reqA.status == 200)) {
		document.getElementById('HotelText').innerHTML = reqA.responseText;
	}
}


	
	function ShowPane(paneName, tab, PaneRow,tabRow){
		var tabs = document.getElementById(tabRow);
		var panes = document.getElementById(PaneRow);
		var tabList = tabs.childNodes;
		for (var i=0; i < tabList.length; i++ ) {
			tabList[i].className = 'tab_inactive';
		}
		var paneList = panes.childNodes;
		for (var i=0; i < paneList.length; i++ ) {
			paneList[i].className = 'pane_inactive';
		}
		tab.className = 'tab_active';
		var pane = document.getElementById(paneName);
		pane.className = 'pane_active';
	}
	
