function ClearAll(){
// get all the input elements in the document
var input=document.getElementsByTagName('input') 	
// get all of the select tag elements
var selectList=document.getElementsByTagName('select')
//loop through all of the input types and clear them
for (i=0; i<input.length;i++) {
   if (input[i].getAttribute('type')=='checkbox') {					
		input[i].checked=false;}
   else if (input[i].getAttribute('type')=='text'){ 
		input[i].value="";}
   else if (input[i].getAttribute('type')=='radio'){ 
		input[i].checked=false;}}  
//loop through all the select boxes on the page and set all to false 
for (i=0; i<selectList.length; i++){
	// if the box allows for multiple secection then loop through and clear all selected
	if (selectList[i].multiple== true){
		var currentBox= selectList[i].options;
		for(j=0; j<currentBox.length; j++){
			currentBox[j].selected=false;}}
	// if the select is a single select then set the select to blank
   	else {
   		selectList[i].selectedIndex=-1;}} 
   
}
