// JavaScript Document
try
{
	Shadowbox.init
	(
		{
			language: 'de-DE',
			players:  ['img', 'html', 'iframe', 'qt', 'wmp', 'swf', 'flv'],
			autoplayMovies: true,
			overlayOpacity: 0.9,
			overlayColor: '#009DDF'
		}
	);
}catch(e){}
function hurra_pageStart()
{
	//Header ein und ausklappen
	try
	{
		HeadSearchObj = new HeadSearch();
		HeadSearchObj.construct();
	}catch(e){}
	//Flash karte bei suche
	try
	{
		var map_search_flash_container = document.getElementById('therm_flashmap_container');
		Set_AC_FL_RunContent_GET(map_search_flash_container.className);
		map_search_flash_container.innerHTML = AC_FL_RunContent( "codebase","http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0","width","395","height","252","src","flash/"+map_search_flash_container.innerHTML,"quality","high","pluginspage","http://www.macromedia.com/go/getflashplayer","movie","flash/"+map_search_flash_container.innerHTML, "wmode", "transparent" );
		Set_AC_FL_RunContent_GET('');
	}catch(e){}
	try
	{
		var map_search_flash_container = document.getElementById('hotel_flashmap_container');
		Set_AC_FL_RunContent_GET(map_search_flash_container.className);
		map_search_flash_container.innerHTML = AC_FL_RunContent( "codebase","http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0","width","395","height","252","src","flash/"+map_search_flash_container.innerHTML,"quality","high","pluginspage","http://www.macromedia.com/go/getflashplayer","movie","flash/"+map_search_flash_container.innerHTML, "wmode", "transparent" );
		Set_AC_FL_RunContent_GET('');
	}catch(e){}
	//Flash HeaderGallery bei Kunden
	try
	{
		var flashHeadContainer = document.getElementById('ob_detail_flashHeadGallery_container');
		flashHeadContainer.style.visibility = "visible";
		Set_AC_FL_RunContent_GET(flashHeadContainer.innerHTML);
		flashHeadContainer.innerHTML = AC_FL_RunContent( "codebase","http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0","width","458","height","120","src","flash/headGallery","quality","high","pluginspage","http://www.macromedia.com/go/getflashplayer","movie","flash/headGallery", "wmode", "transparent" );
		Set_AC_FL_RunContent_GET('');
	}catch(e){}
	// alle div tags
	try
	{
		var divTags = document.getElementsByTagName("div");
		for(var i = 0; i < divTags.length ;i++)
		{
			if(divTags[i].className == 'show_hide_header')
			{
				ShowHideHeaders.push(divTags[i]);
				hurra_addEvent(divTags[i],'click', show_hide_subContent);
				//Detailsuche Sektion wird aktiviert
				DetailSearchForm.set_categoryBox(divTags[i].parentNode);
			}
		}
	}catch(e){}
	//Detailsuche
	if(document.getElementById('detail_search_form_container'))
	{
		try{DetailSearchForm.set_searchType(document.getElementById('detail_search_form_container'));}catch(e){}
		
		try{DetailSearchForm.set_input(document.getElementById('stammdaten_headline'),'text');}catch(e){}
		try{DetailSearchForm.set_input(document.getElementById('stammdaten_name'),'text');}catch(e){}
		try{DetailSearchForm.set_input(document.getElementById('countryName'),'text');}catch(e){}
		try{DetailSearchForm.set_input(document.getElementById('regionName'),'text');}catch(e){}
		try{DetailSearchForm.set_input(document.getElementById('cityName'),'text');}catch(e){}
		try{DetailSearchForm.set_input(document.getElementById('stammdaten_postleitzahl'),'text');}catch(e){}

		try{DetailSearchForm.set_input(document.getElementById('kategorie_family'),'checkBox');}catch(e){}
		try{DetailSearchForm.set_input(document.getElementById('kategorie_kur'),'checkBox');}catch(e){}
		try{DetailSearchForm.set_input(document.getElementById('kategorie_kuscheln'),'checkBox');}catch(e){}
		try{DetailSearchForm.set_input(document.getElementById('kategorie_beauty'),'checkBox');}catch(e){}
		try{DetailSearchForm.set_input(document.getElementById('kategorie_gesundheit'),'checkBox');}catch(e){}
		try{DetailSearchForm.set_input(document.getElementById('kategorie_fun'),'checkBox');}catch(e){}
		try{DetailSearchForm.set_input(document.getElementById('kategorie_erholung'),'checkBox');}catch(e){}
		try{DetailSearchForm.set_input(document.getElementById('kategorie_relaxen'),'checkBox');}catch(e){}
		try{DetailSearchForm.set_input(document.getElementById('kategorie_wellness'),'checkBox');}catch(e){}
		try{DetailSearchForm.set_input(document.getElementById('kategorie_sport'),'checkBox');}catch(e){}

		try{DetailSearchForm.set_input(document.getElementById('aktivitaeten_weinverkostung'),'checkBox');}catch(e){}
		try{DetailSearchForm.set_input(document.getElementById('aktivitaeten_museen'),'checkBox');}catch(e){}
		try{DetailSearchForm.set_input(document.getElementById('aktivitaeten_golfplatz'),'checkBox');}catch(e){}
		try{DetailSearchForm.set_input(document.getElementById('aktivitaeten_reiten'),'checkBox');}catch(e){}
		try{DetailSearchForm.set_input(document.getElementById('aktivitaeten_wandern'),'checkBox');}catch(e){}
		try{DetailSearchForm.set_input(document.getElementById('aktivitaeten_radfahren'),'checkBox');}catch(e){}
		try{DetailSearchForm.set_input(document.getElementById('aktivitaeten_see'),'checkBox');}catch(e){}
		try{DetailSearchForm.set_input(document.getElementById('aktivitaeten_zoo'),'checkBox');}catch(e){}
		try{DetailSearchForm.set_input(document.getElementById('aktivitaeten_nachtleben'),'checkBox');}catch(e){}
		try{DetailSearchForm.set_input(document.getElementById('aktivitaeten_schigebiet'),'checkBox');}catch(e){}
		try{DetailSearchForm.set_input(document.getElementById('aktivitaeten_kino'),'checkBox');}catch(e){}
		try{DetailSearchForm.set_input(document.getElementById('aktivitaeten_shopping'),'checkBox');}catch(e){}
		try{DetailSearchForm.set_input(document.getElementById('aktivitaeten_trainingsmoeglichkeiten'),'checkBox');}catch(e){}

		try{DetailSearchForm.set_input(document.getElementById('ausstattung_frisoer'),'checkBox');}catch(e){}
		try{DetailSearchForm.set_input(document.getElementById('ausstattung_fitnesscenter'),'checkBox');}catch(e){}
		try{DetailSearchForm.set_input(document.getElementById('ausstattung_behindertengerecht'),'checkBox');}catch(e){}
		
		try{DetailSearchForm.set_input(document.getElementById('wassermix_thermalwasser'),'checkBox');}catch(e){}
		try{DetailSearchForm.set_input(document.getElementById('wassermix_salzwasser'),'checkBox');}catch(e){}
		try{DetailSearchForm.set_input(document.getElementById('wassermix_frischwasser'),'checkBox');}catch(e){}
		
		try{DetailSearchForm.set_input(document.getElementById('erreichbarkeit_auto'),'checkBox');}catch(e){}
		try{DetailSearchForm.set_input(document.getElementById('erreichbarkeit_bahn'),'checkBox');}catch(e){}
		try{DetailSearchForm.set_input(document.getElementById('erreichbarkeit_autobahnnaehe'),'checkBox');}catch(e){}
		try{DetailSearchForm.set_input(document.getElementById('erreichbarkeit_shuttleservice'),'checkBox');}catch(e){}
	}
	//alle input tags
	try
	{
		var inputs = document.getElementsByTagName("input");
		for (var i = 0; i < inputs.length; i++)
		{
			if(inputs[i].name == 'therm_quicksearch')
			{
				hurra_addEvent(inputs[i],'keyup',quicksearch_therm_kdown_focus);
				hurra_addEvent(inputs[i],'focus',quicksearch_therm_kdown_focus);
				hurra_addEvent(inputs[i],'blur',quicksearch_blur);
			}			
			if(inputs[i].name == 'hotel_quicksearch')
			{
				hurra_addEvent(inputs[i],'keyup',quicksearch_hotel_kdown_focus);
				hurra_addEvent(inputs[i],'focus',quicksearch_hotel_kdown_focus);
				hurra_addEvent(inputs[i],'blur',quicksearch_blur);
			}			
			if(inputs[i].name == 'offer_quicksearch')
			{
				hurra_addEvent(inputs[i],'keyup',quicksearch_offer_kdown_focus);
				hurra_addEvent(inputs[i],'focus',quicksearch_offer_kdown_focus);
				hurra_addEvent(inputs[i],'blur',quicksearch_blur);
			}			
		}
	}catch(e){}
	//alle textarea
	try
	{
		var textareaTags = document.getElementsByTagName("textarea");	
		for(var i = 0; i < textareaTags.length ;i++)
		{
			// Bewertung
			if(textareaTags [i].className == 'eval_bg')
			{
				textareaTags[i].name = textareaTags[i].value;
				hurra_addEvent(textareaTags[i],'focus', textarea_focus);
				hurra_addEvent(textareaTags[i],'blur', textarea_blur);
			}
		}
	}catch(e){}
	// alle img
	try
	{
		var imgTags = document.getElementsByTagName("img");
		for(var i = 0; i < imgTags.length ;i++)
		{
			//Bewertung
			if(imgTags[i].className == 'evalT_1' || imgTags[i].className == 'evalT_2' || imgTags[i].className == 'evalT_3' || imgTags[i].className == 'evalT_4')
			{
				hurra_addEvent(imgTags[i],'click', click_tropfen);
			}
		}
	}catch(e){}
	//alle form tags
	try
	{
		var forms = document.getElementsByTagName("form");
		for (var i = 0; i < forms.length; i++)
		{
			// Schnellsuche
			if(forms[i].name == 'therm_quicksearch_form')
			{
				hurra_addEvent(forms[i],'submit', quicksearch_submit);
			}			
			if(forms[i].name == 'hotel_quicksearch_form')
			{
				hurra_addEvent(forms[i],'submit', quicksearch_submit);
			}			
			if(forms[i].name == 'offer_quicksearch_form')
			{
				hurra_addEvent(forms[i],'submit', quicksearch_submit);
			}			
		}
	}catch(e){}
	//alle a tags
	try
	{
		var doclinks = document.getElementsByTagName("a");
		for (var i = 0; i < doclinks.length; i++)
		{
			try
			{
				//Regionalsuche
				if(doclinks[i].className == 'region_link')
				{
					if(doclinks[i].nextSibling != "undefined")
					{
						hurra_addEvent(doclinks[i],'mouseover',regionLink_over);
						hurra_addEvent(doclinks[i],'mouseout',regionLink_out);
					}
				}
			}catch(e){}
			try
			{
				//Schnellsuche
				if(doclinks[i].rel == "bttn_quicksearch")
				{
					hurra_addEvent(doclinks[i],'click',do_quicksearch_submit_from_bttn);
					doclinks[i].href="javascript:void(empty())";
				}
			}catch(e){}
			try
			{
				//Anfrageformular
				if(doclinks[i].rel == "therme_request")
				{
					hurra_addEvent(doclinks[i],'click',contactForm_therm);
					doclinks[i].href="javascript:void(empty())";
				}
			}catch(e){}
			try
			{
				if(doclinks[i].rel == "hotel_request")
				{
					hurra_addEvent(doclinks[i],'click',contactForm_hotel);
					doclinks[i].href="javascript:void(empty())";
				}
			}catch(e){}
			try
			{
				//Wellradio
				if(doclinks[i].id == "wellradio_link")
				{
					doclinks[i].href="javascript:void(empty())";
					hurra_addEvent(doclinks[i],'click', openWellradio);
				}
			}catch(e){}
		}
	}catch(e){}
	// alle span
	try
	{
		var spanTags = document.getElementsByTagName("span");	
		for(var i = 0; i < spanTags.length ;i++)
		{
			if(spanTags [i].className == 'radio')
			{
				hurra_addEvent(spanTags[i],'click', radio_select);
			}
			if(spanTags [i].className == 'check')
			{
				hurra_addEvent(spanTags[i],'click', check_select);
			}
			if(spanTags [i].className == 'check_tropfen')
			{
				hurra_addEvent(spanTags[i],'click', check_select_tropfen);
			}
		}
	}catch(e){}
	//Newsletter
	try
	{
		hurra_addEvent(document.getElementById('send_newsletter'),'click',submit_newsletter);
	}catch(e){}
	//Bewertung
	try
	{
		hurra_addEvent(document.getElementById('eval_cont1'),'click',eval_cont_1);	
		hurra_addEvent(document.getElementById('eval_cont2'),'click',eval_cont_2);	
		hurra_addEvent(document.getElementById('eval_cont3'),'click',eval_cont_3);	
		hurra_addEvent(document.getElementById('eval_submit'),'click',eval_submit);	
	}catch(e){}
	//MmyTC
	//@registrieren & login
	try
	{
		document.getElementById('myTC_registrieren').href = "javascript:void(empty());";
		hurra_addEvent(document.getElementById('myTC_registrieren'), 'click', myTC_show_rgister);
		
//		document.getElementById('myTC_passwortVergessen').href = "javascript:void(empty());";
//		hurra_addEvent(document.getElementById('myTC_passwortVergessen'), 'click', myTC_show_reminder);
			
//		hurra_addEvent(document.getElementById('myTCLoging_bttn'), 'click', myTC_login);
//		
//		hurra_addEvent(document.getElementById('myTCLogin_username'), 'blur', onblur_reset);
//		hurra_addEvent(document.getElementById('myTCLogin_password'), 'blur', onblur_pw_reset);
//		hurra_addEvent(document.getElementById('myTCLogin_username'), 'focus', onfocus_clear);
//		hurra_addEvent(document.getElementById('myTCLogin_password'), 'focus', onfocus_pw_clear);

	}catch(e){}	
	
	
	
	
	hurra_addEvent(document.body,'click',body_click);
}
hurra_registerOnLoad(hurra_pageStart);

