   startList = function() { //alert("in function");
		//alert("before getting the id");
		if(document.all&&document.getElementById){
		navRoot = document.getElementById("primaryNav");
		//alert("got it child nodes is " + navRoot.childNodes.length);
		for (i=0; i<navRoot.childNodes.length; i++) {
		node = navRoot.childNodes[i];
		if (node.nodeName=="LI") { //alert("got it node is " + node.nodeName);
		node.onmouseover=function() {
		this.className+=" over";}
		node.onmouseout=function() {
		this.className=this.className.replace(" over", "");
		}
		}
		}
		}
		}

   function openPopup(val){
		//alert("image is " + image);
		window.open(val,'mywindow','width=450,height=450');
	}
   function check_num(name_id,group_id,total_id){
		//alert(name_id);
		var field = document.getElementById(name_id);
		//alert(field.value);
		if(isNaN(field.value))
		{
			//alert("in if");
			alert( field.value + " is not a numeric value. Please remove all alpha characters and commas");
			field.value="";
		}
		//alert("in else")
		total_field_group(group_id,total_id);
	}
	
	function total_field_group(group_id,total_id){
		
	     var group = document.getElementById( group_id );
		 //alert("groupid = " + group.getAttribute("id"));
	     var fields = group.getElementsByTagName( 'input' );
	     var total = document.getElementById( total_id );
		 var running_total = 0;		 
		  for( var i=0; i < fields.length; i++ ){
	        running_total = eval((running_total*1)+(fields[i].value*1)).toFixed(2);
	      	
		  }
		 if(total_id == "groupsTotal") 
		 	return running_total;
		 else if(running_total > 0) 
		 	total.innerHTML = running_total;
		 else	
			total.innerHTML = "";
			
		//if the group has a class value of "plus" or "minus", it is 
		//part of a greater summation so call the "total_cross_groups"
		//function with the id of the parent element
		if(group.getAttribute("class")=="plus" || group.getAttribute("class")=="minus")
		{	
			//alert("parent node is " + document.getElementById(group.parentNode.getAttribute("id")).getAttribute("id"));
			total_cross_groups(document.getElementById(group.parentNode.getAttribute("id")).getAttribute("id"),"groupsTotal");
		}
	}

	function total_cross_groups(group_id,total_id){

	     var group = document.getElementById( group_id );
		 //alert("groupid" + group.getAttribute("id"));
	     var fields = group.getElementsByTagName( 'fieldset' );
		 //alert( fields.length + " groups found");
	     var total = document.getElementById( total_id );
		 
		 var running_total = 0;
		 var group_total = 0;		 
		 for( var i=0; i < fields.length; i++ ){
		 	if(fields[i].getAttribute("id"))
			{
		     	group_total = total_field_group(fields[i].getAttribute("id"),total_id);
				//alert("group_total = " + group_total);
				if(fields[i].getAttribute("class") == "plus")
				 running_total = eval((running_total*1) + (group_total*1)).toFixed(2);
				else
				 running_total = eval((running_total*1) - (group_total*1)).toFixed(2); 					  
		      	}
		  }
		 //alert("running_total is " + running_total);
		 if(running_total != 0) 
		 	total.innerHTML = running_total;
		 else	
			total.innerHTML = "";
	}
	
	function showOrHide(selection_field,hide_field)
	{
		 //alert("selected field = " + selection_field );
		 var selected_field = document.getElementById( selection_field );
		 var field_type = selected_field.type;
		 var selected_val = selected_field.value;
		 //alert("selected field = " + selected_val );
	   	 //alert("The element type is " + field_type);
		 
		 //If selection box first make sure all appropriate fields are hidden but skip the selection box
	     if (field_type == "checkbox")
		 {
		 	if(selected_field.checked)
				document.getElementById(hide_field).style.display = "block";
		 	else
				document.getElementById(hide_field).style.display = "none";
		 }
		 else
		 {
		 	alert("in else");
		 }		 	 		 	
	}
	
	function hideAll()
	{
		 var hides = document.getElementsByClassName( 'hide' );
         //alert(lis.length + " objects with class name 'hide' found");
		 
		 for( var i=0; i < hides.length; i++ ){
				hides[i].style.display="none";
		  }
	}
	
	function hideSection(f,cN)
	{
		var hides = document.getElementsByClassName( cN );
		var checkField = document.getElementById( f ); 
		 //alert("checkField = " + checkField.value )
		 if (checkField.checked){
			 for( var i=0; i < hides.length; i++ ){
					hides[i].style.display="none";
			  }
		 }
		 else
		 {
			 for( var i=0; i < hides.length; i++ ){
					hides[i].style.display="block";
			  }
		 }
		 
	}

	function hideDesc(f,cN)
	{
		var hides = document.getElementsByClassName( cN );
		var checkField = document.getElementById( f ); 
		 //alert("checkField = " + checkField.value )
		 if (checkField.checked){
			 for( var i=0; i < hides.length; i++ ){
					hides[i].style.display="none";
			  }
		 }
		 else
		 {
			 for( var i=0; i < hides.length; i++ ){
					hides[i].style.display="block";
			  }
		 }
		 
	}
	
	function addLoadEvent(func) {
	  var oldonload = window.onload;
	  if (typeof window.onload != 'function') {
	    window.onload = func;
	  } else {
	    window.onload = function() {
	      if (oldonload) {
	        oldonload();
	      }
	      func();
	    }
	  }
	}
		
	function addEvent(obj, evType, fn){ 
		 if (obj.addEventListener){ 
		   obj.addEventListener(evType, fn, false); 
		   return true; 
		 } else if (obj.attachEvent){ 
		   var r = obj.attachEvent("on"+evType, fn); 
		   return r; 
		 } else { 
		   return false; 
		 } 
	}

	function reset_checked(group_id,selected_id)
	{
	  alert("in reset checked");
      var group = document.getElementById( group_id );
	  alert("group " + group);
	  var fields = group.getElementsByTagName('input');
	  alert("fields " + fields + " first val " + fields[0].value + " number found is " + fields.length);
	  var selected_field = document.getElementById( selected_id );	
	  alert("selected value " + selected_field.value);
	  //radios = this.el.up('form').select('input[type=radio]');
	   
	  for(var i = 0; i < fields.length; i++) {
	  	if (fields[i].type == 'radio')
		{
			if (fields[i].value == selected_field.value)
			{
				alert("in if with " + fields[i].value);
				fields[i].checked = true;
			}
			else
			{
				alert("in else with " + fields[i].value);
				fields[i].checked = false;
			}	
		} 
	  } 
    } 

