
<!--
 function AddToURL(url) {
    p = document.Menu.Party.selectedIndex;
    return  url + "?PN=" + escape(document.Menu.Party.options[p].value);	
    }

 function AddToURLS(url) {
//    p = document.Menu.Party.selectedIndex;
	return  url;	
    }
	
 function AddToURLC(that) {
	if (that == 'County1') {
		var i = document.Menu.County1.selectedIndex;
		var y = document.Menu.County1.options[i].value; 
		var d = document.Menu.County1.options[i].text; 
    url = "SelectRaces.asp?M=CTY"
		if (y == "00" ) {
			alert("\n Please select a county.")
			return } 
		else {
			window.location =  url + "&rq=" + escape(y) +d;	
		}
		}	

	if (that == 'County2') {
		var i = document.Menu.County2.selectedIndex;
		var y = document.Menu.County2.options[i].value; 
		var	d = document.Menu.County2.options[i].text; 
    url = "SelectPrecinct.asp?M=P"}

if (y=='00') {
		alert("\n Please select a county.")
		return }
  else		{ 	

	window.location =  url + "&rq=" + escape(y) +d;	
}
 }	

function AddToURLD(that) {
	if (that == 'Legs1') { 
		var i = document.Menu.Legs1.selectedIndex;
		var y = document.forms[0].Legs1.options[i].value;
		url = "ElecRslts.asp?M=LG" }
	if (that == 'Legs2') {
		var i = document.Menu.Legs2.selectedIndex;
	 	var y = document.forms[0].Legs2.options[i].value; 
		url = "SelectPrecinctLG.asp?M=LG"}
		//url = "Cross_PLD.asp?M=LG"}
	if (that == 'Legs3') {
		var i = document.Menu.Legs3.selectedIndex;
	 	var y = document.forms[0].Legs3.options[i].value; 
		//url = "ElecRslts.asp?M=PLG"}
		url = "Cross_PLD.asp?M=LG"}
	if (y=='00') {
		alert("\n Please select a district.")
		return }
   else		{ 
  
			window.location =  url +  "&LD=" + escape(y);	
}
 }	

 
 function AddToURLM(that) {
	if (that == 'MCD') {
		var i = document.Menu.MCD.selectedIndex;
		var val = document.Menu.MCD.options[i].value; 
		
		//val contains 26:Barrett city*03682 ... <option value=26:Barrett city*03682>Barrett city</option>
		// We must remove the 03682 and put it into the txt are
		// The final query string we want to look like: SelectRaces.asp?M=MCD&rq=26%3ABarrett%20city&txt=03682%20-%20Barrett%20city
		var z = val.indexOf("*");
		var tmpNum = val.substring(z+1,99) + " - ";
		var tmpFirstPart = val.substring(0,z);
		var txt = document.Menu.MCD.options[i].text; 
	    url = "SelectRaces.asp?M=MCD" }
	if (val=='') {
		alert("\n Please select a city/township.")
		return }
	  else		{ 	
		window.location =  url + "&rq=" + escape(tmpFirstPart)+"&txt="+escape(tmpNum + txt);		
	}
 }	

function AddToURLHD(that) {
	if (that == 'HD') {
		var i = document.Menu.HD.selectedIndex;
		var val = document.Menu.HD.options[i].value; 
		var txt = document.Menu.HD.options[i].text; 
	    url = "ElecRslts.asp?M=HD" }
	if (val=='') {
		alert("\n Please select a Hospital District.")
		return }
	  else		{ 	
		window.location =  url + "&rq=" + escape(val)+"&txt="+escape(txt);	
	}
 }	


 function AddToURLSD(that) {
	if (that == 'SD') {
		var i = document.Menu.SD.selectedIndex;
		var val = document.Menu.SD.options[i].value; 
		var txt = document.Menu.SD.options[i].text; 
 	url = "SelectRaces.asp?M=SD"}
	if (val=='') {
		alert("\n Please select a School District.")
		return }
  else		{ 	
	window.location =  url + "&rq=" + escape(val) + "&txt="+escape(txt);	
}
 }	



 
//-->