////
// Header suche - ein und ausklappen
////
var HeadSearchObj;
function activateHead_searchContent()
{
	HeadSearchObj.init_show_content(this);
}
function HeadSearch()
{
	this.headerSearchWindowId = 'header_search_window';
	this.HeaderSearchWindow;
	
	this.ContentObjArray = new Array();
	
	this.headerSearchButtonLineId = 'header_search_button_line';
	this.HeaderSearchButtonLine;
	
	this.ButtonObjArray = new Array();
	this.ButtoninnerHTMLArray = new Array();
	
	this.contentMaxHeight = 262;
	this.contentCurrentHeight = 262;
	this.growth = 25;
	
	this.activeIndex = 0;
	this.nextIndex;
	
	this.isOpen = false;
	this.isClosing = false;
	this.isOpening = false;
	
	this.Interval = false;
	
	
	this.construct = function()
	{
		this.HeaderSearchButtonLine = document.getElementById(this.headerSearchButtonLineId);
		for(var i = 0; i < this.HeaderSearchButtonLine.childNodes.length; i++)
		{
			if(this.HeaderSearchButtonLine.childNodes[i].nodeName.toLowerCase() == 'div')
			{
				if(this.HeaderSearchButtonLine.childNodes[i].className == 'search_flag')
				{
					this.ButtonObjArray.push(this.HeaderSearchButtonLine.childNodes[i]);
					this.ButtoninnerHTMLArray.push(this.HeaderSearchButtonLine.childNodes[i].innerHTML);
				}
				else if(this.HeaderSearchButtonLine.childNodes[i].className == 'search_flag_active')
				{
					this.ButtonObjArray.push(this.HeaderSearchButtonLine.childNodes[i]);
					this.ButtoninnerHTMLArray.push(this.HeaderSearchButtonLine.childNodes[i].innerHTML);
					this.activeIndex = this.ButtonObjArray.length - 1;
					this.isOpen = true;
				}
			}
		}
		
		this.HeaderSearchWindow = document.getElementById(this.headerSearchWindowId);
		this.contentCurrentHeight = this.HeaderSearchWindow.className * 1;
		for(var i = 0; i < this.HeaderSearchWindow.childNodes.length; i++)
		{
			if(this.HeaderSearchWindow.childNodes[i].nodeName.toLowerCase() == 'div')
			{
				this.ContentObjArray.push(this.HeaderSearchWindow.childNodes[i]);
				if(this.ContentObjArray.length - 1 == this.activeIndex)
				{
					this.HeaderSearchWindow.childNodes[i].style.display = 'block';
				}
				else
				{
					this.HeaderSearchWindow.childNodes[i].style.display = 'none';
				}
				
			}
		}
		for(var i = 0; i < this.ButtonObjArray.length; i++)
		{
			hurra_addEvent(this.ButtonObjArray[i],'click',activateHead_searchContent);	
		}
	}
	
	this.init_show_content = function(bttn)
	{
		var searchedIndex = -1;
		for(var i = 0; i < this.ButtoninnerHTMLArray.length && searchedIndex == -1; i++)
		{
			//alert('if('+this.ButtoninnerHTMLArray[i]+' == '+bttn.innerHTML+')');
			if(this.ButtoninnerHTMLArray[i] == bttn.innerHTML)
			{
				searchedIndex = i;
			}
		}
		if(searchedIndex != this.activeIndex)
		{
			this.nextIndex = searchedIndex;
			if(this.isClosing == false && this.isOpening == false)
			{
				this.Interval = window.setInterval('HeadSearchObj.close_content()',1)
			}
			else if(this.isOpening == true)
			{
				window.clearInterval(this.Interval);
				this.Interval = window.setInterval('HeadSearchObj.close_content()',1)
			}
		}
		else
		{
			this.nextIndex = this.activeIndex;
			if(this.isOpen == true)
			{
				window.clearInterval(this.Interval);
				this.Interval = window.setInterval('HeadSearchObj.just_close_content()',1);
			}
			else if(this.isOpen == false)
			{
				window.clearInterval(this.Interval);
				this.isClosed();
			}
		}
	}
	
	this.just_close_content = function()
	{
		this.isClosing = true;
		if(this.contentCurrentHeight - this.growth > 0)
		{
			this.contentCurrentHeight -= this.growth;
		}
		else
		{
			this.contentCurrentHeight = 0;
		}
		if(this.contentCurrentHeight <= 0)
		{
			window.clearInterval(this.Interval);
			this.ButtonObjArray[this.activeIndex].className = 'search_flag';
			this.isClosing = false;
			this.isOpen = false;
		}
		this.HeaderSearchWindow.style.height = this.contentCurrentHeight +'px';
	}
	
	this.close_content = function()
	{
		this.isClosing = true;
		if(this.contentCurrentHeight - this.growth > 0)
		{
			this.contentCurrentHeight -= this.growth;
		}
		else
		{
			this.contentCurrentHeight = 0;
		}
		if(this.contentCurrentHeight <= 0)
		{
			this.isClosed();
		}
		this.HeaderSearchWindow.style.height = this.contentCurrentHeight +'px';
	}
	this.isClosed = function()
	{
		this.ContentObjArray[this.activeIndex].style.display = 'none';
		this.ButtonObjArray[this.activeIndex].className = 'search_flag';
		
		this.ContentObjArray[this.nextIndex].style.display = 'block';
		this.ButtonObjArray[this.nextIndex].className = 'search_flag_active';
		
		this.activeIndex = this.nextIndex;
		
		this.isClosing = false;
		window.clearInterval(this.Interval);
		this.Interval = window.setInterval('HeadSearchObj.open_content()',1)
		this.isOpen = true;
	}
	
	this.open_content = function()
	{
		this.isOpening = true;
		if(this.contentCurrentHeight + this.growth < this.contentMaxHeight)
		{
			this.contentCurrentHeight += this.growth;
		}
		else
		{
			this.contentCurrentHeight = this.contentMaxHeight;
		}
		if(this.contentCurrentHeight >= this.contentMaxHeight)
		{
			window.clearInterval(this.Interval);
			this.isOpening = false;
		}
		this.HeaderSearchWindow.style.height = this.contentCurrentHeight +'px';
	}
}
// Ende //
////

/**
* Schnellsuche
**/
var QuicksearchInput;

var quicksearchDropdown = false;
var quicksearchDropdown_hasFokus = false;
var quicksearchTop = false;
var quicksearchInputPos = false;

/* Therme */
function quicksearch_therm_kdown_focus()
{
	QuicksearchInput = this;
	quicksearchDropdown_hasFokus = true;
	if(this.value.length > 0)
	{
		DetailSearchForm.FoundThermList = ThermList;
		result = therm_quicksearch(this.value);
		DetailSearchForm.FoundThermList = result[2];
		
		var quicksearchInputPos = hurra_return_absolute_pos(this);
		
		if(quicksearchDropdown == false)
		{
			quicksearchDropdown = document.createElement('div');
			quicksearchDropdown.className = 'quicksearch_result_container';
			document.body.appendChild(quicksearchDropdown);
			
			quicksearchTop = document.createElement('div');
			quicksearchTop.className = 'quicksearch_result_headline_container';
			document.body.appendChild(quicksearchTop);
		}
		quicksearchDropdown.style.left = (quicksearchInputPos.left + this.offsetWidth - quicksearchDropdown.offsetWidth)+'px';
		quicksearchDropdown.style.top = (quicksearchInputPos.top + this.offsetHeight + 30)+'px';
		
		quicksearchTop.style.left = (quicksearchInputPos.left + this.offsetWidth - quicksearchDropdown.offsetWidth)+'px';
		quicksearchTop.style.top = (quicksearchInputPos.top + this.offsetHeight)+'px';
		
		quicksearchTop.innerHTML = '<span style="color:#fff">'+result[1]+' gefundene Thermen</span> <a style="color:#fff" href="javascript:void(do_quicksearch_submit_from_link())">» alle Treffer anzeigen</a>';
		quicksearchDropdown.innerHTML = result[0];
		quicksearchDropdown.innerHTML += '<div class="clear_both">&nbsp;</div>';
	}
	else
	{
		quicksearch_hide(true);
	}
}
function therm_quicksearch(str)
{
	str = str.toLowerCase();
	var html = '';
	var num = 0;
	var FoundThermList = new Array();
	var c = 0;
	for(var i = 0; i < ThermList.length; i++)
	{
		var found = false;
		if(ThermList[i].stammdaten_name.toLowerCase().indexOf(str) != -1)
		{
			found = true;
		}
		else if(ThermList[i].cityName.toLowerCase().indexOf(str) != -1)
		{
			found = true;
		}
		else if(ThermList[i].stammdaten_postleitzahl.toLowerCase().indexOf(str) != -1)
		{
			found = true;
		}
		else if(ThermList[i].regionName.toLowerCase().indexOf(str) != -1)
		{
			found = true;
		}
		else if(ThermList[i].countryName.toLowerCase().indexOf(str) != -1)
		{
			found = true;
		}
		if(found == true)
		{
			html += ThermList[i].return_quicksearch_link();
			FoundThermList.push(ThermList[i]);
			num ++;
			if(c == 1)
			{
				html += '<div class="clear_both">&nbsp;</div>';
				c = 0;
			}
			else
			{
				c ++;
			}
		}
	}
	return new Array(html,num,FoundThermList);
}

/* Hotel */
function quicksearch_hotel_kdown_focus()
{
	QuicksearchInput = this;
	quicksearchDropdown_hasFokus = true;
	if(this.value.length > 0)
	{
		DetailSearchForm.FoundThermList = ThermList;
		result = hotel_quicksearch(this.value);
		DetailSearchForm.FoundHotelList = result[2];
		
		var quicksearchInputPos = hurra_return_absolute_pos(this);
		
		if(quicksearchDropdown == false)
		{
			quicksearchDropdown = document.createElement('div');
			quicksearchDropdown.className = 'quicksearch_result_container';
			document.body.appendChild(quicksearchDropdown);
			
			quicksearchTop = document.createElement('div');
			quicksearchTop.className = 'quicksearch_result_headline_container';
			document.body.appendChild(quicksearchTop);
		}
		quicksearchDropdown.style.left = (quicksearchInputPos.left + this.offsetWidth - quicksearchDropdown.offsetWidth)+'px';
		quicksearchDropdown.style.top = (quicksearchInputPos.top + this.offsetHeight + 30)+'px';
		
		quicksearchTop.style.left = (quicksearchInputPos.left + this.offsetWidth - quicksearchDropdown.offsetWidth)+'px';
		quicksearchTop.style.top = (quicksearchInputPos.top + this.offsetHeight)+'px';
		
		quicksearchTop.innerHTML = '<span style="color:#fff">'+result[1]+' gefundene Hotels</span> <a style="color:#fff" href="javascript:void(do_quicksearch_submit_from_link())">» alle Treffer anzeigen</a>';
		quicksearchDropdown.innerHTML = result[0];
		quicksearchDropdown.innerHTML += '<div class="clear_both">&nbsp;</div>';
	}
	else
	{
		quicksearch_hide(true);
	}
}
function hotel_quicksearch(str)
{
	str = str.toLowerCase();
	var html = '';
	var num = 0;
	var FoundHotelList = new Array();
	var c = 0;
	for(var i = 0; i < HotelList.length; i++)
	{
		var found = false;
		if(HotelList[i].stammdaten_name.toLowerCase().indexOf(str) != -1)
		{
			found = true;
		}
		else if(HotelList[i].cityName.toLowerCase().indexOf(str) != -1)
		{
			found = true;
		}
		else if(HotelList[i].stammdaten_postleitzahl.toLowerCase().indexOf(str) != -1)
		{
			found = true;
		}
		else if(HotelList[i].regionName.toLowerCase().indexOf(str) != -1)
		{
			found = true;
		}
		else if(HotelList[i].countryName.toLowerCase().indexOf(str) != -1)
		{
			found = true;
		}
		if(found == true)
		{
			html += HotelList[i].return_quicksearch_link();
			FoundHotelList.push(HotelList[i]);
			num ++;
			if(c == 1)
			{
				html += '<div class="clear_both">&nbsp;</div>';
				c = 0;
			}
			else
			{
				c ++;
			}
		}
	}
	return new Array(html,num,FoundHotelList);
}

/* Angebote */
function quicksearch_offer_kdown_focus()
{
	QuicksearchInput = this;
	quicksearchDropdown_hasFokus = true;
	if(this.value.length > 0)
	{
		DetailSearchForm.FoundOfferList = OfferList;
		result = offer_quicksearch(this.value);
		DetailSearchForm.FoundOfferList = result[2];
		
		var quicksearchInputPos = hurra_return_absolute_pos(this);
		
		if(quicksearchDropdown == false)
		{
			quicksearchDropdown = document.createElement('div');
			quicksearchDropdown.className = 'quicksearch_result_container';
			document.body.appendChild(quicksearchDropdown);
			
			quicksearchTop = document.createElement('div');
			quicksearchTop.className = 'quicksearch_result_headline_container';
			document.body.appendChild(quicksearchTop);
		}
		quicksearchDropdown.style.left = (quicksearchInputPos.left + this.offsetWidth - quicksearchDropdown.offsetWidth)+'px';
		quicksearchDropdown.style.top = (quicksearchInputPos.top + this.offsetHeight + 30)+'px';
		
		quicksearchTop.style.left = (quicksearchInputPos.left + this.offsetWidth - quicksearchDropdown.offsetWidth)+'px';
		quicksearchTop.style.top = (quicksearchInputPos.top + this.offsetHeight)+'px';
		
		quicksearchTop.innerHTML = '<span style="color:#fff">'+result[1]+' gefundene Angebote</span> <a style="color:#fff" href="javascript:void(do_quicksearch_submit_from_link())">» alle Treffer anzeigen</a>';
		quicksearchDropdown.innerHTML = result[0];
		quicksearchDropdown.innerHTML += '<div class="clear_both">&nbsp;</div>';
	}
	else
	{
		quicksearch_hide(true);
	}
}
function offer_quicksearch(str)
{
	str = str.toLowerCase();
	var html = '';
	var num = 0;
	var FoundOfferList = new Array();
	var c = 0;
	for(var i = 0; i < OfferList.length; i++)
	{
		var found = false;
		if(OfferList[i].stammdaten_headline.toLowerCase().indexOf(str) != -1)
		{
			found = true;
		}
		if(OfferList[i].stammdaten_name.toLowerCase().indexOf(str) != -1)
		{
			found = true;
		}
		else if(OfferList[i].cityName.toLowerCase().indexOf(str) != -1)
		{
			found = true;
		}
		else if(OfferList[i].stammdaten_postleitzahl.toLowerCase().indexOf(str) != -1)
		{
			found = true;
		}
		else if(OfferList[i].regionName.toLowerCase().indexOf(str) != -1)
		{
			found = true;
		}
		else if(OfferList[i].countryName.toLowerCase().indexOf(str) != -1)
		{
			found = true;
		}
		if(found == true)
		{
			html += OfferList[i].return_quicksearch_link();
			FoundOfferList.push(OfferList[i]);
			num ++;
			if(c == 1)
			{
				html += '<div class="clear_both">&nbsp;</div>';
				c = 0;
			}
			else
			{
				c ++;
			}
		}
	}
	return new Array(html,num,FoundOfferList);
}

/* Allgemein für schnellsuche */
function do_quicksearch_submit_from_bttn()
{
	quicksearch_submit(this.parentNode);
}
function do_quicksearch_submit_from_link()
{
	quicksearch_submit(QuicksearchInput.parentNode);
}
function quicksearch_blur()
{
	quicksearchDropdown_hasFokus = false;
}
function quicksearch_hide(ignorfocus)
{
	if(ignorfocus == false && quicksearchDropdown_hasFokus == true){return false;}
	try
	{
		hurra_removeNode(quicksearchDropdown);
		quicksearchDropdown = false;
		hurra_removeNode(quicksearchTop);
		quicksearchTop = false;
	}catch(e){}
}
function quicksearch_submit(form)
{
	if(this.method == "post")
	{
		form = this;
	}
	var inputSubmitDetailSearch  = document.createElement('input');
	var inputValue  = document.createElement('input');
	inputSubmitDetailSearch.style.visibility = 'hidden';
	inputSubmitDetailSearch.style.width = '1px';
	inputSubmitDetailSearch.style.height = '1px';
	inputSubmitDetailSearch.value = hk;
	inputSubmitDetailSearch.name = 'submitDetailSearch';
	
	inputValue  = document.createElement('input');
	inputValue.style.visibility = 'hidden';
	inputValue.style.width = '1px';
	inputValue.style.height = '1px';
	var resultValue = '';
	
	switch(form.name)
	{
		case'therm_quicksearch_form':
			for(var i = 0; i < DetailSearchForm.FoundThermList.length; i++)
			{
				if(i != 0){resultValue += ';';}
				resultValue += DetailSearchForm.FoundThermList[i].thermenId;
			}
			break;
		case'hotel_quicksearch_form':
			for(var i = 0; i < DetailSearchForm.FoundHotelList.length; i++)
			{
				if(i != 0){resultValue += ';';}
				resultValue += DetailSearchForm.FoundHotelList[i].hotelId;
			}
			break;
		case'offer_quicksearch_form':
			for(var i = 0; i < DetailSearchForm.FoundOfferList.length; i++)
			{
				if(i != 0){resultValue += ';';}
				resultValue += DetailSearchForm.FoundOfferList[i].entryId;
			}
			break;
	}
	
	inputValue.value = resultValue;
	inputValue.name= 'value';
	form.appendChild(inputSubmitDetailSearch);
	form.appendChild(inputValue);
	try
	{
		form.submit();
	}
	catch(e){}
}

