//#############################################################
//Slide Promotion
//#############################################################

function showFormPopup(){
	openPopup('divPopupAnfrage', 1);
}

function hideFormPopup(){
	openPopup('divPopupAnfrage', 0);
	hideFormElement();
}

function showStatusPopup(){
	openPopup('divPopupStatusinfo', 1);
}

function hideStatusPopup(){
	openPopup('divPopupStatusinfo', 0);
}

function openPopup(elementid, openvalue){
	obj1=document.getElementById(elementid);
		
	if(obj1){
		if(openvalue == 1){
			obj1.style.visibility='visible';
		} else {
			obj1.style.visibility='hidden';
		}	
	}
}


//#############################################################
//Fit Window
//#############################################################

function fitWindow()	{
	var absolutehoehe=(document.body.clientHeight)
	if(absolutehoehe<750) {absolutehoehe=750};
	document.getElementById('divInhalte').style.height=absolutehoehe + 'px';
	
	jacuzzi = document.getElementById('divHGJacuzzi');
	if(jacuzzi) {
		jacuzzi.style.height = absolutehoehe-111 + 'px';		
		document.getElementById('divText').style.height = absolutehoehe-135 + 'px';
		//alert(document.getElementById('divText').clientHeight);
	}
		
}

//#############################################################
//Formularfunktionen
//#############################################################
   
function viewFormElement(elementid, status) {
	elm=document.getElementById(elementid);
	if(elm) {
		if(status==1) {
			elm.style.visibility='visible';
			elm.style.height='auto';
		} else {
			elm.style.visibility='hidden';
			elm.style.height='0px';
		}
	}
}

function hideFormElement() {
	elm1=document.getElementById('terminvereinbarung');
	elm2=document.getElementById('beratungsgespraech');
	elm3=document.getElementById('allgemeineanfrage');
	if(elm1) {
		elm1.style.visibility='hidden';
		elm1.style.height='0px';
	}
	if(elm2) {
		elm2.style.visibility='hidden';
		elm2.style.height='0px';
	}
	if(elm3) {
		elm3.style.visibility='hidden';
		elm3.style.height='0px';
	}

}
