
/* This script and many more are available free online at
The JavaScript Source!! http://javascript.internet.com
Created by: Rick Johnson :: http://www.vistaviews.net/myPage/ */

function buildSelect(x) { //alert(x) ; //return

if (x == "12") { 
  /* set choices 1 and 2 */
  option0 = new Option("Please Select",0)
  option1 = new Option("Value 1",1)
  option2 = new Option("Value 2",2)
  // write them
  document.form1.fieldB.options[0] = option0
  document.form1.fieldB.options[1] = option1
  document.form1.fieldB.options[2] = option2
  return;
  }

if (x == "34") { 
  /* set choices 3 and 4 */ 
  option0 = new Option("Please Select",0)
  option1 = new Option("Value 3",1)
  option2 = new Option("Value 4",2)
  // write them
  document.form1.fieldB.options[0] = option0
  document.form1.fieldB.options[1] = option1
  document.form1.fieldB.options[2] = option2
  return;
  }
if (x == "00") { 
  /* set choices to none */ 
  option0 = new Option("None",0)
  option1 = new Option("",1)
  option2 = new Option("",2)
  // write them
  document.form1.fieldB.options[0] = option0
  document.form1.fieldB.options[1] = option1
  document.form1.fieldB.options[2] = option2
  return;
  } 
}

function buildcategories(x) {
	alert( x )
	}



/*<div align="center">
<form name="form1">
<select name="fieldB">
<option size="15">
</select>
<br>
<input type="radio" name="choice" onclick="buildSelect(12)"> Add choices 1 and 2   
<input type="radio" name="choice" onclick="buildSelect(34)"> Add choices 3 and 4<br>
<input type="radio" name="choice" onclick="buildSelect(00)">Clear all choices
</form>
</div>

<p><center>
<font face="arial, helvetica" size"-2">Free JavaScripts provided<br>
by <a href="http://javascriptsource.com">The JavaScript Source</a></font>
</center><p>
*/