/**
* Detailsuche
**/
var DetailSearchForm = new DetailSearchFormClass();
function update_detail_search()
{
	var Input = find_DetailSearchInput_inArray(this);
	switch(Input.type)
	{
		case 'checkBox':
			if(this.firstChild.src.indexOf('unselected') != -1)
			{
				this.firstChild.src = 'pix/bttn/check_selected.gif';
				DetailSearchForm.Inputs[Input.indexInArray].value = 1;
			}
			else
			{
				this.firstChild.src = 'pix/bttn/check_unselected.gif';
				DetailSearchForm.Inputs[Input.indexInArray].value = 0;
			}
			break;
		case 'text':
			DetailSearchForm.Inputs[Input.indexInArray].value = this.value;
			break;
	}
	switch(DetailSearchForm.searchType)
	{
		default:
		case 'therm':
			var MyThermList = ThermList;
			for(var i = 0; i < DetailSearchForm.Inputs.length ; i++)
			{
				MyThermList = do_therm_detail_search(DetailSearchForm.Inputs[i], MyThermList);
			}
			DetailSearchForm.FoundThermList = MyThermList;
			if(Input.type == 'text')
			{
				autoComplete(this, this.id, this.value,Input);
			}	
			var numFound = MyThermList.length;
			try
			{

				document.getElementById('num_o_found_detailsearch').innerHTML = '<div>Gefundene Thermen: '+numFound+'</div> <a href="javascript:void(submit_detail_search())" >Treffer anzeigen</a><div class="clear_both">&nbsp;</div>';
			}catch(e){}
			try
			{
				var retHtml = '<h1>Empfohlene Thermen Ihrer Suche</h1>';
				for(var z = 0; z < MyThermList.length; z++)
				{
					retHtml += MyThermList[z].return_rightBox_HTML();
					if(z == 2){break;}
				}
				document.getElementById('search_result_right_box').innerHTML =  retHtml;
			}catch(e){}
			break;
		case 'hotel':
			var MyHotelList = HotelList;
			for(var i = 0; i < DetailSearchForm.Inputs.length ; i++)
			{
				MyHotelList = do_hotel_detail_search(DetailSearchForm.Inputs[i], MyHotelList);
			}
			DetailSearchForm.FoundHotelList = MyHotelList;
			if(Input.type == 'text')
			{
				autoComplete(this, this.id, this.value,Input);
			}	
			var numFound = MyHotelList.length;
			document.getElementById('num_o_found_detailsearch').innerHTML = '<div>Gefundene Hotels: '+numFound+'</div> <a href="javascript:void(submit_detail_search())" >Treffer anzeigen</a><div class="clear_both">&nbsp;</div>';
			try
			{
				var retHtml = '<h1>Empfohlene Hotels Ihrer Suche</h1>';
				for(var z = 0; z < MyHotelList.length; z++)
				{
					retHtml += MyHotelList[z].return_rightBox_HTML();
					if(z == 2){break;}
				}
				document.getElementById('search_result_right_box').innerHTML =  retHtml;
			}catch(e){}
			break;
		case 'offer':
			var MyOfferList = OfferList;
			for(var i = 0; i < DetailSearchForm.Inputs.length ; i++)
			{
				MyOfferList = do_offer_detail_search(DetailSearchForm.Inputs[i], MyOfferList);
			}
			DetailSearchForm.FoundOfferList = MyOfferList;
			if(Input.type == 'text')
			{
				autoComplete(this, this.id, this.value,Input);
			}	
			var numFound = MyOfferList.length;
			document.getElementById('num_o_found_detailsearch').innerHTML = '<div>Gefundene Angebote: '+numFound+'</div> <a href="javascript:void(submit_detail_search())" >Treffer anzeigen</a><div class="clear_both">&nbsp;</div>';
			try
			{
				var retHtml = '<h1>Empfohlene Angebote Ihrer Suche</h1>';
				for(var z = 0; z < MyOfferList.length; z++)
				{
					retHtml += MyOfferList[z].return_rightBox_HTML();
					if(z == 2){break;}
				}
				document.getElementById('search_result_right_box').innerHTML =  retHtml;
			}catch(e){}
			break;
	}
	//Ausgabe Detailsuche
	try
	{
		for(var i = 0; i < DetailSearchForm.CategoryBoxes.length ;i++)
		{
			DetailSearchForm.CategoryBoxes[i].setNumFoud(numFound);
		}
	}catch(e){}
	//Ausgabe
	try
	{
		document.getElementById('numEvalResultTherm').innerHTML = '<strong>Wählen Sie eine Therme aus:</strong><br/><span class="size_10_italic">('+numFound+' Suchtreffer)</span>';
		
		var retHtml = '';
		for(var i = 0; i < DetailSearchForm.FoundThermList.length; i++)
		{
			retHtml += DetailSearchForm.FoundThermList[i].return_evaluationList_HTML();
		}
		document.getElementById('evaluation_result_box').innerHTML = retHtml;
		document.getElementById('evaluation_result_box').style.display = "block";
	}catch(e){}
}
function DetailSearchFormClass()
{
	this.Inputs = new Array();
	this.CategoryBoxes = new Array();
	
	this.FoundThermList = ThermList;
	this.FoundHotelList = HotelList;
	this.foundOfferList = OfferList;
	
	this.searchType; //therm, hotel, offer
	this.SearchFormContainer;
	
	this.set_input = function(obj, type)
	{
		var value = '';
		switch(type)
		{
			case'checkBox':
				value = 0;
				hurra_addEvent(obj,'click',update_detail_search);
				break;
			case'text':
				value = '';
				hurra_addEvent(obj,'keyup',update_detail_search);
				hurra_addEvent(obj,'blur',autocomplete_blur);
				hurra_addEvent(obj,'focus',update_detail_search);
				hurra_addEvent(obj,'click',update_detail_search);
				break;
		}
		var index = this.Inputs.length;
		this.Inputs[index] = new HurraInput(obj,type, index, value);
	}
	this.set_searchType = function(container)
	{
		this.SearchFormContainer = container;
		switch(this.SearchFormContainer.className)
		{
			default:
			case 'therm_detailsearch':
				this.searchType = 'therm';
				break;
			case 'hotel_detailsearch':
				this.searchType = 'hotel';
				break;
			case 'offer_detailsearch':
				this.searchType = 'offer';
				break;
		}
	}
	this.set_categoryBox = function(obj)
	{
		var index = this.CategoryBoxes.length;
		this.CategoryBoxes[index] = new HurraSearchCategoryBox(obj,index);
	}
}
//gibt eigenes Input Objekt bei Übergabe des HTML Objektes zurück
function find_DetailSearchInput_inArray(obj)
{
	for(var i = 0; i < DetailSearchForm.Inputs.length ; i++)
	{
		if(obj.id == DetailSearchForm.Inputs[i].id)
		{
			return DetailSearchForm.Inputs[i];
		}
	}
	return false;
}
//Thermen Detailsuche
function do_therm_detail_search(Input, MyThermList)
{
	if(Input.type == 'checkBox' && Input.value == 0)
	{
		return MyThermList;
	}
	if(Input.type == 'text' && Input.value.length <= 0)
	{
		return MyThermList;
	}
	var CacheList = new Array(); 
	for(var i = 0; i < MyThermList.length; i++)
	//for(var i = 0; i < 2; i++)
	{
		switch(Input.type)
		{
			case'checkBox':
				//alert('if('+Input.value+' == '+MyThermList[i][Input.id]+')');
				if(Input.value == MyThermList[i][Input.id])
				{
					CacheList.push(MyThermList[i]);
				}
				break;
			case'text':
				if(MyThermList[i][Input.id].toLowerCase().indexOf(Input.value.toLowerCase()) != -1)
				{
					CacheList.push(MyThermList[i]);
				}
				break;
		}
	}
	return CacheList;
}
//Hoteldetailsuche
function do_hotel_detail_search(Input, MyHotelList)
{
	if(Input.type == 'checkBox' && Input.value == 0)
	{
		return MyHotelList;
	}
	if(Input.type == 'text' && Input.value.length <= 0)
	{
		return MyHotelList;
	}
	var CacheList = new Array(); 
	for(var i = 0; i < MyHotelList.length; i++)
	//for(var i = 0; i < 2; i++)
	{
		switch(Input.type)
		{
			case'checkBox':
				//alert('if('+Input.value+' == '+MyThermList[i][Input.id]+')');
				if(Input.value == MyHotelList[i][Input.id])
				{
					CacheList.push(MyHotelList[i]);
				}
				break;
			case'text':
				if(MyHotelList[i][Input.id].toLowerCase().indexOf(Input.value.toLowerCase()) != -1)
				{
					CacheList.push(MyHotelList[i]);
				}
				break;
		}
	}
	return CacheList;
}
//Angebotsdetailsuche
function do_offer_detail_search(Input, MyOfferList)
{
	if(Input.type == 'checkBox' && Input.value == 0)
	{
		return MyOfferList;
	}
	if(Input.type == 'text' && Input.value.length <= 0)
	{
		return MyOfferList;
	}
	var CacheList = new Array(); 
	for(var i = 0; i < MyOfferList.length; i++)
	//for(var i = 0; i < 2; i++)
	{
		switch(Input.type)
		{
			case'checkBox':
				//alert('if('+Input.value+' == '+MyThermList[i][Input.id]+')');
				if(Input.value == MyOfferList[i][Input.id])
				{
					CacheList.push(MyOfferList[i]);
				}
				break;
			case'text':
				if(MyOfferList[i][Input.id].toLowerCase().indexOf(Input.value.toLowerCase()) != -1)
				{
					CacheList.push(MyOfferList[i]);
				}
				break;
		}
	}
	return CacheList;
}
//Formular abschicken
function submit_detail_search()
{
	var form = document.createElement('form');
	form.method = 'post';
	form.style.top = '-500px';
	form.style.visibility = 'hidden';
	var inputSubmitDetailSearch  = document.createElement('input');
	var inputValue  = document.createElement('input');
	inputSubmitDetailSearch.value = hk;
	inputSubmitDetailSearch.name = 'submitDetailSearch';
	inputValue  = document.createElement('input');
	var resultValue = '';
	switch(DetailSearchForm.searchType)
	{
		default:
		case 'therm':
			for(var i = 0; i < DetailSearchForm.FoundThermList.length; i++)
			{
				if(i != 0){resultValue += ';';}
				resultValue += DetailSearchForm.FoundThermList[i].thermenId;
			}
			break;
		case 'hotel':
			for(var i = 0; i < DetailSearchForm.FoundHotelList.length; i++)
			{
				if(i != 0){resultValue += ';';}
				resultValue += DetailSearchForm.FoundHotelList[i].hotelId;
			}
			break;
		case 'offer':
			for(var i = 0; i < DetailSearchForm.FoundOfferList.length; i++)
			{
				if(i != 0){resultValue += ';';}
				resultValue += DetailSearchForm.FoundOfferList[i].entryId;
			}
			break;
	}
	
	inputValue.value = resultValue;
	inputValue.name= 'value';
	form.appendChild(inputSubmitDetailSearch);
	form.appendChild(inputValue);
	document.body.appendChild(form);
	form.submit();
	//alert('ab');
}

function HurraSearchCategoryBox(obj,indexInArray)
{
	this.obj = obj;
	this.head = obj.firstChild;
	this.resultLine = obj.childNodes[obj.childNodes.length-1];
	this.indexInArray = indexInArray;
	this.setNumFoud = function(numFound)
	{
		this.resultLine.firstChild.innerHTML = "Gefundene Treffer: <strong>"+numFound+"</strong>";
	}
}
function HurraInput(obj,type,indexInArray,value)
{
	this.id = obj.id;
	this.obj = obj;
	this.type = type;
	this.indexInArray = indexInArray;
	this.value = value;
}

/**
* Autovervollständigung
**/
var autoCompleteDropdown_hasFokus = false;
var autoCompleteDropdown = false;
var autoCompleteInput = false;
function autoCompleteSet(value)
{
	autoCompleteInput.obj.value = value;
	autoCompleteInput.value = value;
	autocomplete_hide(true);
	update_detail_search();
}
function autocomplete_blur()
{
	autoCompleteDropdown_hasFokus = false;
}
function autocomplete_hide(ignorfocus)
{
	if(ignorfocus == false && autoCompleteDropdown_hasFokus == true){return false;}
	try
	{
		hurra_removeNode(autoCompleteDropdown);
		autoCompleteDropdown = false;
	}catch(e){}
}
function sortString(ranarray)
{
	var x, y, holder;
	for(x = 0; x < ranarray.length; x++)
	{
		for(y = 0; y < (ranarray.length-1); y++)
		{
			if(ranarray[y].toLowerCase() > ranarray[y+1].toLowerCase())
			{
				holder = ranarray[y+1];
				ranarray[y+1] = ranarray[y];
				ranarray[y] = holder;
			}
		}
	}
	return ranarray;
}
function autoComplete(obj, varName, value, input)
{
	autocomplete_hide(true);
	autoCompleteDropdown_hasFokus = true;
	autoCompleteInput = input;
	var html = '';
	var autoCompleteArray = new Array();
	var found = false;
	
	switch(DetailSearchForm.searchType)
	{
		default:
		case 'therm':
			for(var i = 0; i < DetailSearchForm.FoundThermList.length; i++)
			{
				found = false;
				for(var z = 0; z < autoCompleteArray.length; z++)
				{
					if(autoCompleteArray[z] == DetailSearchForm.FoundThermList[i][obj.id])
					{
						found = true;
						break;	
					}
				}
				if(found == false)
				{
					autoCompleteArray.push(DetailSearchForm.FoundThermList[i][obj.id]);
				}
			}
			break;
		case 'hotel':
			for(var i = 0; i < DetailSearchForm.FoundHotelList.length; i++)
			{
				found = false;
				for(var z = 0; z < autoCompleteArray.length; z++)
				{
					if(autoCompleteArray[z] == DetailSearchForm.FoundHotelList[i][obj.id])
					{
						found = true;
						break;	
					}
				}
				if(found == false)
				{
					autoCompleteArray.push(DetailSearchForm.FoundHotelList[i][obj.id]);
				}
			}
			break;
		case 'offer':
			for(var i = 0; i < DetailSearchForm.FoundOfferList.length; i++)
			{
				found = false;
				for(var z = 0; z < autoCompleteArray.length; z++)
				{
					if(autoCompleteArray[z] == DetailSearchForm.FoundOfferList[i][obj.id])
					{
						found = true;
						break;	
					}
				}
				if(found == false)
				{
					autoCompleteArray.push(DetailSearchForm.FoundOfferList[i][obj.id]);
				}
			}
			break;
	}	
	autoCompleteArray = sortString(autoCompleteArray);
	for(var z = 0; z < autoCompleteArray.length; z++)
	{
		html += '<a class="auto_complete_link" onclick="autoCompleteSet(this.rel)" href="javascript:void(empty())" rel="'+autoCompleteArray[z]+'">'+autoCompleteArray[z]+'</a>';
	}
	if(autoCompleteDropdown == false)
	{
		var pos= hurra_return_absolute_pos(obj);
		autoCompleteDropdown = document.createElement('div');
		autoCompleteDropdown.style.width = obj.offsetWidth+'px'; 
		autoCompleteDropdown.className = 'quicksearch_result_container';
		document.body.appendChild(autoCompleteDropdown);
		autoCompleteDropdown.style.left = (pos.left-1)+'px';
		autoCompleteDropdown.style.top = (pos.top + obj.offsetHeight)+'px';
	}
	autoCompleteDropdown.innerHTML = html;
}
function empty()
{
	return false;	
}
//Ende

/**
* Hilfsfunktionen zum ausfüllen des Bewertungsformulars
**/
function textarea_focus()
{
	if(this.name == this.value)
	{
		this.value = "";	
	}
	this.style.color = "#3d3d3d";
	this.style.fontSize = "12px";
}
function textarea_blur()
{
	if(this.name == this.value || this.value == "")
	{
		this.style.color = "#A0A0A0";
		this.style.fontSize = "11px";
		this.value = this.name;
	}
}
function check_select_tropfen()
{
	this.firstChild.value = '-1';
	this.childNodes[1].src = 'pix/bttn/check_selected.gif';
	setTropfen(this.parentNode.firstChild,-1);
}
function click_tropfen()
{
		var id = this.className.split('_');
		id = id[id.length-1];
		setTropfen(this.parentNode, id);
}
function setTropfen(obj, num)
{
	for(var i = 1; i < obj.childNodes.length -1; i++)
	{
		var id = obj.childNodes[i].className.split('_');
		id = id[id.length-1];
		if(id <= num)
		{
			obj.childNodes[i].src = 'pix/tropfen/10_w.gif';
		}
		else
		{
			obj.childNodes[i].src = 'pix/tropfen/00_w.gif';
		}
	}
	obj.nextSibling.firstChild.value = num;
	if(num >= 0)
	{
		obj.nextSibling.childNodes[1].src = 'pix/bttn/check_unselected.gif';
	}
	else
	{
		obj.nextSibling.childNodes[1].src = 'pix/bttn/check_selected.gif';
	}
}
function check_select()
{
	if(this.childNodes[1].src.toLowerCase().indexOf('pix/bttn/check_unselected.gif')>-1)
	{
		this.firstChild.value = '1';
		this.childNodes[1].src = 'pix/bttn/check_selected.gif';
	}
	else
	{
		this.firstChild.value = '0';
		this.childNodes[1].src = 'pix/bttn/check_unselected.gif';
	}
}
function radio_select()
{
	for(var i = 1; i < this.parentNode.childNodes.length; i++)
	{
		this.parentNode.childNodes[i].firstChild.src = 'pix/bttn/radio_unselect.gif';
	}
	this.firstChild.src = 'pix/bttn/radio_selected.gif';
	this.parentNode.firstChild.value = this.firstChild.name;
}

