function getStringVar(st){
  var temp = self.document.location.search;
  if(temp.indexOf(st) >= 0){
    temp = temp.substring((temp.indexOf(st)+(st.length+1)), temp.length);
    temp = temp.substring(0, (((temp.indexOf('&')>=0)?temp.indexOf('&'):temp.length)));
    for (var i=0;i<temp.length;i++){
      if (temp.charAt(i) == "+") {
        temp = temp.substring(0, i) + " " + temp.substring(i+1, temp.length+1);
      }
    }
  }else{ 
    temp = '';
  } 
  return unescape(temp);
}

function addLoadEvent(func) {
  var oldonload = window.onload;
  if (typeof window.onload != 'function') {
    window.onload = func;
  } else {
    window.onload = function() {
      if (oldonload) {
        oldonload();
      }
      func();
    }
  }
}

addLoadEvent(donationDD);


function donationDD () {
	var page = getStringVar("b");
	if(page=="190256"){
		document.getElementById('donation_type_copy').parentNode.parentNode.style.display = "none"; //hides extra blue bar
		var levelTable = document.getElementById('TablePledgeLevelInner');
		levelTable.style.display = "none"; //hides original donation levels
		var div = document.createElement('div'); //creates a new div where new donation levels will be
		div.id = "donationDiv";
		var radios;
		
		div.innerHTML = "<select name='PledgeLevels' onchange='SetAmount(form,this.options[selectedIndex].value);'><option value='' onclick='SetAmount(form, 0);'>Please Select</option><option value='500' onclick='SetAmount(form, 500);'>$500</option><option value='250' onclick='SetAmount(form, 250);'>$250</option><option value='100' onclick='SetAmount(form, 100);'>$100</option><option value='50' onclick='SetAmount(form, 50);' selected>$50</option><option value='30' onclick='SetAmount(form, 30);'>$30</option><option value='20' onclick='SetAmount(form, 20);'>$20</option></select>"; //html for new dropdown with levels in it
		
		levelTable.parentNode.appendChild(div);
		document.getElementById('middleColWide').getElementsByTagName('FORM')[0].Amount.value = "50";  //sets the default value for the donation amount text box
		
		var fonts = document.getElementsByTagName('FONT');
		
		for (i=0;i<fonts.length;i++) {
			if (fonts[i].innerHTML == "Donation Levels") {
				fonts[i].innerHTML = "Gift Options";	//replaces the text 'Donation Levels' with the text 'Gift Options'
			}
			if (fonts[i].innerHTML == "Your Contact Information") {
				fonts[i].parentNode.parentNode.className = "CTtitle";	//puts the same blue bar style on the "Your Contact Information" text

el = document.getElementById('SubmitButton');
if(el){
	el.style.backgroundColor="#7BAD3A";
	el.style.border="solid 2px #CBDCB6";	
	el.style.textTransform="uppercase";
	el.style.color="#ffffff";
	el.style.fontWeight="bold";
         el.style.fontFamily="verdana";
        el.style.fontSize="14px";

			}
		}
	}
if(page=="3414745"){
		document.getElementById('donation_type_copy').parentNode.parentNode.style.display = "none"; //hides extra blue bar
		var levelTable = document.getElementById('TablePledgeLevelInner');
		levelTable.style.display = "none"; //hides original donation levels
		var div = document.createElement('div'); //creates a new div where new donation levels will be
		div.id = "donationDiv";
		var radios;
		
		div.innerHTML = "<select name='PledgeLevels' onchange='SetAmount(form,this.options[selectedIndex].value);'><option value='' onclick='SetAmount(form, 0);'>Please Select</option><option value='1000' onclick='SetAmount(form, 1000);'>$1000</option><option value='500' onclick='SetAmount(form, 500);'>$500</option><option value='250' onclick='SetAmount(form, 250);'>$250</option><option value='100' onclick='SetAmount(form, 100);'>$100</option><option value='50' onclick='SetAmount(form, 50);'selected>$50</option><option value='25' onclick='SetAmount(form, 25);'>$25</option></select>"; //html for new dropdown with levels in it
		
		levelTable.parentNode.appendChild(div);
		document.getElementById('middleColWide').getElementsByTagName('FORM')[0].Amount.value = "50";  //sets the default value for the donation amount text box
		
		var fonts = document.getElementsByTagName('FONT');
		
		for (i=0;i<fonts.length;i++) {
			if (fonts[i].innerHTML == "Donation Levels") {
				fonts[i].innerHTML = "Gift Options";	//replaces the text 'Donation Levels' with the text 'Gift Options'
			}
			if (fonts[i].innerHTML == "Your Contact Information") {
				fonts[i].parentNode.parentNode.className = "CTtitle";	//puts the same blue bar style on the "Your Contact Information" text

			}
		}
	}
if(page=="4122863"){
		document.getElementById('donation_type_copy').parentNode.parentNode.style.display = "none"; //hides extra blue bar
		var levelTable = document.getElementById('TablePledgeLevelInner');
		levelTable.style.display = "none"; //hides original donation levels
		var div = document.createElement('div'); //creates a new div where new donation levels will be
		div.id = "donationDiv";
		var radios;
		
		div.innerHTML = "<select name='PledgeLevels' onchange='SetAmount(form,this.options[selectedIndex].value);'><option value='' onclick='SetAmount(form, 0);'>Please Select</option><option value='600' onclick='SetAmount(form, 600);'>$600</option><option value='300' onclick='SetAmount(form, 300);'>$300</option><option value='100' onclick='SetAmount(form, 100);'>$100</option><option value='50' onclick='SetAmount(form, 50);' selected>$50</option><option value='20' onclick='SetAmount(form, 20);'>$20</option></select>"; //html for new dropdown with levels in it
		
		levelTable.parentNode.appendChild(div);
		document.getElementById('middleColWide').getElementsByTagName('FORM')[0].Amount.value = "50";  //sets the default value for the donation amount text box
		
		var fonts = document.getElementsByTagName('FONT');
		
		for (i=0;i<fonts.length;i++) {
			if (fonts[i].innerHTML == "Donation Levels") {
				fonts[i].innerHTML = "Gift Options";	//replaces the text 'Donation Levels' with the text 'Gift Options'
			}
			if (fonts[i].innerHTML == "Your Contact Information") {
				fonts[i].parentNode.parentNode.className = "CTtitle";	//puts the same blue bar style on the "Your Contact Information" text

			}
		}
	}
}
}