rem: if(!radioNode.getAttribute('rel') || radioNode.getAttribute('rel').indexOf('wfHandled')==-1) { 
add: if(!radioNode.getAttribute('rel') || radioNode.getAttribute('rel').indexOf('wfHandledSync')==-1) { 
context: 		   evaluate: function(node) {               			    // Handle Sync Triggers				// add event handles and populate the wFORMS.syncTriggers 				// associative array (syncname->element Ids)				// ------------------------------------------------------------------------------------------								if (wFORMS.helpers.hasClassPrefix(node, wFORMS.classNamePrefix_sync)) {					if(!node.id) node.id = wFORMS.helpers.randomId();										//wFORMS.debug('sync/evaluate: '+ node.className + ' ' + node.tagName);										// Go through each class (one element can have more than one sync trigger).					var syncNames = wFORMS.behaviors['sync'].getSyncNames(node);					for(var i=0; i < syncNames.length; i++) {						if(!wFORMS.syncTriggers[syncNames[i]]) 							wFORMS.syncTriggers[syncNames[i]] = new Array();						if(!wFORMS.syncTriggers[syncNames[i]][node.id]) 							wFORMS.syncTriggers[syncNames[i]].push(node.id);						//wFORMS.debug('sync/evaluate: [trigger] '+ syncNames[i],3);					}					switch(node.tagName.toUpperCase()) {													case "OPTION":							// get the SELECT element							var selectNode = node.parentNode;							while(selectNode && selectNode.tagName.toUpperCase() != 'SELECT') {								var selectNode = selectNode.parentNode;							}							if(!selectNode) { alert('Error: invalid markup in SELECT field ?'); return false;  } // invalid markup							if(!selectNode.id) selectNode.id = wFORMS.helpers.randomId();							// Make sure we have only one event handler for the select.							if(!selectNode.getAttribute('rel') || selectNode.getAttribute('rel').indexOf('wfHandled')==-1) {								//wFORMS.debug('sync/add event: '+ selectNode.className + ' ' + selectNode.tagName);								selectNode.setAttribute('rel', (selectNode.getAttribute('rel')||"") + ' wfHandled');								wFORMS.helpers.addEvent(selectNode, 'change', wFORMS.behaviors['sync'].run);							}														break;						case "INPUT":														if(node.type && node.type.toLowerCase() == 'radio') {								// Add the onclick event on radio inputs of the same group								var formElement = node.form;									for (var j=0; j<formElement[node.name].length; j++) {									var radioNode = formElement[node.name][j];									// prevents conflicts with elements with an id = name of radio group									if(radioNode.type.toLowerCase() == 'radio') {										// Make sure we have only one event handler for this radio input.										if(!radioNode.getAttribute('rel') || radioNode.getAttribute('rel').indexOf('wfHandled')==-1) {																			wFORMS.helpers.addEvent(radioNode, 'click', wFORMS.behaviors['sync'].run);											// flag the node 											radioNode.setAttribute('rel', (radioNode.getAttribute('rel')||"") + ' wfHandled');										} 									}								}							} else if(node.type && node.type.toLowerCase() == 'text') {								wFORMS.helpers.addEvent(node, 'keyup', wFORMS.behaviors['sync'].run);							} else {								wFORMS.helpers.addEvent(node, 'click', wFORMS.behaviors['sync'].run);							}							break;						case "TEXTAREA":							wFORMS.helpers.addEvent(node, 'keyup', wFORMS.behaviors['sync'].run);							break;						default:									wFORMS.helpers.addEvent(node, 'click', wFORMS.behaviors['sync'].run);							break;					}				}								// Push targets in the wFORMS.syncTargets array 				// (associative array with syncname -> element ids)				// ------------------------------------------------------------------------------------------				if (wFORMS.helpers.hasClassPrefix(node, wFORMS.classNamePrefix_target)) {										if(!node.id) node.id = wFORMS.helpers.randomId();										// Go through each class (one element can be the target of more than one sync).					var syncNames = wFORMS.behaviors['sync'].getSyncNames(node);										for(var i=0; i < syncNames.length; i++) {						if(!wFORMS.syncTargets[syncNames[i]]) 							wFORMS.syncTargets[syncNames[i]] = new Array();						wFORMS.syncTargets[syncNames[i]].push(node.id);						//wFORMS.debug('sync/evaluate: [target] '+ syncNames[i],3);					}														}								if(node.tagName && node.tagName.toUpperCase()=='FORM') {					// function to be called when all behaviors for this form have been applied					//wFORMS.debug('sync/push init');					wFORMS.onLoadComplete.push(wFORMS.behaviors['sync'].init); 				}           },
meta: 8955	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/8955/6d14c684dd8273f31809474ecd9367d1af1aa14e/wforms_sync.js/buggy/trunk/src/wforms_sync.js