//
// Thermenguide
//
//Hilfsfunktion zum Durchsuchen der vorgeladenen Thermen
function find_Therm_by_Id(id)
{
	for(var i = 0; i < ThermList.length; i++)
	{
		if(ThermList[i].thermenId == id)
		{
			return ThermList[i];
		}
	}
	return false;
}
function getback_question(key)
{
	postVars = 'guide_key='+hk+'&dir=last&key='+key;
	document.getElementById('guide_search_form_container').innerHTML = "<span class='blue'>Bitte haben Sie etwas Geduld, Ihre Eingaben werden verarbeitet!</span>";
	request = new Http(
		"guide.php",
		null,
		'POST',
		postVars,
		['Content-Type', 'application/x-www-form-urlencoded']
	);
	request.onreadyst = function()
	{
		if (requestQue.List[0].req.readyState == 4)
		{
			if (requestQue.List[0].req.status == 200)
			{
				document.getElementById('guide_search_form_container').innerHTML = requestQue.List[0].req.responseText;
				requestQue.requExecuted();
			}
			else
			{
				requestQue.requExecuted();
			}
		}
	}
	requestQue.add(request);
}
function submit_question(key, idArray)
{
	var resultArr = new Array();
	for(var i = 0; i < idArray.length; i++)
	{
		//alert(idArray[i]);
		if(document.getElementById(idArray[i]).value.length > 0)
		{
			resultArr.push(document.getElementById(idArray[i]).value);
			
		}
	}
	//alert(resultArr.length);
	if(resultArr.length <= 0)
	{
		hurra_alert("Achtung!","Bitte beantworten Sie die Frage.","");
		return false;
	}
	//alert(resultArr);
	postVars = 'guide_key='+hk+'&dir=next&key='+key+'&value='+serialize(resultArr);
	request = new Http(
		"guide.php",
		null,
		'POST',
		postVars,
		['Content-Type', 'application/x-www-form-urlencoded']
	);
	request.onreadyst = function()
	{
		if (requestQue.List[0].req.readyState == 4)
		{
			if (requestQue.List[0].req.status == 200)
			{
				document.getElementById('guide_search_form_container').innerHTML = requestQue.List[0].req.responseText;
				requestQue.requExecuted();
			}
			else
			{
				requestQue.requExecuted();
			}
		}
	}
	requestQue.add(request);
}
function show_answer(key, idArray)
{
	resultArr = new Array();
	for(var i = 0; i < idArray.length; i++)
	{
		if(document.getElementById(idArray[i]).value.length > 0)
		{
			resultArr.push(document.getElementById(idArray[i]).value);
		}
	}
	if(resultArr.length <= 0 && key != 'last')
	{
		hurra_alert("Achtung!","Bitte beantworten Sie die Frage.","");
		return false;
	}
	
	show_aquarius_loader();
	//alert(resultArr);
	postVars = 'guide_key='+hk+'&dir=next&key='+key+'&value='+serialize(resultArr)+'&show_result=1';
	request = new Http(
		"guide.php",
		null,
		'POST',
		postVars,
		['Content-Type', 'application/x-www-form-urlencoded']
	);
	request.onreadyst = function()
	{
		if (requestQue.List[0].req.readyState == 4)
		{
			if (requestQue.List[0].req.status == 200)
			{
				hide_aquarius_loader();
				
				var resVar = requestQue.List[0].req.responseText;

				//alert(res);
				//alert(resVar);
				res = eval(resVar);
				var results = new Array();
				
				if(res.length > 0)
				{
					for(var i = 0; i < res.length; i++)
					{
						if(find_Therm_by_Id(res[i][0]) !== false)
						{
							try
							{
								results.push(new Array(res[i], find_Therm_by_Id(res[i][0])));
							}
							catch(e){}
						}
					}
				
					var html = '<h1 style="padding-left:10px">'+results.length+' Empfohlene Thermen</h1>';
					html += '<div id="detailEvalBox">';
					for(var z = 0; z < results.length; z++)
					{
						html += '<div class="search_result_list_container">';
						html += '<a class="search_result_img_link" href="'+results[z][1].return_guide_url()+'"><img src="'+results[z][1].stammdaten_beschreibendesBild+'" /><span></span></a>';
						html += '<div class="search_result_list_right_container">';
						html += '<a class="search_result_list_title" href="'+results[z][1].return_guide_url()+'">'+results[z][1].stammdaten_name+'</a>';
						html += '<a class="search_result_list_adress" href="'+results[z][1].return_guide_url()+'">'+results[z][1].regionName+'<br />'+results[z][1].cityName+', '+results[z][1].stammdaten_postleitzahl+'</a>';
						html += '<a class="search_result_list_adress" href="'+results[z][1].return_guide_url()+'"><strong>Diese Therme entspricht zu '+(Math.round(results[z][0][1]*100))+'% den von Ihnen gesuchten Kriterien</strong><br />Begründung der Empfehlung:<br />'+results[z][0][2]+'</a>';
						html += '<div class="search_result_list_nav_container"><a href="'+results[z][1].return_guide_url()+'">» zur Therme!</a></div>';
						html += '</div>';
						html += '<div class="clear_both">&nbsp;</div>';
						html += '</div>';
					}
					html += '</div>';
					hurra_create_2ndWindow(560,'<div id="hurra2ndWindow_scrollContentContainer">'+html+'</div>');
				}
				else
				{
					alert('Leider gibt es keine passende Therme!');
				}
				
				//document.getElementById('guide_search_form_container').innerHTML = document.getElementById('guide_search_form_container').innerHTML + res.length;
				
				//alert(res);
				requestQue.requExecuted();
			}
			else
			{
				requestQue.requExecuted();
			}
		}
	}
	requestQue.add(request);
}

// Wellradio
////
function openWellradio()
{
    var popup = self.open("wellradio.php", "Wellradio", "width=440,height=330");
    var newx = (screen.width - 440)/2;
    var newy = (screen.height - 330)/2;
    popup.moveTo(newx, newy);
    popup.focus();
}
// Ende //
//
//Extras - Thermalwassrmatrix
//
function extras_thermalwassermatrix()
{
	var html = '<h1 style="padding-left:10px">Thermalwassermatrix</h1>';	
	html += '<div id="hurra2ndWindow_scrollContentContainer">';
	html += '</div>';
	hurra_create_2ndWindow(980,html);	
	postVars = "pass="+hk;
	request = new Http(
		"thermalwassermatrix.php",
		null,
		'POST',
		postVars,
		['Content-Type', 'application/x-www-form-urlencoded']
	);
	hurra_lockPage();
	request.onreadyst = function()
	{
		if (requestQue.List[0].req.readyState == 4)
		{
			if (requestQue.List[0].req.status == 200)
			{
				try
				{
					document.getElementById('hurra2ndWindow_scrollContentContainer').innerHTML = requestQue.List[0].req.responseText;
					hurra_unlockPage();
				}catch(e){}
				requestQue.requExecuted();
			}
			else
			{
				requestQue.requExecuted();
			}
		}
	}
	requestQue.add(request);
}
// Ende //
////
// RSS
////
function hurra_show_rss()
{
	var html = '<h1 style="padding-left:10px">RSS-Feeds Abonnieren</h1>';
	html += '<div style="padding:10px">';
	html += '<a href="rss_de_aktuelles.php" class="rss_center" target="_blank"><img src="pix/icons/rss.gif" alt="rss" />Aktuelles</a>';
	html += '<a href="rss_de_angebote.php" class="rss_center" target="_blank"><img src="pix/icons/rss.gif" alt="rss" />Angebote</a>';
	//html += '<a href="rss_de_gewinnspiele.php" class="rss_center" target="_blank"><img src="pix/icons/rss.gif" alt="rss" />Gewinnspiele</a>';
	html += '</div>';
	hurra_create_2ndWindow(350,html);
}
// Ende //

//
// myTC
//
var myTC_communityWindowIsOpen = false;
var cachedSubsite = '';
function myTC_open_Community(subsite)
{
	if(myTC_communityWindowIsOpen == true)
	{
		myTC_open_CommunitySubsite(subsite);
	}
	else if(myTC_communityWindowIsOpen == false)
	{
		cachedSubsite = subsite;
		var html = '<h1 style="padding-left:10px">&nbsp;</h1>';	
		html += '<div id="hurra2ndWindow_scrollContentContainer">';
		html += '</div>';
		hurra_create_2ndWindow(780,html);
		myTC_communityWindowIsOpen = true;
		
		postVars = "pass="+hk+"&action=openCommunity";
		request = new Http(
			"class_frontendUser_ajax.php",
			null,
			'POST',
			postVars,
			['Content-Type', 'application/x-www-form-urlencoded']
		);
		
		hurra_lockPage();
		request.onreadyst = function()
		{
			if (requestQue.List[0].req.readyState == 4)
			{
				if (requestQue.List[0].req.status == 200)
				{
					try
					{
						document.getElementById('hurra2ndWindow_scrollContentContainer').innerHTML = requestQue.List[0].req.responseText;
						hurra_unlockPage();
						myTC_open_CommunitySubsite(cachedSubsite);
					}catch(e){}
					requestQue.requExecuted();
				}
				else
				{
					requestQue.requExecuted();
				}
			}
		}
		requestQue.add(request);
	}
}
function myTC_open_CommunitySubsite(subsite)
{
	try
	{
		hurra_unlockPage();
	}
	catch(e){}
	hurra_lockPage();
	postVars = "pass="+hk+"&action=openCommunitySub&subSite="+subsite;
	request = new Http(
		"class_frontendUser_ajax.php",
		null,
		'POST',
		postVars,
		['Content-Type', 'application/x-www-form-urlencoded']
	);
	request.onreadyst = function()
	{
		if (requestQue.List[0].req.readyState == 4)
		{
			if (requestQue.List[0].req.status == 200)
			{
				try
				{
					document.getElementById('myTC_community_rechteSpalte').innerHTML = requestQue.List[0].req.responseText;
				}catch(e){}
				try
				{
					hurra_unlockPage();
				}catch(e){}
				requestQue.requExecuted();
			}
			else
			{
				requestQue.requExecuted();
			}
		}
	}
	requestQue.add(request);
}

//myTC Merkzettel
var myTCcurrentNotePadNum = -1;
function myTC_add_therm_to_notepad(id, maxNum, currentNum)
{
	if(myTCcurrentNotePadNum != -1)
	{
		if(myTCcurrentNotePadNum >= maxNum)
		{
			hurra_alert("Achtung!","Sie können maximal "+maxNum+" Thermen auf Ihrem Merkzettel speichern!","");
			return false;	
		}
	}
	else
	{
		if(currentNum >= maxNum)
		{
			hurra_alert("Achtung!","Sie können maximal "+maxNum+" Thermen auf Ihrem Merkzettel speichern!","");
			return false;	
		}
	}
	
	var form = document.createElement('form');
	form.style.top = '-500px';
	form.style.visibility = 'hidden';
	form.method = "post";
	form.action = "";
	
	var input = document.createElement('input');
	input.type = "hidden";
	input.name = "add_to_notepadId";
	input.value = id;
	
	form.appendChild(input);
	document.body.appendChild(form);
	form.submit();
}
function myTC_delete_all_from_notepad()
{
	hurra_confirm('Achtung', 'Wollen Sie wirklich alle Thermen vom Merkzetel entfernen?', ' myTC_delete_from_notepad(\\\'all\\\');', '');
}
function myTC_delete_from_notepad(id)
{
	try
	{
		hurra_unlockPage();
	}
	catch(e){}
	hurra_lockPage();
	if(id=='all')
	{
		postVars = "pass="+hk+"&action=deleteFromNotePad";
	}
	else
	{
		postVars = "pass="+hk+"&action=deleteFromNotePad&thermId="+id;
	}
	request = new Http(
		"class_frontendUser_ajax.php",
		null,
		'POST',
		postVars,
		['Content-Type', 'application/x-www-form-urlencoded']
	);
	request.onreadyst = function()
	{
		if (requestQue.List[0].req.readyState == 4)
		{
			if(requestQue.List[0].req.status == 200)
			{
				var numOnNotepad = requestQue.List[0].req.responseText;
				myTCcurrentNotePadNum = numOnNotepad;
				hurra_unlockPage_firstLevel();
				document.getElementById('numOnNotepad').innerHTML = numOnNotepad;
				hurra_unlockPage();
				myTC_open_Community('merkzettel');
				requestQue.requExecuted();
			}
			else
			{
				requestQue.requExecuted();
			}
		}
	}
	requestQue.add(request);
}
function myTC_open_notepad_from_2nd()
{
	try
	{
		hurra_unlockPage_firstLevel();
	}catch(e){}
	myTC_open_Community('merkzettel');
}
function myTC_compare_notepad()
{
	if(myTC_communityWindowIsOpen == true)
	{
		hurra_unlockPage_firstLevel();
	}
	var html = '<h1 style="padding-left:10px">Thermen auf meinem Merkzettel vergleichen</h1>';	
	html += '<div id="hurra2ndWindow_scrollContentContainer">';
	html += '</div>';
	hurra_create_2ndWindow(980,html);	
	postVars = "pass="+hk+"&action=compareNotepad";
	request = new Http(
		"class_frontendUser_ajax.php",
		null,
		'POST',
		postVars,
		['Content-Type', 'application/x-www-form-urlencoded']
	);
	hurra_lockPage();
	request.onreadyst = function()
	{
		if (requestQue.List[0].req.readyState == 4)
		{
			if (requestQue.List[0].req.status == 200)
			{
				try
				{
					document.getElementById('hurra2ndWindow_scrollContentContainer').innerHTML = requestQue.List[0].req.responseText;
					hurra_unlockPage();
				}catch(e){}
				requestQue.requExecuted();
			}
			else
			{
				requestQue.requExecuted();
			}
		}
	}
	requestQue.add(request);
}
function myTC_submit_from_notepad()
{
	var errorReport = "";
	var nameV = document.getElementById('contactFormName').value;
	if(!hurra_check_length(nameV, 2))
	{
		errorReport += "Bitte füllen Sie das Feld Name aus!<br />";
	}
	var emailV = document.getElementById('contactFormEmail').value;
	if(!hurra_check_length(emailV, 2))
	{
		errorReport += "Bitte füllen Sie das Feld Email aus!<br />";
	}
	else if(!hurra_check_mail(emailV))
	{
		errorReport += "Bitte füllen Sie das Feld Email korrekt aus!<br />";
	}
	var messageV = document.getElementById('contactFormMessage').value;
	if(!hurra_check_length(messageV, 2))
	{
		errorReport += "Bitte füllen Sie das Feld Nachricht aus!<br />";
	}
	if(errorReport.length>0)
	{
		hurra_alert('Fehler!',errorReport, '');
		return false;
	}	
	postVars = "pass="+hk+"&name="+nameV+"&email="+emailV+"&message="+messageV+"&action=sendMessageFromNotePad";
	request = new Http(
		"class_frontendUser_ajax.php",
		null,
		'POST',
		postVars,
		['Content-Type', 'application/x-www-form-urlencoded']
	);
	request.onreadyst = function()
	{
		if (requestQue.List[0].req.readyState == 4)
		{
			if (requestQue.List[0].req.status == 200)
			{
				hurra_alert("Vielen Dank für Ihre Anfrage!","Ihre Nachricht(en) wurde(n) erfolgreich übermittelt","");
				document.getElementById('contactFormMessage').value = "";
				//hurra_unlockPage_firstLevel();
				requestQue.requExecuted();
			}
			else
			{
				requestQue.requExecuted();
			}
		}
	}
	requestQue.add(request);
}

function myTC_delete_myPic(picId)
{
	hurra_confirm('Achtung', 'Wollen Sie dieses Bild wirklich löschen?', 'myTC_realdelete_myPic('+picId+');', '');
}
function myTC_realdelete_myPic(picId)
{
	hurra_unlockPage();
	hurra_lockPage();
	postVars = "pass="+hk+"&action=deletePic&picId="+picId;
	request = new Http(
		"class_frontendUser_ajax.php",
		null,
		'POST',
		postVars,
		['Content-Type', 'application/x-www-form-urlencoded']
	);
	request.onreadyst = function()
	{
		if (requestQue.List[0].req.readyState == 4)
		{
			if(requestQue.List[0].req.status == 200)
			{
				hurra_unlockPage();
				//myTC_open_CommunitySubsite('myEvalPic');
				hurra_alert("","Ihr Bild wurde erfolgreich gelöscht!","myTC_show_myPic()");
				requestQue.requExecuted();
			}
			else
			{
				requestQue.requExecuted();
			}
		}
	}
	requestQue.add(request);
}
function myTC_show_myPic()
{
	myTC_open_CommunitySubsite('myEvalPic');
}
//myTC Bewrtung detail
function myTC_show_evaluation(evaluationId)
{
	hurra_lockPage();
	postVars = "pass="+hk+"&action=openCommunitySub&subSite=myEval&evaluationId="+evaluationId;
	request = new Http(
		"class_frontendUser_ajax.php",
		null,
		'POST',
		postVars,
		['Content-Type', 'application/x-www-form-urlencoded']
	);
	request.onreadyst = function()
	{
		if (requestQue.List[0].req.readyState == 4)
		{
			if (requestQue.List[0].req.status == 200)
			{
				try
				{
					document.getElementById('myTC_community_rechteSpalte').innerHTML = requestQue.List[0].req.responseText;
					hurra_unlockPage();
				}catch(e){}
				requestQue.requExecuted();
			}
			else
			{
				requestQue.requExecuted();
			}
		}
	}
	requestQue.add(request);
}

