function validateOptions() {
	colorbuttons = document.getElementsByName('id[1]');
    
    if(colorbuttons.length > 0) {
	 var color_choice = false;
   	 for(counter=0; counter < colorbuttons.length; counter++) {

		// If a radio button has been selected it will return true
		// (If not it will return false)
		if (colorbuttons[counter].checked) {
		color_choice = true; 
		}
	}
} else {
	color_choice = true;
}
	
	
	sizebuttons = document.getElementsByName('id[2]');
    
    if(sizebuttons.length > 0) {
	 var size_choice = false;
   	 for(counter=0; counter < sizebuttons.length; counter++) {

		// If a radio button has been selected it will return true
		// (If not it will return false)
		if (sizebuttons[counter].checked) {
		size_choice = true; 
		}
	}
	} else {
		size_choice = true;
	}
	
			if (!color_choice && !size_choice) { 
			alert("Please select a size and color.")
			return (false);
			}
			
			if (!color_choice) { 
			alert("Please select a color.")
			return (false);
			}
			
			if (!size_choice) { 
			alert("Please select a size.")
			return (false);
			}
			
		return (true);
}