/*******************************************************************
	Below here is the code for the "other" text boxes. 
********************************************************************/  
  	function isOther(selObj)
	 {
	 if(selObj.selectedIndex) 
	 	{ 
		 var selval = selObj[selObj.selectedIndex].value; 
		 var selName = selObj.name; 
		 if (selval.toLowerCase() == "other")
		 	showOther(selName); 
		 else 
		 	hideOther(selObj); 
		}
		loadList(selObj, 'State');
	 }
	 
	 function showOther(selBox)
	 { 
	 	other = selBox + "_other"; 
	 	//document.forms["ContactForm"][other].value = "Specify"; 	
		if (document.getElementById && !document.all)
		{ 
		  document.getElementById(other).style.visibility = "visible";  
		} 
		 else if (document.all) 
			document.all[other].style.visibility = "visible";
	 } 
	 
	function hideOther(selBox)
	  { 
		 other = selBox.name + "_other";  
		 //document.forms["ContactForm"][other].value = ""; 
		 selBoxLength = selBox.length;
		 selBox[(selBoxLength - 1)].value = "other"; 
		 if (document.getElementById && !document.all)
			 document.getElementById(other).style.visibility = "hidden"; 
		 else if (document.all) 
		 	document.all[other].style.visibility = "hidden"; 	
	  } 
	  
    function updateSelect(selObj, val)
	  { 
	  	var selBoxLength = document.forms["ContactForm"][selObj].length; 
	  	document.forms["ContactForm"][selObj][(selBoxLength -1)].value = val; 
	  }
	  
function clearList(listName) 
  {  
  var opLength = document.forms["ContactForm"][listName].options.length
  for(var a = 0; a < opLength; a++)
  	 {
	 document.forms["ContactForm"][listName].options[0] = null;
	 }
  } 
  	
function noOptions(listName)
   {
   var opt = new Option
	    opt.value = "-:none:-"; 
		opt.text = "No Options"; 
		document.forms["ContactForm"][listName].options[0] = opt;
   }
   
function populateList(listVals, listName)
    {
	var opt = new Option
	    opt.value = "-:none:-"; 
		opt.text = "Please choose one..."; 
		document.forms["ContactForm"][listName].options[0] = opt;
	
	 var opt = new Option
	    opt.value = "-:none:-"; 
		opt.text = "- - - - - - - - - - - - - - - - - - - -"; 
		document.forms["ContactForm"][listName].options[1] = opt;
		
	
	for (var i = 0; i < listVals.length; i++) 
	  { 
	    var opt = new Option
	    opt.value = listVals[i]; 
		opt.text = listVals[i]; 
		document.forms["ContactForm"][listName].options[i+2] = opt;
	  } 	 
    } 