function myTC_deleteAccount()
{
	hurra_confirm('Achtung', 'Wollen Sie Ihre meinTC Konto wirklich löschen?', 'myTC_deleteAccountReal();', '')	
}
function myTC_deleteAccountReal()
{
	show_aquarius_loader();
	
	postVars = "pass="+hk+"&action=deleteAccount";
	if(document.getElementById('myTC_delete_allPic').checked == true)
	{
		postVars  += "&deletePic=1";
	}
	request = new Http(
		"class_frontendUser_ajax.php",
		null,
		'POST',
		postVars,
		['Content-Type', 'application/x-www-form-urlencoded']
	);
	request.onreadyst = function()
	{
		if (requestQue.List[0].req.readyState == 4)
		{
			if (requestQue.List[0].req.status == 200)
			{
				//hurra_alert("",requestQue.List[0].req.responseText,"");
				requestQue.requExecuted();
				var form = document.createElement('form');
				form.method = 'post';
				form.style.top = '-500px';
				form.style.visibility = 'hidden';
				document.body.appendChild(form);
				form.submit();
			}
			else
			{
				requestQue.requExecuted();
			}
		}
	}
	requestQue.add(request);
}
function myTC_logout()
{
	show_aquarius_loader();
	//hurra_lockPage();
	postVars = "pass="+hk+"&action=logout";
	request = new Http(
		"class_frontendUser_ajax.php",
		null,
		'POST',
		postVars,
		['Content-Type', 'application/x-www-form-urlencoded']
	);
	request.onreadyst = function()
	{
		if (requestQue.List[0].req.readyState == 4)
		{
			if (requestQue.List[0].req.status == 200)
			{
				//hurra_alert("",requestQue.List[0].req.responseText,"");
				requestQue.requExecuted();
				var form = document.createElement('form');
				form.method = 'post';
				form.style.top = '-500px';
				form.style.visibility = 'hidden';
				document.body.appendChild(form);
				form.submit();
			}
			else
			{
				requestQue.requExecuted();
			}
		}
	}
	requestQue.add(request);
}
function myTC_login_k(e)
{
	if(window.event)
	{
		if(e.keyCode == 13)
		{
			myTC_login()
		}
	}
	else
	{
		if(e.which == 13)
		{
			myTC_login()
		}
	}
}
function myTC_login()
{
	var password = '';
	var username = '';
	try
	{
		username = document.getElementById('myTCLogin_username').value;
	}catch(e){}
	try
	{
		password = document.getElementById('myTCLogin_password').value;
	}catch(e){}
	try
	{
		username = document.getElementById('myTC_login2_username').value;
	}catch(e){}
	try
	{
		password = document.getElementById('myTC_login2_password').value;
	}catch(e){}
	hurra_lockPage();
	postVars = "pass="+hk+"&action=login&username="+username+"&password="+password;
	request = new Http(
		"class_frontendUser_ajax.php",
		null,
		'POST',
		postVars,
		['Content-Type', 'application/x-www-form-urlencoded']
	);
	request.onreadyst = function()
	{
		if (requestQue.List[0].req.readyState == 4)
		{
			if (requestQue.List[0].req.status == 200)
			{
				hurra_unlockPage();
				var result = eval(requestQue.List[0].req.responseText);
				requestQue.requExecuted();
				if(result == true)
				{
					var form = document.createElement('form');
					form.method = 'post';
					form.style.top = '-500px';
					form.style.visibility = 'hidden';
					document.body.appendChild(form);
					show_aquarius_loader();
					form.submit();
				}
				else
				{
					hurra_alert("Fehler!","Benutzername oder Passwort ist ungültig!","");
				}
			}
			else
			{
				requestQue.requExecuted();
			}
		}
	}
	requestQue.add(request);
}
function myTC_changePassword()
{
	var errorReport = '';
	
	var password = document.getElementById('myTC_change_password');
	if(!hurra_check_length(password.value, 5))
	{
		errorReport += "Bitte füllen Sie das Feld Neues Passwort aus!<br />";
	}
	
	var confirmPassword = document.getElementById('myTC_change_passwordConfirm');	
	if(password.value != confirmPassword.value)
	{
		errorReport += "Das Felder Neues Passwort bestätigen und Neues Passwort stimmen nicht überein!<br />";
	}
	if(errorReport.length>0)
	{
		hurra_alert('Fehler!',errorReport, '');
		return false;
	}
	hurra_lockPage();
	postVars = "pass="+hk+"&password="+password.value+"&action=changePassword";
	request = new Http(
		"class_frontendUser_ajax.php",
		null,
		'POST',
		postVars,
		['Content-Type', 'application/x-www-form-urlencoded']
	);
	request.onreadyst = function()
	{
		if(requestQue.List[0].req.readyState == 4)
		{
			if(requestQue.List[0].req.status == 200)
			{
				hurra_unlockPage();
				var result = eval(requestQue.List[0].req.responseText);
				if(result == true)
				{
					document.getElementById('myTC_change_password').value = "";
					document.getElementById('myTC_change_passwordConfirm').value = "";	
					hurra_alert("","Ihr Passwort wurde erfolgreich geändert!","");
				}
				else
				{
					hurra_alert("Fehler","Ungültige Eingabe - Ihr Passwort konnnte nicht geändert werden!","");
				}
				requestQue.requExecuted();
			}
			else
			{
				requestQue.requExecuted();
			}
		}
	}
	requestQue.add(request);
}
function myTC_changeMyData()
{
	var errorReport = '';
	
	var salutation = document.getElementsByName('myTC_change_salutation');
	var foundSalutation = false;
	for(var i=0; i< salutation.length; i++)
	{
		if(salutation[i].checked)
		{
			salutation = salutation[i];
			foundSalutation = true;
			break;
		}
	}
	if(foundSalutation == false)
	{
		errorReport += "Bitte wählen Sie Ihre Anrede aus!<br />";
	}
	
	var firstname = document.getElementById('myTC_change_firstname');
	if(!hurra_check_length(firstname.value, 2))
	{
		errorReport += "Bitte füllen Sie das Feld Vorname aus!<br />";
	}
	
	var lastname = document.getElementById('myTC_change_lastname');
	if(!hurra_check_length(lastname.value, 2))
	{
		errorReport += "Bitte füllen Sie das Feld Nachname aus!<br />";
	}
	
	var street = document.getElementById('myTC_change_street');
	if(!hurra_check_length(street.value, 2))
	{
		errorReport += "Bitte füllen Sie das Feld Straße aus!<br />";
	}
	
	var zip = document.getElementById('myTC_change_zip');
	if(!hurra_check_length(zip.value, 2))
	{
		errorReport += "Bitte füllen Sie das Feld PLZ aus!<br />";
	}
	
	var city = document.getElementById('myTC_change_city');
	if(!hurra_check_length(city.value, 2))
	{
		errorReport += "Bitte füllen Sie das Feld Ort aus!<br />";
	}
	
	var country = document.getElementById('myTC_change_country');
	if(!hurra_check_length(country.value, 2))
	{
		errorReport += "Bitte füllen Sie das Feld Land aus!<br />";
	}
	
	var email = document.getElementById('myTC_change_email');
	if(!hurra_check_length(email.value, 2))
	{
		errorReport += "Bitte füllen Sie das Feld E-Mail-Adresse aus!<br />";
	}
	else if(!hurra_check_mail(email.value))
	{
		errorReport += "Bitte füllen Sie das Feld E-Mail-Adresse korrekt aus!<br />";
	}
	var username = document.getElementById('myTC_change_username');
	if(!hurra_check_length(username.value, 3))
	{
		errorReport += "Bitte füllen Sie das Feld Benutzername aus!<br />";
	}
	
	if(errorReport.length>0)
	{
		hurra_alert('Fehler!',errorReport, '');
		return false;
	}
	hurra_lockPage();
	postVars = "pass="+hk+"&salutation="+salutation.value+"&firstname="+firstname.value+"&lastname="+lastname.value+"&street="+street.value+"&zip="+zip.value+"&city="+city.value+"&country="+country.value+"&email="+email.value+"&username="+username.value+"&action=changeMyData";
	request = new Http(
		"class_frontendUser_ajax.php",
		null,
		'POST',
		postVars,
		['Content-Type', 'application/x-www-form-urlencoded']
	);
	request.onreadyst = function()
	{
		if (requestQue.List[0].req.readyState == 4)
		{
			if (requestQue.List[0].req.status == 200)
			{
				hurra_unlockPage();
				eval(requestQue.List[0].req.responseText);
				var errorReport = '';
				if(emailExists == true)
				{
					errorReport += "Es gibt bereits ein meinTC Mitglied mit dieser E-Mailadresse, bitte wählen Sie eine andere E-Mailadresse aus!<br />";
				}
				if(usernameExists == true)
				{
					errorReport += "Es gibt bereits ein meinTC Mitglied mit diesem Benutzernamen, bitte wählen Sie eine anderen Benutzernamen aus!<br />";
				}
				if(errorReport.length>0)
				{
					hurra_alert('Fehler!',errorReport, '');
				}
				else
				{
					hurra_alert('','Ihre Stammdaten wurden erfolgreich geändert','');
				}				
				requestQue.requExecuted();
			}
			else
			{
				requestQue.requExecuted();
			}
		}
	}
	requestQue.add(request);
}

function myTC_show_rgister()
{
	var html = '<h1 style="padding-left:10px">&nbsp;</h1>';
	
	html += '<div id="hurra2ndWindow_scrollContentContainer">';
	
	html += '<div class="myTC_registrieren_linkeSpalte">';
	html += '<h1>Registrierung</h1>';
	html += '<div class="myTC_regBeschreibung">Ich bin neu hier und möchte einen kostenlosen <strong>meinTC-Account</strong> erstellen.</div>';
	html += '<div class="myTC_regBeschreibung"><span class="grey10">* Pflichtfelder</span></div>';
	
	html += '<div class="myTC_inputTitel"> Anrede*:</div>';
	html += '<div class="myTC_input_container"><input id="myTC_register_salutation_frau" name="myTC_register_salutation" class="radio" type="radio" value="Frau" /><label for="myTC_register_salutation_frau" class="middle">Frau</label>&nbsp;';
	html += '<input id="myTC_register_salutation_herr" name="myTC_register_salutation" class="radio" type="radio" value="Herr" /><label for="myTC_register_salutation_herr" class="middle">Herr</label></div>';
	
	html += '<div class="myTC_inputTitel"> Vorname*:</div>';
	html += '<input id="myTC_register_firstname" class="myTC_input" type="text">';
	
	html += '<div class="myTC_inputTitel"> Nachname*:</div>';
	html += '<input id="myTC_register_lastname" class="myTC_input" type="text">';
	
	html += '<div class="myTC_inputTitel"> Straße*:</div>';
	html += '<input id="myTC_register_street" class="myTC_input" type="text">';
	
	html += '<div class="myTC_inputTitel"> PLZ*:</div>';
	html += '<input id="myTC_register_zip" class="myTC_input" type="text">';
	
	html += '<div class="myTC_inputTitel"> Ort*:</div>';
	html += '<input id="myTC_register_city" class="myTC_input" type="text">';
	
	html += '<div class="myTC_inputTitel"> Land*:</div>';
	html += '<input id="myTC_register_country" class="myTC_input" type="text">';
	
	html += '<div class="myTC_inputTitel"> E-Mail-Adresse*:</div>';
	html += '<input id="myTC_register_email" class="myTC_input" type="text">';
	
	html += '<div class="myTC_inputTitel"> Benutzername*  (min 3 Zeichen):</div>';
	html += '<input id="myTC_register_username" class="myTC_input" type="text">';
	
	html += '<div class="myTC_inputTitel"> Passwort* (min 5 Zeichen):</div>';
	html += '<input id="myTC_register_password" class="myTC_input" type="password">';
	
	html += '<div class="myTC_inputTitel"> Passwort bestätigen*:</div>';
	html += '<input id="myTC_register_passwordConfirm" class="myTC_input" type="password">';
	
	html += '<div class="myTC_inputTitel"><input id="myTC_register_readAgb" class="radio" type="checkbox" />&nbsp;<label for="myTC_register_readAgb" class="middle">Ich habe die AGB gelesen und akzeptiert*</label></div>';
	html += '<div class="myTC_input_container"><a target="_blank" href="/aut_de_xhtml-9-agb.html">» zu den AGB</a></div>';
	
	html += '<br /><a class="button_inline_11" href="javascript:void(myTC_submit_register())">Kostenlos registrieren</a>';
	
	//html += '<a class="button_container" href="javascript:void(myTC_submit_register())"><img src="pix/bttn/bttn_white_left.gif" alt="" /><div class="text">Kostenlos registrieren</div><img src="pix/bttn/bttn_white_right.gif" alt="" /><div class="clear_both">&nbsp;</div></a>';
	//html += '<div class="clear_both">&nbsp;</div>';
	html += '</div>';
	
	html += '<div class="myTC_registrieren_rechteSpalte">';
	html += '<h1>Anmeldung</h1>';
	html += '<div class="myTC_regBeschreibung">Ich habe bereits einen <strong>meinTC-Account</strong> und möchte mich anmelden.</div>';
	html += '<div class="myTC_inputTitel" >Benutzername:</div>';
	html += '<input id="myTC_login2_username" class="myTC_input" type="text">';
	html += '<div class="myTC_inputTitel" >Passwort:</div>';
	html += '<input id="myTC_login2_password" class="myTC_input" type="password">';
	
	html += '<br /><br /><a class="button_inline_11" href="javascript:void(myTC_login())">anmelden</a>';
	
	//html += '<a class="button_container" href="javascript:void(myTC_login())"><img src="pix/bttn/bttn_white_left.gif" alt="" /><div class="text">anmelden</div><img src="pix/bttn/bttn_white_right.gif" alt="" /><div class="clear_both">&nbsp;</div></a>';
	//html += '<div class="clear_both">&nbsp;</div>';
	html += '<div class="myTC_vsep">&nbsp;</div>';
	html += '<strong>Passwort vergessen?</strong><br /><br />'
	html += '<div class="myTC_inputTitel"> E-Mail-Adresse*:</div>';
	html += '<input id="myTC_reminder_email" class="myTC_input" type="text">';
	
	html += '<br /><br /><a class="button_inline_11" href="javascript:void(myTC_submit_pwReminder())">Zugangsdaten anfordern</a>';
//	html += '<a class="button_container" href="javascript:void(myTC_submit_pwReminder())"><img src="pix/bttn/bttn_white_left.gif" alt="" /><div class="text">Zugangsdaten anfordern</div><img src="pix/bttn/bttn_white_right.gif" alt="" /><div class="clear_both">&nbsp;</div></a>';
//	html += '<div class="clear_both">&nbsp;</div>';
	html += '</div>';
	
	html += '<div class="clear_both">&nbsp;</div>';
	
	html += '</div>';
	hurra_create_2ndWindow(530,html);
}
function myTC_show_reminder()
{
	var html = '<div class="generalTitle" style="padding-left:10px">&nbsp;</div>';
	
	html += '<div style="position:relative; padding:0 14px 14px 14px">';
	html += '<h1>Passwort vergessen?</h1>'
	html += '<div class="myTC_inputTitel"> E-Mail-Adresse*:</div>';
	html += '<input id="myTC_reminder_email" class="myTC_input" type="text">';
	html += '<a class="button_container" href="javascript:void(myTC_submit_pwReminder())"><img src="pix/bttn/bttn_white_left.gif" alt="" /><div class="text">Zugangsdaten anfordern</div><img src="pix/bttn/bttn_white_right.gif" alt="" /><div class="clear_both">&nbsp;</div></a>';
	html += '<div class="clear_both">&nbsp;</div>';
	html += '</div>';
	html += '<div class="clear_both">&nbsp;</div>';
	html += '</div>';
	hurra_create_2ndWindow(260,html);
}
function myTC_submit_pwReminder()
{
	var errorReport = '';
	var email = document.getElementById('myTC_reminder_email');
	if(!hurra_check_length(email.value, 2))
	{
		errorReport += "Bitte füllen Sie das Feld E-Mail-Adresse aus!<br />";
	}
	else if(!hurra_check_mail(email.value))
	{
		errorReport += "Bitte füllen Sie das Feld E-Mail-Adresse korrekt aus!<br />";
	}
	if(errorReport.length>0)
	{
		hurra_alert('Fehler!',errorReport, '');
		return false;
	}
	hurra_lockPage();
	postVars = "pass="+hk+"&email="+email.value+"&action=sendReminder";
	request = new Http(
		"class_frontendUser_ajax.php",
		null,
		'POST',
		postVars,
		['Content-Type', 'application/x-www-form-urlencoded']
	);
	request.onreadyst = function()
	{
		if (requestQue.List[0].req.readyState == 4)
		{
			if (requestQue.List[0].req.status == 200)
			{
				hurra_unlockPage();
				var result = eval(requestQue.List[0].req.responseText);
				if(result == true)
				{
					hurra_alert('','Sie erhaleten Ihr Zugangsdaten in kürze auf der von Ihnen angegebene E-Mailadresse', 'hurra_unlockPage_firstLevel();');
				}
				else
				{
					hurra_alert('Fehler','Es gibt kein meinTC Mitglied mit der von Ihnen eingegebenen E-Mailadresse!','');
				}				
				requestQue.requExecuted();
			}
			else
			{
				requestQue.requExecuted();
			}
		}
	}
	requestQue.add(request);	
}
function myTC_submit_register()
{
	var errorReport = '';
	
	var salutation = document.getElementsByName('myTC_register_salutation');
	var foundSalutation = false;
	for(var i=0; i< salutation.length; i++)
	{
		if(salutation[i].checked)
		{
			salutation = salutation[i];
			foundSalutation = true;
			break;
		}
	}
	if(foundSalutation == false)
	{
		errorReport += "Bitte wählen Sie Ihre Anrede aus!<br />";
	}
	
	var firstname = document.getElementById('myTC_register_firstname');
	if(!hurra_check_length(firstname.value, 2))
	{
		errorReport += "Bitte füllen Sie das Feld Vorname aus!<br />";
	}
	
	var lastname = document.getElementById('myTC_register_lastname');
	if(!hurra_check_length(lastname.value, 2))
	{
		errorReport += "Bitte füllen Sie das Feld Nachname aus!<br />";
	}
	
	var street = document.getElementById('myTC_register_street');
	if(!hurra_check_length(street.value, 2))
	{
		errorReport += "Bitte füllen Sie das Feld Straße aus!<br />";
	}
	
	var zip = document.getElementById('myTC_register_zip');
	if(!hurra_check_length(zip.value, 2))
	{
		errorReport += "Bitte füllen Sie das Feld PLZ aus!<br />";
	}
	
	var city = document.getElementById('myTC_register_city');
	if(!hurra_check_length(city.value, 2))
	{
		errorReport += "Bitte füllen Sie das Feld Ort aus!<br />";
	}
	
	var country = document.getElementById('myTC_register_country');
	if(!hurra_check_length(country.value, 2))
	{
		errorReport += "Bitte füllen Sie das Feld Land aus!<br />";
	}
	
	var email = document.getElementById('myTC_register_email');
	if(!hurra_check_length(email.value, 2))
	{
		errorReport += "Bitte füllen Sie das Feld E-Mail-Adresse aus!<br />";
	}
	else if(!hurra_check_mail(email.value))
	{
		errorReport += "Bitte füllen Sie das Feld E-Mail-Adresse korrekt aus!<br />";
	}

	var username = document.getElementById('myTC_register_username');
	if(!hurra_check_length(username.value, 3))
	{
		errorReport += "Bitte füllen Sie das Feld Benutzername aus!<br />";
	}
	
	var password = document.getElementById('myTC_register_password');
	if(!hurra_check_length(password.value, 5))
	{
		errorReport += "Bitte füllen Sie das Feld Passwort aus!<br />";
	}
	
	var confirmPassword = document.getElementById('myTC_register_passwordConfirm');	
	if(password.value != confirmPassword.value)
	{
		errorReport += "Das Felder Passwort bestätigen und Passwort stimmen nicht überein!<br />";
	}
	
	var readAgb = document.getElementById('myTC_register_readAgb');	
	if(readAgb.checked != true)
	{
		errorReport += "Bitte akzeptieren Sie unsere AGB!<br />";
	}
	
	if(errorReport.length>0)
	{
		hurra_alert('Fehler!',errorReport, '');
		return false;
	}
	
	hurra_lockPage();
	postVars = "pass="+hk+"&salutation="+salutation.value+"&firstname="+firstname.value+"&lastname="+lastname.value+"&street="+street.value+"&zip="+zip.value+"&city="+city.value+"&country="+country.value+"&email="+email.value+"&username="+username.value+"&password="+password.value+"&action=register";
	//alert(postVars);
	request = new Http(
		"class_frontendUser_ajax.php",
		null,
		'POST',
		postVars,
		['Content-Type', 'application/x-www-form-urlencoded']
	);
	request.onreadyst = function()
	{
		if(requestQue.List[0].req.readyState == 4)
		{
			if(requestQue.List[0].req.status == 200)
			{
				hurra_unlockPage();
				try
				{
					eval(requestQue.List[0].req.responseText);
				}catch(e){}
				var errorReport = '';
				try
				{
					if(emailExists == true)
					{
						errorReport += "Es gibt bereits ein meinTC Mitglied mit dieser E-Mailadresse, bitte wählen Sie eine andere E-Mailadresse aus!<br />";
					}
				}catch(e){}
				try
				{
					if(usernameExists == true)
					{
						errorReport += "Es gibt bereits ein meinTC Mitglied mit diesem Benutzernamen, bitte wählen Sie eine anderen Benutzernamen aus!<br />";
					}
				}catch(e){}
				if(errorReport.length>0)
				{
					hurra_alert('Fehler!',errorReport, '');
				}
				else
				{
					hurra_unlockPage_firstLevel();
					hurra_alert('','<strong>Vielen Dank für Ihre Anmeldung, Ihre Registrierung ist fast abgeschlossen!</strong><br/><br/>Sie bekommen in den nächsten Minuten eine E-Mail zugesandt. Bitte klicken Sie auf den Link in dieser E-Mail um Ihre Registrierung abzuschließen!<br/><br/>Ihr thermencheck.com Team','');
				}				
				requestQue.requExecuted();
			}
			else
			{
				requestQue.requExecuted();
			}
		}
	}
	requestQue.add(request);
}

