     function isNumberKey(evt)
     {
     	var charCode = (evt.which) ? evt.which : event.keyCode
     	if (charCode > 31 && (charCode < 48 || charCode > 57))
     	   return false;

     	return true;
     }
     
     function checkname(evt)
     {
     	if(document.getElementById("card_to_name").innerHTML.length>20)
     	   return false;

     	return true;
     }
     
     function select_other()
     {
     	document.getElementById("other").checked = true;
     }

	function update_gift_card()
	{
		amount_elements = document.getElementsByName("amount");
		other_amount_text = document.getElementById("other_amount");
		card_amount = 0;
		type = 'template';
		
		for(i=0;i<amount_elements.length;i++)
		{
			if(amount_elements[i].checked)
			{
				card_amount = amount_elements[i].value;		
			}
		}
		
		if(card_amount=='other')
		{
			type='other';
			card_amount = 0;
			if(other_amount_text.value!='')
			{
				card_amount = other_amount_text.value;
			}
		}
		
		
		document.getElementById("card_amount_div").innerHTML = card_amount;
		//alert(card_amount);
		
	}
	
	function update_name(div_id)
	{
		recipient_name_value = document.getElementById(div_id).value;
		if(recipient_name_value=='')
		{
			recipient_name_value = 'Jane Doe';
		}
		document.getElementById("card_to_name").innerHTML = recipient_name_value;
	}