
	function chkSelection(){
		alert(document.donate.affiliation.options[document.donate.affiliation.selectedIndex].text);
		// document.choiceForm.choiceBox.options[i].text
		}
		
	function chgMyEmployer(){
		if (document.donate.myemployer.checked){
		document.donate.mycompany.disabled=false;
		document.getElementById("myemp").className = "formNonRequired";
		document.donate.mycompany.style.background='#ffffff';
		document.donate.mycompany.focus();
		} else {
		document.donate.mycompany.value="";
		document.donate.mycompany.disabled=true;
		document.donate.mycompany.style.background='#dddddd';
		document.getElementById("myemp").className = "formDisabled";
		}
	}
	
	
	function chgSpouseEmployer(){
		if (document.donate.spouseemployer.checked){
		document.donate.spousecompany.disabled=false;
		document.getElementById("spouseemp").className = "formNonRequired";
		document.donate.spousecompany.style.background='#ffffff';
		document.donate.spousecompany.focus();
		} else {
		document.donate.spousecompany.value="";
		document.donate.spousecompany.disabled=true;
		document.donate.spousecompany.style.background='#dddddd';
		document.getElementById("spouseemp").className = "formDisabled";
		}
	}
	
	
	function chgAffiliation(){
		
		if (document.donate.affiliation.options[document.donate.affiliation.selectedIndex].text == "Other"){
		document.donate.other.disabled=false;
		document.getElementById("selother").className = "formNonRequired";
		document.donate.other.style.background='#ffffff';
		document.donate.other.focus();
		} else {
		document.donate.other.value="";
		document.donate.other.disabled=true;
		document.donate.other.style.background='#dddddd';
		document.getElementById("selother").className = "formDisabled";
		}

		if (document.donate.affiliation.options[document.donate.affiliation.selectedIndex].text == "Alumnus (male)" || document.donate.affiliation.options[document.donate.affiliation.selectedIndex].text == "Alumnua (female)"){
		document.donate.yeargraduated.disabled=false;
		document.getElementById("selyeargraduated").className = "formNonRequired";
		document.donate.yeargraduated.style.background='#ffffff';
		document.donate.yeargraduated.focus();
		} else {
		document.donate.yeargraduated.value="";
		document.donate.yeargraduated.disabled=true;
		document.donate.yeargraduated.style.background='#dddddd';
		document.getElementById("selyeargraduated").className = "formDisabled";
		}
	}
	

	function cpyAddress(){
	if (document.donate.sameaddress.checked){
		document.donate.baddress1.value = document.donate.paddress1.value;
		document.donate.baddress2.value = document.donate.paddress2.value;
		document.donate.bcity.value = document.donate.pcity.value;
		//alert(document.donate.pstate.options[document.donate.pstate.selectedIndex].index);
		document.donate.bstate.selectedIndex = document.donate.pstate.selectedIndex;
		document.donate.bzip.value = document.donate.pzip.value;
		} else {
		document.donate.baddress1.value = "";
		document.donate.baddress2.value = "";
		document.donate.bcity.value = "";
		document.donate.bstate.selectedIndex = 0;
		document.donate.bzip.value = "";
		}				
	}
	
	function oDR(d){
		open("DonationReport.asp?dID="+d,"","left=30,top=30,width=600,height=500,resizable=1,menubar=1");
		}
		
	function oTY(d){
		open("ThankYou.asp?dID="+d,"","left=30,top=30,width=600,height=500,resizable=1,menubar=1");
		}
		
	function formatCurrency(num) {
		num = num.toString().replace(/\$|\,/g,'');
		if(isNaN(num))
			num = "0";
		sign = (num == (num = Math.abs(num)));
		num = Math.floor(num*100+0.50000000001);
		cents = num%100;
		num = Math.floor(num/100).toString();
		if(cents<10)
			cents = "0" + cents;
		for (var i = 0; i < Math.floor((num.length-(1+i))/3); i++)
			num = num.substring(0,num.length-(4*i+3))+','+
			num.substring(num.length-(4*i+3));
		//return (((sign)?'':'-') + '$' + num + '.' + cents);
		return (((sign)?'':'-') + num);
	}

	function checkNumber(val) {
	  var strPass = val.value;
	  var strLength = strPass.length;
	  var lchar = val.value.charAt((strLength) - 1);
	  var cCode = CalcKeyCode(lchar);

	  /* Check if the keyed in character is a number
	     do you want alphabetic UPPERCASE only ?
	     or lower case only just check their respective
	     codes and replace the 48 and 57 */

	  if (cCode < 48 || cCode > 57 ) {
	    var myNumber = val.value.substring(0, (strLength) - 1);
	    val.value = myNumber;
	  }
	  return false;
	}

	// calculate the ASCII code of the given character
	function CalcKeyCode(aChar) {
	  var character = aChar.substring(0,1);
	  var code = aChar.charCodeAt(0);
	  return code;
	}