//
//Extras - Newsletter
//
function submit_newsletter()
{
	var errorReport = '';
	
	var salutation = document.getElementsByName('u_Salutation');
	var foundSalutation = false;
	for(var i=0; i< salutation.length; i++)
	{
		if(salutation[i].checked)
		{
			salutation = salutation[i];
			foundSalutation = true;
			break;
		}
	}
	if(foundSalutation == false)
	{
		errorReport += "Bitte wählen Sie Ihre Anrede aus!<br />";
	}
	var firstname = document.getElementById('u_FirstName');
	if(!hurra_check_length(firstname.value, 2))
	{
		errorReport += "Bitte füllen Sie das Feld Vorname aus!<br />";
	}
	var lastname = document.getElementById('u_LastName');
	if(!hurra_check_length(lastname.value, 2))
	{
		errorReport += "Bitte füllen Sie das Feld Nachname aus!<br />";
	}
	var email = document.getElementById('u_EMail');
	if(!hurra_check_length(email.value, 2))
	{
		errorReport += "Bitte füllen Sie das Feld E-Mail-Adresse aus!<br />";
	}
	else if(!hurra_check_mail(email.value))
	{
		errorReport += "Bitte füllen Sie das Feld E-Mail-Adresse korrekt aus!<br />";
	}
	if(errorReport.length>0)
	{
		hurra_alert('Fehler!',errorReport, '');
		return false;
	}
	var form = document.getElementById('newsletter_content_container');
	form.method = 'post';
	form.action = 'http://www.newsletter.thermencheck.com/nl.php';
	form.submit();
}

////
// Show Hide Ein und Ausklappen
////
//show_hide_header
var ShowHideHeaders = new Array();
function show_hide_subContent()
{
	if(this.parentNode.className == 'show_hide_container_o')
	{
		this.parentNode.className = 'show_hide_container';
		this.childNodes[this.childNodes.length-1].src = 'pix/bttn/bttn_show_hide_plus.png';
	}
	else
	{
		for(var i = 0; i < ShowHideHeaders.length ;i++)
		{
			if(ShowHideHeaders[i].parentNode.className == 'show_hide_container_o')
			{
				ShowHideHeaders[i].parentNode.className = 'show_hide_container';
				ShowHideHeaders[i].childNodes[ShowHideHeaders[i].childNodes.length-1].src = 'pix/bttn/bttn_show_hide_plus.png';
				break;
			}
		}
		this.parentNode.className = 'show_hide_container_o';
		this.childNodes[this.childNodes.length-1].src = 'pix/bttn/bttn_show_hide_minus.png';
	}
}
function show_hide_subContent_guide(obj)
{
	var divTags = document.getElementsByTagName("div");
	var ShowHideHeadersGuide = new Array();
	for(var i = 0; i < divTags.length ;i++)
	{
		if(divTags[i].className == 'show_hide_header')
		{
			ShowHideHeadersGuide.push(divTags[i]);
		}
	}
	if(obj.parentNode.className == 'show_hide_container_o')
	{
		obj.parentNode.className = 'show_hide_container';
		obj.childNodes[this.childNodes.length-1].src = 'pix/bttn/bttn_show_hide_plus.png';
	}
	else
	{
		for(var i = 0; i < ShowHideHeadersGuide.length ;i++)
		{
			if(ShowHideHeadersGuide[i].parentNode.className == 'show_hide_container_o')
			{
				ShowHideHeadersGuide[i].parentNode.className = 'show_hide_container';
				ShowHideHeadersGuide[i].childNodes[ShowHideHeadersGuide[i].childNodes.length-1].src = 'pix/bttn/bttn_show_hide_plus.png';
				break;
			}
		}
		obj.parentNode.className = 'show_hide_container_o';
		obj.childNodes[obj.childNodes.length-1].src = 'pix/bttn/bttn_show_hide_minus.png';
	}
}
// Ende //
//
// Regionensuche mouseover
//
var regionLinkSub = false;
var regionLinkSubBorderHider = false;
var regionLinkOver = false;
var isRegionLinkOver = false;
var regionLinkOver_clearTimeout = false;
function regionLink_over()
{
	if(this.className == 'region_link')
	{
		if(regionLinkOver != false)
		{
			regionLink_out_action();
		}
		regionLinkOver = this;
		regionLink_over_action();
	}
	isRegionLinkOver = true;
}
function regionLink_over_action()
{
	regionLinkOver.style.backgroundColor = "#999";
	regionLinkOver.style.padding = "0 4px";
	regionLinkOver.style.border = "1px solid #999";
	
	regionLinkOver.style.color = "#fff";
	
	try
	{
		var pos = hurra_return_absolute_pos(regionLinkOver.parentNode);
		regionLinkSub = regionLinkOver.nextSibling.cloneNode(true);
		regionLinkSub.style.border = "1px solid #999";
		document.body.appendChild(regionLinkSub);
		regionLinkSub.style.display = 'block';
		regionLinkSub.style.top = (pos.top)+'px';
		//regionLinkSub.style.top = (pos.top + 5 + regionLinkOver.offsetHeight - regionLinkSub.offsetHeight)+'px';
		regionLinkSub.style.left = (pos.left+regionLinkOver.offsetWidth)+'px';
		hurra_addEvent(regionLinkSub,'mouseover',regionLink_over);
		hurra_addEvent(regionLinkSub,'mouseout',regionLink_out);
		regionLinkSubBorderHider = document.createElement('div');
		document.body.appendChild(regionLinkSubBorderHider);
		regionLinkSubBorderHider.className = "border_hider";
		regionLinkSubBorderHider.style.top = (pos.top + 5 + regionLinkOver.offsetHeight - 24)+'px';
		regionLinkSubBorderHider.style.left = (pos.left+regionLinkOver.offsetWidth-3)+'px';
	}catch(e){}
}
function regionLink_out()
{
	isRegionLinkOver = false;
	regionLinkOver_clearTimeout = window.setTimeout(regionLink_out_action,500);
}
function regionLink_out_action()
{
	try{window.clearInterval(regionLinkOver_clearTimeout);}catch(e){}
	if(isRegionLinkOver === false)
	{
		regionLinkOver.style.backgroundColor = "";
		regionLinkOver.style.padding = "";
		regionLinkOver.style.border = "";
		regionLinkOver.style.color = "";
		if(regionLinkSub != false)
		{
			hurra_removeNode(regionLinkSub);
			hurra_removeNode(regionLinkSubBorderHider);
			regionLinkSub = false;
			regionLinkSubBorderHider = false;
		}
		regionLinkOver_clearTimeout = false;
	}
}
// Ende //

// Bewertungen Anzeigen
function show_evaluation(id)
{
	var postVars = "pass="+hk+"&id="+id
	request = new Http(
		"module/content/static/evaluation/ajax_read.php",
		null,
		'POST',
		postVars,
		['Content-Type', 'application/x-www-form-urlencoded']
	);
	request.onreadyst = function()
	{
		if (requestQue.List[0].req.readyState == 4)
		{
			if (requestQue.List[0].req.status == 200)
			{
				var html = '<div id="hurra2ndWindow_scrollContentContainer">';
				html += requestQue.List[0].req.responseText+'</div>';
				hurra_create_2ndWindow(600,html);
				requestQue.requExecuted();
			}
			else
			{
				alert(error);
				requestQue.requExecuted();
			}
		}
	}
	requestQue.add(request);
}
// Ende //

