///////////////////////////////////////////////////
// make swap amounts depending on selected donor option
function mkPatenschaft(){

  selDonPurp = document.forms[0].field_txtDonPurp.selectedIndex
  selOnce = document.forms[0].field_periodizitaet[0].checked
  selMonthly = document.forms[0].field_periodizitaet[1].checked
  selFreeAmount = document.forms[0].field_amount.selectedIndex

//  x = document.getElementById("field_amount");
  x = document.unia_supporterForm.field_amount;

// 0:Spende, 1: Patenschaft
// 1:30, 2:50, 3:75, 4:100, 5:other

if (selFreeAmount > 4){
  x = document.unia_supporterForm.field_amount;
}

else if(selDonPurp > 0){

 if (selOnce == true){
     kat1 = new Option('300.-', '300.00', false, true);
     x.options[4] = kat1;
    }
 else if (selMonthly == true){
     kat1 = new Option('25.-', '25.00', false, false);
     x.options[1] = kat1;
     kat1 = new Option('100.-', '100.00', false, false);
     x.options[4] = kat1;
     kat1 = new Option('50.-', '50.00', false, true);
     x.options[2] = kat1;
    }
}
else if(selDonPurp <1) {

 if (selOnce == true){
     kat1 = new Option('50.-', '50.00', false, false);
     x.options[1] = kat1;
     kat1 = new Option('60.-', '60.00', false, true);
     x.options[2] = kat1;
    }
 else if (selMonthly == true){
     kat1 = new Option('15.-', '15.00', false, false);
     x.options[1] = kat1;
     kat1 = new Option('30.-', '30.00', false, true);
     x.options[2] = kat1;
    }
}

// Kontrollausgabe
//alert (selOnce);
}

///////////////////////////////////////////////////
// make forminfo visible
function mkVisible(anId , aStrg){

x = document.getElementById(anId);

String.prototype.replaceAll=function(s1, s2) { 
	  return this.replace(new RegExp(s1,"g"), s2);
	}
endStrg = aStrg.replaceAll('bla',' ');

x.setAttribute('class', 'pop_nav_fieldinfo');
x.innerHTML = endStrg;

// Kontrollausgabe
//alert ( y + ', is visible');
}

///////////////////////////////////////////////////
// make anId-Element visible
function mkVisible_freeamount(){

  y1 = document.forms[0].field_amount.selectedIndex
  x = document.getElementById("field_free_amount");

  if (y1 >4) {
    x.setAttribute('class', 'show_me');
    x.setAttribute('className', 'show_me');
  } 
  if (y1 <4) {
    x.setAttribute('class', 'pop_nav_fieldinfoInvis');
    x.setAttribute('className', 'pop_nav_fieldinfoInvis');
  }

// Kontrollausgabe
//alert ( y1);
}

///////////////////////////////////////////////////
// make anId-Element visible
function mkInvisible_freeamount(){

  x = document.getElementById("field_free_amount");

    x.setAttribute('class', 'pop_nav_fieldinfoInvis');
    x.setAttribute('className', 'pop_nav_fieldinfoInvis');

// Kontrollausgabe
//alert ( y1);
}

///////////////////////////////////////////////////
// make forminfo invisible
function mkInvisible(anId){

x = document.getElementById(anId);
x.innerHTML = '';

// Kontrollausgabe
//alert ( anId.id + ', is visible');

}

///////////////////////////////////////////////////
// make forminfo invisible
function mkInvisible_alt(anId){

anId.setAttribute('class', 'pop_nav_fieldinfoInvis');

// Kontrollausgabe
//alert ( anId.id + ', is visible');

}
