context: wFORMS.behaviors.calculation.instance.prototype.getValueFromClassName = function(element) {	switch(element.tagName) {		case "INPUT":			if(!element.className || element.className.indexOf(this.behavior.CHOICE_VALUE_SELECTOR_PREFIX)==-1) 				return null;			var value = element.className.split(this.behavior.CHOICE_VALUE_SELECTOR_PREFIX)[1].split(' ')[0];											if(element.type=='checkbox')				return element.checked?value:null;			if(element.type=='radio')				return element.checked?value:null;			return value;			break;		case "SELECT":					if(element.selectedIndex==-1) {									return null; 			} 			if(element.getAttribute('multiple')) {				var v=[];				for(var i=0;i<element.options.length;i++) {					if(element.options[i].selected) {						if(element.options[i].className && element.options[i].className.indexOf(this.behavior.CHOICE_VALUE_SELECTOR_PREFIX)!=-1) { 							var value = element.options[i].className.split(this.behavior.CHOICE_VALUE_SELECTOR_PREFIX)[1].split(' ')[0];															v.push(value);						}					}				}				if(v.length==0) return null;				return v;			}				if (element.options[element.selectedIndex].className &&  element.options[element.selectedIndex].className.indexOf(this.behavior.CHOICE_VALUE_SELECTOR_PREFIX)!=-1) { 				var value =  element.options[element.selectedIndex].className.split(this.behavior.CHOICE_VALUE_SELECTOR_PREFIX)[1].split(' ')[0];												return value;			}																break;		case "TEXTAREA":			if(!element.className || element.className.indexOf(this.behavior.CHOICE_VALUE_SELECTOR_PREFIX)==-1) 				return null;			var value = element.className.split(this.behavior.CHOICE_VALUE_SELECTOR_PREFIX)[1].split(' ')[0];														return value;			break;		default:			return null; 			break;	} 	 	return null; }
meta: 8955	/local1/tlutelli/issta_data/temp/all_js/javascript/2007_temp/2007/8955/b4c3f459a214f1abf932ebf4eecf8504548aeec6/wforms_calculation.js/clean/branches/3.0/wforms_calculation.js