function populateSchools(st,type,cty,sd,sc,url,access_code) {	

	cleanURL = url.substr(0,url.indexOf("?")) 
	if(cleanURL !=	"") {
		url = cleanURL;
	}
	
	
	url += "?state=" + st;
	
	if(access_code) url += "&access_code=" + access_code;
	
	if(type != "") url += "&type=" + type;
	
	if(cty != "") url += "&county=" + cty;

	if(sd != "") url +="&district=" + sd;
	
	if(sc != "") url +="&sc=" + sc;
	
	document.location = url;
}

function showHide(elem,display) {
	//alert('hello?');
	e = document.getElementById(elem);
	e.style.visibility = display;
	}
	
	

	/* ----------------------- Functions to Show/Hide ------------------------------- */
	

function toggleDivAlpha(selector) {
	toggleDiv = document.getElementById("yearsAttended").style;
	
	if(selector == false) {
		toggleDiv.color = "#D0D0D0";
		toggleInputsActive("inactive");
		
	}	else {
		toggleDiv.color = "#000000";
		toggleInputsActive("active");
	}
}


function toggleInputsActive(command) {
	formInputs = document.forms["mailerForm"];
	
	if(command == "inactive") {
		for(i=0; i<formInputs.length; i++) {
			if(formInputs[i].getAttribute("toggle") == "true") {
				formInputs[i].checked = false;
				formInputs[i].value = "";
				formInputs[i].onfocus = function(){ this.blur(); return false };
				formInputs[i].onclick = function(){ return false };
				formInputs[i].style.visibility = "hidden";
			}
		}
	}
	else {
		for(i=0; i<formInputs.length; i++) {
			if(formInputs[i].getAttribute("toggle") == "true") {
				formInputs[i].onfocus = null;
				formInputs[i].onclick = null;
				formInputs[i].style.visibility = "visible";
			}
		}
	}
	
}