function textCounter(id, countid, maxlimit) {

     if (document.getElementById(id).value.length > maxlimit) {
	 	if (document.getElementById(id).name.substring(0, 19) == "extra_widmung_text_") {
			if (document.getElementById(id).name.substring(19, 20) == 1) {
				document.getElementById(document.getElementById(id).name.substring(0, 19)+"2").focus();
			} 
			if (document.getElementById(id).name.substring(19, 20) == 2) {
				document.getElementById(document.getElementById(id).name.substring(0, 19)+"3").focus();
			}
			if (document.getElementById(id).name.substring(19, 20) == 3) {
				alert ("Maximale Anzahl an Zeichen erreicht!");
			}
		}
         document.getElementById(id).value = document.getElementById(id).value.substring(0, maxlimit); 
     } else { 
         //dijit.byId(countid).value = maxlimit - document.getElementById(id).value.length;
         document.getElementById(countid).value = maxlimit - document.getElementById(id).value.length;
     }
}
function checkParent(id) {

			dijit.byId(id).setValue(true);

}
function checkDelivery() {

		document.deliveryForm.shippingDataRadio[1].checked = true;
	 
}

function disableTaufdatum() {

	if(dijit.byId('kein_taufdatum').checked == true) {
		dijit.byId('taufdatum').attr('value',"");
		dijit.byId('taufdatum').attr('disabled',true);
		dijit.byId('taufdatum').attr('promptMessage',"");
	} else {
		dijit.byId('taufdatum').attr('disabled',false);
	}
}
function disableEmail() {

	if(dijit.byId('keine_email').checked == true) {
		dijit.byId('email').attr('value',"");
		dijit.byId('email').attr('disabled',true);
		dijit.byId('email').attr('promptMessage',"");
	} else {
		dijit.byId('email').attr('disabled',false);
	}
}