// experiment code

function addHideShowEventsForRadio() 
{
     
  //First hide all candidate elements
  //alert("before hide all");
  //hideAll();
  
  var groups = document.getElementsByClassName('radioGroup');
  
  //loop through the radio groups on the page
  for(var i=0;i<groups.length;i++) 
  {
  	  //alert("groups found " + groups.length);	
	  var radios = groups[i].getElementsByTagName('input');
  	
	  // loop through the radio buttons in the group
	  for(var j=0;j<radios.length;j++) 
	  {
		if (radios[j].type == 'radio')
		{
			radios[j].onkeyup=radios[j].onclick=function()
			{
				//loop through this radio buttons group 
				//hiding all the necessary elements for the unchecked
				//radio buttons and showing those for the checked radio button

				//alert("the parent node is " + this.parentNode.id);
				var group = document.getElementById(this.parentNode.id);			
				var radios = group.getElementsByTagName('input');
				  
				  for(var k=0;k<radios.length;k++) 
				  {
					if (radios[k].type == 'radio')
					{
						// get a reference to the element that we want to toggle the display of
						//var vals = radios[i].value.split("O");
						//var vals = radios[i].value.split(/[^\Wa-z0-9_]/);
						//var cVal = vals[0]; 
						var cVal = radios[k].value.gsub(/[A-Z]/, function(match) {return ' ' + match[0]}).strip().split(" ")[0];
						//alert("before with radio value " + cVal);
						
						var top = document.getElementsByClassName("urlaSection")[0];
						var cNodes = top.getElementsByTagName('fieldset');
						//alert(cNodes.length + " child fieldsets found");
						for(var l=0;l<cNodes.length;l++)
						{	
							var fid="";
							if(cNodes[l].getAttribute("id"))
							{
								var fid=cNodes[l].getAttribute("id");
							}
							//alert("id of the object to search is " + fid);
							//alert("the string to look for is " + cVal);
							
							if ((fid.match(cVal)&&fid!=""))
							{
								//alert("found a match");
								var el = document.getElementById(fid);
								//alert("after getting the id to set");
								if(radios[k].checked)
								{
									//if a parent fieldset exists that is hidden show it first
									//if (document.getElementById(group.parentNode.id) && document.getElementById(group.parentNode.id).className=="hide")
									//{
									//	document.getElementById(group.parentNode.id).style.display = "block";
									//}	
									//the radio matching this element is selected so show it
									//alert("I can get the value and checked");
									el.style.display = "block";
								}
								else
								{
									//if a parent fieldset exists that is hidden hide it first
									//if (document.getElementById(group.parentNode.id) && document.getElementById(group.parentNode.id).className=="hide")
									//{
									//	document.getElementById(group.parentNode.id).style.display = "none";
									//}
									//alert("I can get the value but not checked");
									el.style.display = "none";
								}
							}	
						}	
					}
				  }				
			}
		radios[j].onclick();		
		}		
	 } 
  }
  //Lastly hide all candidate elements
  //alert("before hide all");
  hideAll();
}