////
// Anfrageformulare
////
//Allgemein 
function contactForm_tc()
{
	var html = '';
	html += '<div class="lightWindowForm_Container">';
	html += '<h1>Ihre Anfrage</h1>';
	html += '<span class="size_10_italic">(* Pflichtfelder)</span><br>';
	
	if(FrontendUser.isLoggedIn == 1)
	{
		html += '<div class="input_container">Name*:<input id="contactFormName" type="text" value="'+FrontendUser.firstname+' '+FrontendUser.lastname+'" /></div>';
		html += '<div class="input_container">Email*:<input id="contactFormEmail" type="text" value="'+FrontendUser.email+'" /></div>';
	}
	else
	{
		html += '<div class="input_container">Name*:<input id="contactFormName" type="text" /></div>';
		html += '<div class="input_container">Email*:<input id="contactFormEmail" type="text" /></div>';
	}
	html += '<div class="input_container">Ihre Nachricht*:</div>';
	html += '<textarea id="contactFormMessage"></textarea><input type="hidden" id="contactFormSubmitType" value="allgemein" /><input type="hidden" id="contactFormSubject" value="Anfrage von '+document.title+'" />';
	html += '<br /><a class="button_inline_11" onclick="contact_tc_submit()" href="javascript:void(empty())">Anfrage absenden</a><br />';
	html += '<br><span class="size_10">Bei Buchungsanfragen bitte vollständige Kontaktdaten (Ort, Straße, Telefonnummer) in das Feld schreiben! Vielen Dank!</span>';
	html += '</div>';
	hurra_create_2ndWindow(290,html);
}
function contact_tc_submit()
{
	var errorReport = "";
	var nameV = document.getElementById('contactFormName').value;
	if(!hurra_check_length(nameV, 2))
	{
		errorReport += "Bitte füllen Sie das Feld Name aus!<br />";
	}
	var emailV = document.getElementById('contactFormEmail').value;
	if(!hurra_check_length(emailV, 2))
	{
		errorReport += "Bitte füllen Sie das Feld Email aus!<br />";
	}
	else if(!hurra_check_mail(emailV))
	{
		errorReport += "Bitte füllen Sie das Feld Email korrekt aus!<br />";
	}
	var messageV = document.getElementById('contactFormMessage').value;
	if(!hurra_check_length(messageV, 2))
	{
		errorReport += "Bitte füllen Sie das Feld Nachricht aus!<br />";
	}
	if(errorReport.length>0)
	{
		hurra_alert('Fehler!',errorReport, '');
		return false;
	}
	var subject = document.getElementById('contactFormSubject').value;
	postVars = "pass="+hk+"&name="+nameV+"&email="+emailV+"&message="+messageV+"&submitType="+document.getElementById('contactFormSubmitType').value+"&subject="+subject;
	request = new Http(
		"contact.php",
		null,
		'POST',
		postVars,
		['Content-Type', 'application/x-www-form-urlencoded']
	);
	request.onreadyst = function()
	{
		if (requestQue.List[0].req.readyState == 4)
		{
			if (requestQue.List[0].req.status == 200)
			{
				hurra_alert("Vielen Dank für Ihre Anfrage!","Ihre Nachricht wurde erfolgreich übermittelt","");
				hurra_unlockPage_firstLevel();
				requestQue.requExecuted();
			}
			else
			{
				requestQue.requExecuted();
			}
		}
	}
	requestQue.add(request);
}
//Therme 
function contactForm_therm()
{
	var html = '';
	html += '<div class="lightWindowForm_Container">';
	html += '<h1>Ihre Anfrage</h1>';
	html += '<span class="size_10_italic">(* Pflichtfelder)</span><br>';
	
	if(FrontendUser.isLoggedIn == 1)
	{
		html += '<div class="input_container">Name*:<input id="contactFormName" type="text" value="'+FrontendUser.firstname+' '+FrontendUser.lastname+'" /></div>';
		html += '<div class="input_container">Email*:<input id="contactFormEmail" type="text" value="'+FrontendUser.email+'" /></div>';
	}
	else
	{
		html += '<div class="input_container">Name*:<input id="contactFormName" type="text" /></div>';
		html += '<div class="input_container">Email*:<input id="contactFormEmail" type="text" /></div>';
	}
	html += '<div class="input_container">Ihre Nachricht*:</div>';
	html += '<textarea id="contactFormMessage"></textarea><input type="hidden" id="contactFormThermId" value="'+this.childNodes[0].innerHTML+'" /><input type="hidden" id="contactFormSubject" value="'+this.childNodes[1].innerHTML+'" />';
	html += '<br /><a class="button_inline_11" onclick="contact_therm_submit()" href="javascript:void(empty())">Anfrage absenden</a><br />';
	html += '<br><span class="size_10">Bei Buchungsanfragen bitte vollständige Kontaktdaten (Ort, Straße, Telefonnummer) in das Feld schreiben! Vielen Dank!</span>';
	html += '</div>';
	hurra_create_2ndWindow(290,html);
}
function contact_therm_submit()
{
	var errorReport = "";
	var nameV = document.getElementById('contactFormName').value;
	if(!hurra_check_length(nameV, 2))
	{
		errorReport += "Bitte füllen Sie das Feld Name aus!<br />";
	}
	var emailV = document.getElementById('contactFormEmail').value;
	if(!hurra_check_length(emailV, 2))
	{
		errorReport += "Bitte füllen Sie das Feld Email aus!<br />";
	}
	else if(!hurra_check_mail(emailV))
	{
		errorReport += "Bitte füllen Sie das Feld Email korrekt aus!<br />";
	}
	var messageV = document.getElementById('contactFormMessage').value;
	if(!hurra_check_length(messageV, 2))
	{
		errorReport += "Bitte füllen Sie das Feld Nachricht aus!<br />";
	}
	if(errorReport.length>0)
	{
		hurra_alert('Fehler!',errorReport, '');
		return false;
	}
	var subject = document.getElementById('contactFormSubject').value;
	postVars = "pass="+hk+"&name="+nameV+"&email="+emailV+"&message="+messageV+"&thermId="+document.getElementById('contactFormThermId').value+"&subject="+subject;
	request = new Http(
		"contact.php",
		null,
		'POST',
		postVars,
		['Content-Type', 'application/x-www-form-urlencoded']
	);
	request.onreadyst = function()
	{
		if (requestQue.List[0].req.readyState == 4)
		{
			if (requestQue.List[0].req.status == 200)
			{
				hurra_alert("Vielen Dank für Ihre Anfrage!","Ihre Nachricht wurde erfolgreich übermittelt","");
				hurra_unlockPage_firstLevel();
				requestQue.requExecuted();
			}
			else
			{
				requestQue.requExecuted();
			}
		}
	}
	requestQue.add(request);
}
// Hotel
function contactForm_hotel()
{
	var html = '';
	html += '<div class="lightWindowForm_Container">';
	html += '<h1>Ihre Anfrage</h1>';
	html += '<span class="size_10_italic">(* Pflichtfelder)</span><br>';
	if(FrontendUser.isLoggedIn == 1)
	{
		html += '<div class="input_container">Name*:<input id="contactFormName" type="text" value="'+FrontendUser.firstname+' '+FrontendUser.lastname+'" /></div>';
		html += '<div class="input_container">Email*:<input id="contactFormEmail" type="text" value="'+FrontendUser.email+'" /></div>';
	}
	else
	{
		html += '<div class="input_container">Name*:<input id="contactFormName" type="text" /></div>';
		html += '<div class="input_container">Email*:<input id="contactFormEmail" type="text" /></div>';
	}
	html += '<div class="input_container">Ihre Nachricht*:</div>';
	html += '<textarea id="contactFormMessage"></textarea><input type="hidden" id="contactFormHotelId" value="'+this.childNodes[0].innerHTML+'" /><input type="hidden" id="contactFormSubject" value="'+this.childNodes[1].innerHTML+'" />';
	html += '<br /><a class="button_inline_11" onclick="contact_hotel_submit()" href="javascript:void(empty())">Anfrage absenden</a><br />';
	html += '<br><span class="italic_11">Bei Buchungsanfragen bitte vollständige Kontaktdaten (Ort, Straße, Telefonnummer) in das Feld schreiben! Vielen Dank!</span>';
	html += '</div>';
	hurra_create_2ndWindow(290,html);
}
function contact_hotel_submit()
{
	var errorReport = "";
	var nameV = document.getElementById('contactFormName').value;
	if(!hurra_check_length(nameV, 2))
	{
		errorReport += "Bitte füllen Sie das Feld Name aus!<br />";
	}
	var emailV = document.getElementById('contactFormEmail').value;
	if(!hurra_check_length(emailV, 2))
	{
		errorReport += "Bitte füllen Sie das Feld Email aus!<br />";
	}
	else if(!hurra_check_mail(emailV))
	{
		errorReport += "Bitte füllen Sie das Feld Email korrekt aus!<br />";
	}
	var messageV = document.getElementById('contactFormMessage').value;
	if(!hurra_check_length(messageV, 2))
	{
		errorReport += "Bitte füllen Sie das Feld Nachricht aus!<br />";
	}
	if(errorReport.length>0)
	{
		hurra_alert('Fehler!',errorReport, '');
		return false;
	}	
	var subject = document.getElementById('contactFormSubject').value;
	postVars = "pass="+hk+"&name="+nameV+"&email="+emailV+"&message="+messageV+"&hotelId="+document.getElementById('contactFormHotelId').value+"&subject="+subject;
	request = new Http(
		"contact.php",
		null,
		'POST',
		postVars,
		['Content-Type', 'application/x-www-form-urlencoded']
	);
	request.onreadyst = function()
	{
		if (requestQue.List[0].req.readyState == 4)
		{
			if (requestQue.List[0].req.status == 200)
			{
				hurra_alert("Vielen Dank für Ihre Anfrage!","Ihre Nachricht wurde erfolgreich übermittelt","");
				hurra_unlockPage_firstLevel();
				requestQue.requExecuted();
			}
			else
			{
				requestQue.requExecuted();
			}
		}
	}
	requestQue.add(request);
}
// Ende //

/**
* Bewertung
**/
function eval_cont_1()
{
	if(check_eval1().length > 0)
	{
		hurra_alert('Fehler!',check_eval1(), '');
		return false;
	}
	this.parentNode.nextSibling.style.display = "block";
	this.parentNode.nextSibling.firstChild.show_hide_subContent = show_hide_subContent;
	this.parentNode.nextSibling.firstChild.show_hide_subContent();
}
function check_eval1()
{
	var error = '';
	var title = document.getElementById('title').value;
	if(!hurra_check_length(title,10))
	{
		error += 'Bitte füllen Sie das Feld <strong>"Titel der Bewertung"</strong>mit mindestens 10 Zeichen aus<br/>';	
	}
	var bewerterName = document.getElementById('bewerterName').value;
	if(!hurra_check_length(bewerterName,3))
	{
		error += 'Bitte füllen Sie das Feld <strong>"Ihr Name"</strong> aus<br/>';	
	}
	return error;
}
function eval_cont_2()
{
	this.parentNode.nextSibling.style.display = "block";
	this.parentNode.nextSibling.firstChild.show_hide_subContent = show_hide_subContent;
	this.parentNode.nextSibling.firstChild.show_hide_subContent();
}
function eval_cont_3()
{
	if(check_eval3().length > 0)
	{
		hurra_alert('Fehler!',check_eval3(), '');
		return false;
	}
	this.parentNode.nextSibling.style.display = "block";
	this.parentNode.nextSibling.firstChild.show_hide_subContent = show_hide_subContent;
	this.parentNode.nextSibling.firstChild.show_hide_subContent();
}
/**
* Pflichtfelderüberprüfung von Ansicht 3 (Thermendetails)
**/
function check_eval3()
{
	var error = '';
	var vielfaltPoollandschaft = document.getElementById('vielfaltPoollandschaft').value;
	if(vielfaltPoollandschaft < 0)
	{
		error += 'Bitte vergeben Sie Tropfen für das Feld <strong>"Vielfalt Poollandschaft:"</strong><br/>';
	}
	var zustandPoollandschaft = document.getElementById('zustandPoollandschaft').value;
	if(zustandPoollandschaft < 0)
	{
		error += 'Bitte vergeben Sie Tropfen für das Feld <strong>"Zustand Poollandschaft:"</strong><br/>';
	}
	var vielfaltSaunaLandschaft = document.getElementById('vielfaltSaunaLandschaft').value;
//	if(vielfaltSaunaLandschaft < 0)
//	{
//		error += 'Bitte vergeben Sie Tropfen für das Feld <strong>"Vielfalt Saunalandschaft:"</strong><br/>';
//	}
	var zustandSaunalandschaft = document.getElementById('zustandSaunalandschaft').value;
//	if(zustandSaunalandschaft < 0)
//	{
//		error += 'Bitte vergeben Sie Tropfen für das Feld <strong>"Zustand Saunalandschaft:"</strong><br/>';
//	}
	var ruhezonen = document.getElementById('ruhezonen').value;
	if(ruhezonen < 0)
	{
		error += 'Bitte vergeben Sie Tropfen für das Feld <strong>"Ruhezonen:"</strong><br/>';
	}
	var gastroPreisLeistung = document.getElementById('gastroPreisLeistung').value;
	if(gastroPreisLeistung < 0)
	{
		error += 'Bitte vergeben Sie Tropfen für das Feld <strong>"Preis-Leistungs-Verhältnis der Gastronomie:"</strong><br/>';
	}
	return error;
}
/**
* Pflichtfelderüberprüfung von Ansicht 4 (Thermengesamteindruck
**/
function check_eval4()
{
	var error = '';
	var thermensauberkeit = document.getElementById('thermensauberkeit').value;
	if(thermensauberkeit < 0)
	{
		error += 'Bitte vergeben Sie Tropfen für das Feld <strong>"Thermensauberkeit:"</strong><br/>';
	}
	var thermengesamtzustand = document.getElementById('thermengesamtzustand').value;
	if(thermengesamtzustand < 0)
	{
		error += 'Bitte vergeben Sie Tropfen für das Feld <strong>"Thermengesamtzustand:"</strong><br/>';
	}
	var mitarbeiterfreundlichkeit = document.getElementById('mitarbeiterfreundlichkeit').value;
	if(mitarbeiterfreundlichkeit < 0)
	{
		error += 'Bitte vergeben Sie Tropfen für das Feld <strong>"Mitarbeiterfreundlichkeit:"</strong><br/>';
	}
	var thermePreisLeistung = document.getElementById('thermePreisLeistung').value;
	if(thermePreisLeistung < 0)
	{
		error += 'Bitte vergeben Sie Tropfen für das Feld <strong>"Preis-Leistungs-Verhältnis der Therme:"</strong><br/>';
	}
	return error;
}

function clear_eval_bg(obj)
{
	if(obj.value == obj.name)
	{
		return'';	
	}
	return obj.value;
}
function eval_submit()
{
	if(check_eval1().length > 0 || check_eval3().length > 0 || check_eval4().length > 0)
	{
		hurra_alert('Fehler!',check_eval1()+check_eval3()+check_eval4(), '');
		return false;
	}
	var obj = new Object;
	obj.title = document.getElementById('title').value;
	obj.bewerterName = document.getElementById('bewerterName').value;
	obj.bewerterEmail = document.getElementById('bewerterEmail').value;
	obj.bewerterAlter = document.getElementById('bewerterAlter').value;
	obj.verreistAls = document.getElementById('verreistAls').value;
	obj.aufenthaltsdauer = document.getElementById('aufenthaltsdauer').value;
	obj.kat_familieFun = document.getElementById('kat_familieFun').value;
	obj.kat_romantik = document.getElementById('kat_romantik').value;
	obj.kat_beautyWellness = document.getElementById('kat_beautyWellness').value;
	obj.kat_gesundheitKur = document.getElementById('kat_gesundheitKur').value;
	obj.kat_relax = document.getElementById('kat_relax').value;
	obj.vielfaltPoollandschaft = document.getElementById('vielfaltPoollandschaft').value;
	obj.bgVielfaltPoollandschaft =  clear_eval_bg(document.getElementById('bgVielfaltPoollandschaft'));
	obj.zustandPoollandschaft = document.getElementById('zustandPoollandschaft').value;
	obj.bgZustandPoollandschaft =  clear_eval_bg(document.getElementById('bgZustandPoollandschaft'));
	obj.vielfaltSaunaLandschaft = document.getElementById('vielfaltSaunaLandschaft').value;
	obj.bgVielfaltSaunaLandschaft =  clear_eval_bg(document.getElementById('bgVielfaltSaunaLandschaft'));
	obj.zustandSaunalandschaft = document.getElementById('zustandSaunalandschaft').value;
	obj.bgZustandSaunalandschaft = clear_eval_bg(document.getElementById('bgZustandSaunalandschaft'));
	obj.ruhezonen = document.getElementById('ruhezonen').value;
	obj.bgRuhezonen = clear_eval_bg(document.getElementById('bgRuhezonen'));
	obj.gastroPreisLeistung = document.getElementById('gastroPreisLeistung').value;
	obj.bgGastroPreisLeistung = clear_eval_bg(document.getElementById('bgGastroPreisLeistung'));
	obj.thermensauberkeit = document.getElementById('thermensauberkeit').value;
	obj.bgThermensauberkeit = clear_eval_bg(document.getElementById('bgThermensauberkeit'));
	obj.thermengesamtzustand = document.getElementById('thermengesamtzustand').value;
	obj.bgThermengesamtzustand = clear_eval_bg(document.getElementById('bgThermengesamtzustand'));
	obj.mitarbeiterfreundlichkeit = document.getElementById('mitarbeiterfreundlichkeit').value;
	obj.bgMitarbeiterfreundlichkeit = clear_eval_bg(document.getElementById('bgMitarbeiterfreundlichkeit'));
	obj.thermePreisLeistung = document.getElementById('thermePreisLeistung').value;
	obj.bgThermePreisLeistung = clear_eval_bg(document.getElementById('bgThermePreisLeistung'));
	obj.meineEmpfehlung = document.getElementById('meineEmpfehlung').value;	
	obj.thermenId = document.getElementById('thermenId').value;	
	
	postVars = "pass="+hk+"&title="+obj.title+"&bewerterName="+obj.bewerterName+"&bewerterEmail="+obj.bewerterEmail+"&bewerterAlter="+obj.bewerterAlter+"&verreistAls="+obj.verreistAls+"&aufenthaltsdauer="+obj.aufenthaltsdauer+"&kat_familieFun="+obj.kat_familieFun+"&kat_romantik="+obj.kat_romantik+"&kat_beautyWellness="+obj.kat_beautyWellness+"&kat_gesundheitKur="+obj.kat_gesundheitKur+"&kat_relax="+obj.kat_relax+"&vielfaltPoollandschaft="+obj.vielfaltPoollandschaft+"&bgVielfaltPoollandschaft="+obj.bgVielfaltPoollandschaft+"&zustandPoollandschaft="+obj.zustandPoollandschaft+"&bgZustandPoollandschaft="+obj.bgZustandPoollandschaft+"&vielfaltSaunaLandschaft="+obj.vielfaltSaunaLandschaft+"&bgVielfaltSaunaLandschaft="+obj.bgVielfaltSaunaLandschaft+"&zustandSaunalandschaft="+obj.zustandSaunalandschaft+"&bgZustandSaunalandschaft="+obj.bgZustandSaunalandschaft+"&ruhezonen="+obj.ruhezonen+"&bgRuhezonen="+obj.bgRuhezonen+"&gastroPreisLeistung="+obj.gastroPreisLeistung+"&bgGastroPreisLeistung="+obj.bgGastroPreisLeistung+"&thermensauberkeit="+obj.thermensauberkeit+"&bgThermensauberkeit="+obj.bgThermensauberkeit+"&thermengesamtzustand="+obj.thermengesamtzustand+"&bgThermengesamtzustand="+obj.bgThermengesamtzustand+"&mitarbeiterfreundlichkeit="+obj.mitarbeiterfreundlichkeit+"&bgMitarbeiterfreundlichkeit="+obj.bgMitarbeiterfreundlichkeit+"&thermePreisLeistung="+obj.thermePreisLeistung+"&bgThermePreisLeistung="+obj.bgThermePreisLeistung+"&meineEmpfehlung="+obj.meineEmpfehlung+"&thermenId="+obj.thermenId;
	request = new Http(
		"module/content/static/evaluation/ajax.php",
		null,
		'POST',
		postVars,
		['Content-Type', 'application/x-www-form-urlencoded']
	);
	request.onreadyst = function()
	{
		if (requestQue.List[0].req.readyState == 4)
		{
			if (requestQue.List[0].req.status == 200)
			{
				FrontendUser.lastEvalId = requestQue.List[0].req.responseText;
				//my_alert("Vielen Dank für Ihre Anfrage", "Wir werden uns umgehend um Ihre Anliegen bemühen", "");
				var html = '<strong class="green">Vielen Dank für Ihr Bewertung!</strong><br>Nach einem redaktionellen Check, wird Ihre Bewertung freigeschalten.'
				document.getElementById('evaluationThermContainer').innerHTML = html;
				if(FrontendUser.isLoggedIn == 1)
				{
					hurra_confirm('Vielen Dank für Ihre Bewertung', 'Wollen Sie zu Ihrer Bewertung noch Fotos hinzufügen?', 'openUploadEvalPicWindow();', '');
				}
				else
				{
					document.getElementById('evaluationThermContainer').innerHTML += '<br /><br />Um auch Fotos zu Ihren Bewertungen hochladen zu können <a href="javascript:void(myTC_show_rgister())">registrieren sie sich bitte bei der meinTC - Community!</a>'
				}
				requestQue.requExecuted();
			}
			else
			{
				alert(error);
				requestQue.requExecuted();
			}
		}
	}
	requestQue.add(request);
}
/**
* Fotos zur Bewertung hochladen
**/
function openUploadEvalPicWindow()
{
	var html = '<div class="generalTitle" style="padding-left:10px">&nbsp;</div>';
	html += '<div style="poisition:relative; padding:0 14px 14px 14px;">';
	html += '<h1>Foto Upload</h1>';
	html += 'Sie können bis zu 5 Fotos mit insgesamt 10MB zu Ihrer Bewertung hochladen.<br />';
	html += '</div>';
	html += '<div style="poisition:relative; padding:0 14px 14px 14px; height:260px">';
	Set_AC_FL_RunContent_GET('?evalId='+FrontendUser.lastEvalId+'&userId='+FrontendUser.userId);
	html += AC_FL_RunContent( "codebase","http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0","width","396","height","260","src","flash/fileUpload","quality","high","pluginspage","http://www.macromedia.com/go/getflashplayer","movie","flash/fileUpload", "wmode", "transparent" );
	Set_AC_FL_RunContent_GET('');
	html += '</div>';
	html += '<div style="poisition:relative; padding:0 14px 14px 14px;">';
	html += '<span class="grey10">Fotos dürfen keine Nacktheit, gewalttätiges oder anstößiges Material oder urheberrechtlich geschützte Darstellungen enthalten. Wenn du gegen diese Bedingungen verstößt, wird dein Account gelöscht.</span>';
	html += '</div>';
	hurra_create_2ndWindow(424,html);
}
function onCompleteUploadEvalPic()
{
	hurra_unlockPage();
	hurra_unlockPage_firstLevel();
	hurra_alert('Vielen Dank für Ihre Fotos!', 'Nach einem redaktionellen Check, werden Ihre Fotos freigeschalten.', '');	
}
/**
* Hilfsfunktionen zum ausfüllen des Bewertungsformulars
**/
function textarea_focus()
{
	if(this.name == this.value)
	{
		this.value = "";	
	}
	this.style.color = "#3d3d3d";
	this.style.fontSize = "12px";
}
function textarea_blur()
{
	if(this.name == this.value || this.value == "")
	{
		this.style.color = "#A0A0A0";
		this.style.fontSize = "11px";
		this.value = this.name;
	}
}
function check_select_tropfen()
{
	this.firstChild.value = '-1';
	this.childNodes[1].src = 'pix/bttn/check_selected.gif';
	setTropfen(this.parentNode.firstChild,-1);
}
function click_tropfen()
{
		var id = this.className.split('_');
		id = id[id.length-1];
		setTropfen(this.parentNode, id);
}
function setTropfen(obj, num)
{
	for(var i = 1; i < obj.childNodes.length -1; i++)
	{
		var id = obj.childNodes[i].className.split('_');
		id = id[id.length-1];
		if(id <= num)
		{
			obj.childNodes[i].src = 'pix/tropfen/10_w.gif';
		}
		else
		{
			obj.childNodes[i].src = 'pix/tropfen/00_w.gif';
		}
	}
	obj.nextSibling.firstChild.value = num;
	if(num >= 0)
	{
		obj.nextSibling.childNodes[1].src = 'pix/bttn/check_unselected.gif';
	}
	else
	{
		obj.nextSibling.childNodes[1].src = 'pix/bttn/check_selected.gif';
	}
}
//function check_select()
//{
//	if(this.childNodes[1].src.toLowerCase().indexOf('pix/bttn/check_unselected.gif')>-1)
//	{
//		this.firstChild.value = '1';
//		this.childNodes[1].src = 'pix/bttn/check_selected.gif';
//	}
//	else
//	{
//		this.firstChild.value = '0';
//		this.childNodes[1].src = 'pix/bttn/check_unselected.gif';
//	}
//}
//function radio_select()
//{
//	for(var i = 1; i < this.parentNode.childNodes.length; i++)
//	{
//		this.parentNode.childNodes[i].firstChild.src = 'pix/bttn/radio_unselect.gif';
//	}
//	this.firstChild.src = 'pix/bttn/radio_selected.gif';
//	this.parentNode.firstChild.value = this.firstChild.name;
//}

