    function getURLVar(urlVarName) {
        //divide the URL in half at the '?'
        var urlHalves = String(document.location).split('?');
        var urlVarValue = '';
        if(urlHalves[1]){
            //load all the name/value pairs into an array
            var urlVars = urlHalves[1].split('&');
            //loop over the list, and find the specified url variable
            for(i=0; i<=(urlVars.length); i++){
                if(urlVars[i]){
                    //load the name/value pair into an array
                    var urlVarPair = urlVars[i].split('=');
                    if (urlVarPair[0] && urlVarPair[0] == urlVarName) {
                        //I found a variable that matches, load it's value into the return variable
                        urlVarValue = urlVarPair[1];
                    }
                }
            }
        }
        return urlVarValue;   
    }

function doSearch() {
    var f = document.getElementById('findOutlet');
    var fail = 0; 

    if (document.getElementById('pid').value == '') {
        alert("Please select your product.");
        fail = 1;
    } else {
	    if (document.getElementById('cid').value == '') {
		alert("Please select your county.");
		fail = 1;
	    } 
    }

    if (!fail) {
        //f.submit();
	document.findOutlet.submit();
    }
}
//CODE REMOVED FROM ORIGINAL WEB SITE//
//here you place the ids of every element you want.
var ids=new Array('a0', 'a1','a2','a3','a4','a5','a6','a7','a8');

function switchid(id){	
	hideallids();
	showdiv(id);
}

function hideallids(){
	//loop through the array and hide each element by id
	for (var i=0;i<ids.length;i++){
		hidediv(ids[i]);
	} 
}

function hidediv(id) {
	//safe function to hide an element with a specified id
	if (document.getElementById) { // DOM3 = IE5, NS6
		document.getElementById(id).style.display = 'none';
	}
	else {
		if (document.layers) { // Netscape 4
			document.id.display = 'none';
		}
		else { // IE 4
			document.all.id.style.display = 'none';
		}
	}
}

function showdiv(id) {
	//safe function to show an element with a specified id
		  
	if (document.getElementById) { // DOM3 = IE5, NS6
		document.getElementById(id).style.display = 'block';
	}
	else {
		if (document.layers) { // Netscape 4
			document.id.display = 'block';
		}
		else { // IE 4
			document.all.id.style.display = 'block';
		}
	}
}

///
var urlD = getURLVar('d');
if (urlD != '') {
    hideallids();
    showdiv(urlD);
}
<!--TEXT COUNTER IN QUESTION FORMS
function textCounter(field,cntfield,maxlimit) {
if (field.value.length > maxlimit) // if too long...trim it!
field.value = field.value.substring(0, maxlimit);
// otherwise, update 'characters left' counter
else
cntfield.value = maxlimit - field.value.length;
}
//  -->
<!--CLEAR FORM DATA AFTER PAGE IS RELOADED
function clearForms()
{
  var i;
  for (i = 0; (i < document.forms.length); i++) {
    document.forms[i].reset();
  }
}
//  -->