// JavaScript Document

function checkUNICEFSpende() {
	var val = document.forms.cart_quantity.unicef_weitere_spende.value;
	var ret = true;
	
	if(val != "" && val != "0") {
		val = val.replace(/,/g,".");
		val = parseFloat(val);
		if(isNaN(val))
			ret = false;
	}
	
	if(ret == false)
		alert("Für eine optionale Spende sind folgende Zeichen erlaubt:\n0-9 und ,");
		
	return ret;
}

function switchlayer(Layer_Name)
{
  var GECKO = document.getElementById? 1:0 ;
  var NS = document.layers? 1:0 ;
  var IE = document.all? 1:0 ;

  if (GECKO)
       {document.getElementById(Layer_Name).style.display=
	   (document.getElementById(Layer_Name).style.display=='block') ? 'none' : 'block';}
  else if (NS)
       {document.layers[Layer_Name].display=(document.layers[Layer_Name].display==
	   'block') ? 'none' : 'block';}
  else if (IE)
       {document.all[Layer_Name].style.display=(document.all[Layer_Name].style.display==
	   'block') ? 'none' : 'block';}
}

function setdisplay(id){
			    	    	    pwd = document.getElementById(id);
			    	    	  
			    	    	   
			    	    	    if(pwd.style.display == "none"){
			    	    	        pwd.style.display = "inline";
			    	    	 
			    	    	    }else{
			    	    	        pwd.style.display = "none";
			    	    	     
			    	    	    }
			    	    	}