////
// Funktionen für die 2te Inhaltsebene
////
var Hurra2ndWindow = null;
function hurra_create_2ndWindow(width, html)
{
	hurra_lockPage_firstLevel();
	var pageSize = hurra_getPageSize();
	var pageScroll = hurra_getPageScroll();
	
	Hurra2ndWindow  = document.createElement('div');
	Hurra2ndWindow.id = 'hurra2ndWindow';
	document.body.appendChild(Hurra2ndWindow);
	Hurra2ndWindow.innerHTML =
	'<div id="hurra2ndWindow_contentContainer">'+html+'</div>'
	+'<div onmouseover="this.style.textDecoration = \'none\'" onmouseout="this.style.textDecoration = \'\'" class="close_hurra2ndWindow" onclick="hurra_unlockPage_firstLevel()">schließen</div>';
	Hurra2ndWindow.style.width = width + 'px';
	Hurra2ndWindow.style.top = (pageScroll.yScroll + (pageSize.windowHeight - Hurra2ndWindow.offsetHeight) / 2) + 'px';
	Hurra2ndWindow.style.left = ((pageSize.pageWidth - Hurra2ndWindow.offsetWidth) / 2) + 'px';
	//Hinzufügen zu den zu schließenden Elementen
	HurraLockPageFirstLevelChilds[HurraLockPageFirstLevelChilds.length] = Hurra2ndWindow;
}

var HurraLockPageFirstLevelChilds = new Array();

var HurraLockPageFirstLevelOpacity = 90;
var HurraLockPageFirstLevel = null;
function hurra_lockPage_firstLevel()
{
	var pageSize = hurra_getPageSize();
	HurraLockPageFirstLevel = document.createElement('div');
	HurraLockPageFirstLevel.id = 'page_lock_firstLevel';
	HurraLockPageFirstLevel.style.display = 'block';
	document.body.appendChild(HurraLockPageFirstLevel);
	HurraLockPageFirstLevel.style.filter = 'alpha(opacity='+HurraLockPageFirstLevelOpacity +')';
	HurraLockPageFirstLevel.style.opacity = HurraLockPageFirstLevelOpacity/100;
	HurraLockPageFirstLevel.style.height = pageSize.pageHeight + 'px';
	HurraLockPageFirstLevel.style.width = '100%';
	hurra_addEvent(HurraLockPageFirstLevel,'click',hurra_unlockPage_firstLevel);
}
function hurra_lockPage_firstLevel_fix()
{
	var pageSize = hurra_getPageSize();
	HurraLockPageFirstLevel = document.createElement('div');
	HurraLockPageFirstLevel.id = 'page_lock_firstLevel';
	HurraLockPageFirstLevel.style.display = 'block';
	document.body.appendChild(HurraLockPageFirstLevel);
	HurraLockPageFirstLevel.style.filter = 'alpha(opacity='+HurraLockPageFirstLevelOpacity +')';
	HurraLockPageFirstLevel.style.opacity = HurraLockPageFirstLevelOpacity/100;
	HurraLockPageFirstLevel.style.height = pageSize.pageHeight + 'px';
	HurraLockPageFirstLevel.style.width = '100%';
}
function hurra_unlockPage_firstLevel()
{
	try
	{
		hurra_removeNode(HurraLockPageFirstLevel);
		HurraLockPageFirstLevel = null;
		for(var i = 0; i < HurraLockPageFirstLevelChilds.length; i++)
		{
			hurra_removeNode(HurraLockPageFirstLevelChilds[i]);
		}
		HurraLockPageFirstLevelChilds = new Array();
		
		//Zum abfangen von Fehlern beim Community Window
		myTC_communityWindowIsOpen = false;
		//requestQue.requExecuted();
	}
	catch(e){}
}

var GuideLoader = false;
function show_aquarius_loader()
{
	hurra_lockPage_firstLevel_fix();
	var pageSize = hurra_getPageSize();
	var pageScroll = hurra_getPageScroll();
	GuideLoader  = document.createElement('div');
	GuideLoader.id = 'GuideLoader';
	document.body.appendChild(GuideLoader);
		
	GuideLoader.style.position = 'absolute';
	GuideLoader.style.width = '250px';
	GuideLoader.style.height = '250px';
	GuideLoader.style.top = (pageScroll.yScroll + (pageSize.windowHeight - 250) / 2) + 'px';
	GuideLoader.style.left = ((pageSize.pageWidth - 250) / 2) + 'px';

	Set_AC_FL_RunContent_GET('');
	GuideLoader.innerHTML = AC_FL_RunContent( "codebase","http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0","width","250","height","250","src","flash/guide_loader","quality","high","pluginspage","http://www.macromedia.com/go/getflashplayer","movie","flash/guide_loader", "wmode", "transparent" );
	Set_AC_FL_RunContent_GET('');
	
	HurraLockPageFirstLevelChilds[HurraLockPageFirstLevelChilds.length] = GuideLoader;
}
function hide_aquarius_loader()
{
	hurra_unlockPage_firstLevel()
}
// Ende //

////
// Hilfsklassen
////
var ImgPrevObj = false;
function show_imgPrev(src,width,height,callingImg)
{
	if(ImgPrevObj === false)
	{
		ImgPrevObj = new ImgPrev();	
	}
	ImgPrevObj.construct(src,width,height,callingImg);
}
function hide_imgPrev()
{
	try
	{
		ImgPrevObj.destruct();
	}catch(e){null;}
}
function ImgPrev()
{
	this.id = 'ImgPriv_Container';
	this.callingImg;
	this.src;
	this.top;
	this.left;
	this.bottom;
	this.right;
	this.Shaddow = null;
	this.Container = null;
	
	this.construct = function(src,width,height,callingImg)
	{
		this.callingImg = callingImg;
		this.src = src;
		var pos = hurra_return_absolute_pos(this.callingImg);
		this.top = pos.top+this.callingImg.offsetHeight;
		this.left = pos.left+this.callingImg.offsetWidth;
		this.bottom = document.body.offsetHeight - pos.top;
		this.right = document.body.offsetWidth -pos.left;
		this.createContent(width,height);
	}
	this.createContent = function(width,height)
	{
		this.Container = document.createElement('div');
		this.Container.style.visibility = "hidden";
		this.Container.className = 'infoContainer';
		this.Container.id = this.id;
		var bodyOffsetWidth = document.body.offsetWidth;
		var bodyOffsetHeight = document.body.offsetHeight;
		var availWidth = 300;
		var availHeight  = 300;
		if(availWidth < width)
		{
			height = Math.round(height - (height*(((width - availWidth)/(width/100))/100)));
			width = availWidth;
		}
		if(availHeight < height)
		{
			width = Math.round(width - (width*(((height - availHeight)/(height/100))/100)));
			height = availHeight;
		}
		this.Container.innerHTML = '<img style="width:'+width+'px; height:'+height+'px; display:block" src="'+this.src+'" />';
		this.Shaddow = document.createElement('div');
		document.body.appendChild(this.Shaddow);
		document.body.appendChild(this.Container);
		if((this.left+this.Container.offsetWidth) < bodyOffsetWidth)
		{
			this.Container.style.left = this.left+'px';
			this.Shaddow.style.left = (this.left+3)+"px";
		}
		else
		{
			this.Container.style.right = this.right+'px';	
			this.Shaddow.style.right = (this.right-3)+"px";
		}
		if((this.top + this.Container.offsetHeight) < bodyOffsetHeight)
		{
			this.Container.style.top = this.top+'px';
			this.Shaddow.style.top = (this.top+3)+'px';
		}
		else
		{
			this.Container.style.bottom = this.bottom+'px';
			this.Shaddow.style.bottom = (this.bottom-3)+'px';
		}
		this.Shaddow.style.position = 'absolute';
		this.Shaddow.style.height = this.Container.offsetHeight+'px';
		this.Shaddow.style.width = this.Container.offsetWidth+'px';
		this.Shaddow.style.filter = 'alpha(opacity=30)';
		this.Shaddow.style.opacity = 0.3;
		this.Shaddow.style.backgroundColor = '#000000';
		
		this.Container.style.visibility = "visible";
	}
	this.destruct = function()
	{
		document.body.removeChild(this.Container);
		document.body.removeChild(this.Shaddow);
		this.top = null;
		this.left = null;
		this.Shaddow = null;
		this.Container = false;
		this.callingImg = null;
	}
}

// Body klick quicksearch, autocomplete hide
function body_click()
{
	try{quicksearch_hide(false);}catch(e){}
	try{autocomplete_hide(false);}catch(e){}
}
function onfocus_clear()
{
	if(this.value == this.name)
	{
		this.value = '';
	}
}
function onblur_reset()
{
	if(this.value == "")
	{
		this.value = this.name;
	}
}

//Serialisieren
function serialize(mixed_value)
{
    // http://kevin.vanzonneveld.net
    // +   original by: Arpad Ray (mailto:arpad@php.net)
    // +   improved by: Dino
    // +   bugfixed by: Andrej Pavlovic
    // +   bugfixed by: Garagoth
    // +      input by: DtTvB (http://dt.in.th/2008-09-16.string-length-in-bytes.html)
    // +   bugfixed by: Russell Walker
    // %          note: We feel the main purpose of this function should be to ease the transport of data between php & js
    // %          note: Aiming for PHP-compatibility, we have to translate objects to arrays
    // *     example 1: serialize(['Kevin', 'van', 'Zonneveld']);
    // *     returns 1: 'a:3:{i:0;s:5:"Kevin";i:1;s:3:"van";i:2;s:9:"Zonneveld";}'
    // *     example 2: serialize({firstName: 'Kevin', midName: 'van', surName: 'Zonneveld'});
    // *     returns 2: 'a:3:{s:9:"firstName";s:5:"Kevin";s:7:"midName";s:3:"van";s:7:"surName";s:9:"Zonneveld";}'
 
    var _getType = function( inp ) {
        var type = typeof inp, match;
        var key;
        if (type == 'object' && !inp) {
            return 'null';
        }
        if (type == "object") {
            if (!inp.constructor) {
                return 'object';
            }
            var cons = inp.constructor.toString();
            match = cons.match(/(\w+)\(/);
            if (match) {
                cons = match[1].toLowerCase();
            }
            var types = ["boolean", "number", "string", "array"];
            for (key in types) {
                if (cons == types[key]) {
                    type = types[key];
                    break;
                }
            }
        }
        return type;
    };
    var type = _getType(mixed_value);
    var val, ktype = '';
    
    switch (type) {
        case "function": 
            val = ""; 
            break;
        case "undefined":
            val = "N";
            break;
        case "boolean":
            val = "b:" + (mixed_value ? "1" : "0");
            break;
        case "number":
            val = (Math.round(mixed_value) == mixed_value ? "i" : "d") + ":" + mixed_value;
            break;
        case "string":
            val = "s:" + encodeURIComponent(mixed_value).replace(/%../g, 'x').length + ":\"" + mixed_value + "\"";
            break;
        case "array":
        case "object":
            val = "a";
            /*
            if (type == "object") {
                var objname = mixed_value.constructor.toString().match(/(\w+)\(\)/);
                if (objname == undefined) {
                    return;
                }
                objname[1] = serialize(objname[1]);
                val = "O" + objname[1].substring(1, objname[1].length - 1);
            }
            */
            var count = 0;
            var vals = "";
            var okey;
            var key;
            for (key in mixed_value) {
                ktype = _getType(mixed_value[key]);
                if (ktype == "function") { 
                    continue; 
                }
                
                okey = (key.match(/^[0-9]+$/) ? parseInt(key, 10) : key);
                vals += serialize(okey) +
                        serialize(mixed_value[key]);
                count++;
            }
            val += ":" + count + ":{" + vals + "}";
            break;
    }
    if (type != "object" && type != "array") {
        val += ";";
    }
    return val;
}
// Checkbox
function doCheckBox(obj)
{
	if(obj.childNodes[1].src.toLowerCase().indexOf('pix/bttn/check_unselected.gif')>-1)
	{
		obj.firstChild.value = obj.childNodes[1].name;
		obj.childNodes[1].src = 'pix/bttn/check_selected.gif';
	}
	else
	{
		obj.firstChild.value = '';
		obj.childNodes[1].src = 'pix/bttn/check_unselected.gif';
	}
}

function empty()
{
	return false;	
}
// Ende //

