	function SetPraemie(praemid,url) {
			userCookie.put("praemie_nummer", praemid);
			userCookie.write();

			window.location.href = url;
	}

 	function GetPraemie(praemid,aboid) {
   			praemienwindow = window.open("index.php?view=praemdetail&praemid=" + praemid, "Praemienfenster", "height=1024,width=700,location=no,menubar=no,resizable=no,status=no,toolbar=no");
	}


	function initPrice() {

		var the_form = window.document.forms[0];
		var bundesland;
		if (document.getElementById('bundesland')) bundesland = document.getElementById('bundesland').selectedIndex;
		if(document.getElementById('preis').value == 'Berlin-Brandenburg') {
			document.getElementById('preis').value = "Berlin-Brandenburg";
			document.getElementById('endpreis').value = document.getElementById('abocost_berlin').innerHTML;
			document.getElementById('abocost_deutschland').style.visibility = 'hidden';
			document.getElementById('abocost_deutschland').style.height = "1px";
			document.getElementById('abocost_berlin').style.visibility = 'visible';
			document.getElementById('abocost_berlin').style.height = "auto";
			for(var i=0; i<the_form.length; i++) {
				if( the_form.elements[i].type == "radio" && the_form.elements[i].checked == true && the_form.elements[i].name == "zahlungsweise") document.getElementById('abocost_berlin').innerHTML = the_form.elements[i].value;
			}
		} else if (document.getElementById('preis').value == 'au?erhalb Berlin-Brandenburg') {
			document.getElementById('preis').value = "au?erhalb Berlin-Brandenburg";
			document.getElementById('endpreis').value = document.getElementById('abocost_deutschland').innerHTML;
			document.getElementById('abocost_deutschland').style.visibility = 'visible';
			document.getElementById('abocost_deutschland').style.height = "auto";	
			document.getElementById('abocost_berlin').style.visibility = 'hidden';	
			document.getElementById('abocost_berlin').style.height = "1px";
			for(var i=0; i<the_form.length; i++) {
				if( the_form.elements[i].type == "radio" && the_form.elements[i].checked == true && the_form.elements[i].name == "zahlungsweise") document.getElementById('abocost_deutschland').innerHTML = the_form.elements[i].value;
			}
		}



	}
	
/*	
	function updatePrice(value) {

		if(document.getElementById('preis').value == 'Berlin-Brandenburg' || document.getElementById('preis').value == '') {
			if(!document.all) {
				document.getElementById('abocost_berlin').innerHTML = value;
				document.getElementById('endpreis').value = value;	
			} else {
				document.all('abocost_berlin').innerHTML = value;
				document.all('endpreis').value = value;
			}
		} else if (document.getElementById('preis').value == 'au?erhalb Berlin-Brandenburg') {

			if(!document.all) {
				document.getElementById('abocost_deutschland').innerHTML = value;
				document.getElementById('endpreis').value = value;
			} else {
				document.all('abocost_deutschland').innerHTML = value;
				document.all('endpreis').value = value;
			}		
		}

	}
	
*/
	
	function changePrice() {
		
		if (document.getElementById('bundesland').selectedIndex == '0') {
			document.getElementById('abocost_deutschland').style.visibility = 'hidden';
			document.getElementById('abocost_deutschland').style.height = "1px";
			document.getElementById('abocost_berlin').style.visibility = 'visible';
			document.getElementById('abocost_berlin').style.height = "auto";
			document.getElementById('preis').value = "Berlin-Brandenburg";
		} else if (document.getElementById('bundesland').selectedIndex == '1') {
			document.getElementById('abocost_deutschland').style.visibility = 'visible';
			document.getElementById('abocost_deutschland').style.height = "auto";	
			document.getElementById('abocost_berlin').style.visibility = 'hidden';	
			document.getElementById('abocost_berlin').style.height = "1px";
			document.getElementById('preis').value = "au?erhalb Berlin-Brandenburg";
		}
	}
	

