
      function PopUp()
      {
          var URL = "agb.html";
          var Name = "popup";
          var Fensteroptionen = "toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=0";
          var Breite = 650;
          var Hoehe = 600;
          window.open(URL, 'Name', Fensteroptionen + ',width=' + Breite + ',height=' + Hoehe);
      }

		function showContainer(e) {

			var select = Event.element(e);
			if (select.checked) {
				$(select.name + '_container').style.display = 'block';
			} else {
				$(select.name + '_container').style.display = 'none';			
			}
		}

		function showOnSelected(observe) {
			Event.observe(document.getElementsByName(observe)[0], 'change', showContainer);
			Event.observe(document.getElementsByName(observe)[0], 'click', showContainer);
		}

		function getPrice(e) {
			//alert(new Form.serialize('form_step_1'));
			var pars = Form.serialize('form_step_1');
		
			var myAjax = new Ajax.Updater(
				'price_value', 
				'kalkulator.php?action=price', 
				{
					method: 'post', 
					parameters: pars
				});
		}

		/*function checkPLZResponse(response) {

			if (response.responseText == 0) {
				alert('Ihre Postleitzahl liegt nicht in unserem Auftragsgebiet!');
				document.getElementsByName('objekt_plz')[0].value = '';
			}
	
		}*/

		function checkPLZ() {
			var pars = 'objekt_plz=' + document.getElementsByName('objekt_plz')[0].value;

			var myAjax = new Ajax.Request(
				'kalkulator.php?action=plz', 
				{
					method: 'get', 
					parameters: pars,
					onComplete: checkPLZResponse
			});
		}
		
		function showPriceType(e) {
			var kundentypen = document.getElementsByName('kundentype');
			var active;
			for (var i = 0; i < kundentypen.length; i++) {
				if (kundentypen[i].checked == true) {
					//alert(kundentypen[i].value);
					active = kundentypen[i].value
				}
			}
		

			var text = '';

			if (active == 1) {
				text = 'Unser Festpreis für Sie inkl. Mwst.';
			} else {
				text = 'Unser Festpreis für Sie zzgl. Mwst.';			
			}
			//alert(text);
			$('price_type').innerHTML = text;
		}
		
		function toogleInfo(e, visible) {
			if (visible == 1) {
				e.parentNode.firstChild.style.display = 'block';
			} else {
				e.parentNode.firstChild.style.display = 'none';			
			}
		}
		
		function showInfo(element, html, width, height) {
			if (width == undefined) {
				var width = 200;
			}

			if (height == undefined) {
				var height = 200;
			}
		
			var block = '<div class="help" style="float: right; z-index: 100; height: 20px; width: 20px;">';
				block += '<div onmouseout="toogleInfo(this,0)" style="display: none; z-index: 1000; position: absolute; border: 1px solid green; top: -1px; left: ' + ((width + 3) * -1) + 'px; height: ' + height + 'px; width: ' + width + 'px;" class="help_container">' + html + '</div>';
				block += '<span onmouseover="this.style.cursor = \'pointer\'" style="display: block; z-index: 100; width: 20px; height: 20px;" onclick="toogleInfo(this,1)">i</a>';
				block + '</div>';

			new Insertion.Before(element, block);
		}