var oldclass = new Array();
var classset=0;
function checkRequired(){
var place=document.mod_feedb_form.place;
var tax_status=document.mod_feedb_form.tax_status;
var ret=0;
var elem = new Array(
'date',
'name',
'street',
'city',
'state',
'zip',
'phone',
'email',
'tin',
'title',
'mission',
'need',
'descr',
'outcome',
'am',
'fit',
'title2',
'contact'
);
if(place.options[place.selectedIndex].value!='yes' || tax_status.options[tax_status.selectedIndex].value!='yes'){
for(e in elem){
document.mod_feedb_form[elem[e]].disabled=true;
if(document.mod_feedb_form[elem[e]].className!='disabled'){ oldclass[elem[e]]= document.mod_feedb_form[elem[e]].className;
classset=1;
}
document.mod_feedb_form[elem[e]].className='disabled';
}ret=1;
}
else {
for(e in elem){
document.mod_feedb_form[elem[e]].disabled=false;
if(classset)
document.mod_feedb_form[elem[e]].className=oldclass[elem[e]];
}ret=0;
}
if(place.value=='no'){
document.getElementById('input_err_place').innerHTML="
The Thomas C. Ackerman Foundation restricts its financial support to organizations, the programs of which are offered in San Diego County, California, USA.";
}
else {
document.getElementById('input_err_place').innerHTML="";
}
if(tax_status.value=='no'){
document.getElementById('input_err_tax_status').innerHTML="
The Thomas C. Ackerman Foundation restricts its financial support to organizations which are public charities as defined in Internal Revenue Code Section 509(a)(1-3).";
}
else {
document.getElementById('input_err_tax_status').innerHTML="";
}
return ret;
}
window.onload=checkRequired;