context: 			evaluate: function(node) {								// Repeatable element				if(wFORMS.helpers.hasClass(node, wFORMS.className_repeat)) {					//wFORMS.debug('evaluate/repeat: '+ node.id,3);				   					// Check if we have a 'repeat' link					if(!node.id) 						node.id = wFORMS.helpers.randomId();											// Check if we have a 'repeat' link					var repeatLink = document.getElementById(node.id + wFORMS.idSuffix_duplicateLink);					if(!repeatLink) {										// create the repeat link						repeatLink   = document.createElement("a"); 						var spanNode = document.createElement("span");  // could be used for CSS image replacement 						var textNode = document.createTextNode(wFORMS.arrMsg[0]);						repeatLink.setAttribute('href',"#");							repeatLink.className = wFORMS.className_duplicateLink;									repeatLink.setAttribute('title', wFORMS.arrMsg[1]);							// find where to insert the link						if(node.tagName.toUpperCase()=="TR") {							// find the last TD							var n = node.lastChild;								while(n && n.nodeType != 1)  								n = n.previousSibling;							if(n && n.nodeType == 1) 								n.appendChild(repeatLink);							// Else Couldn't find the TD. Table row malformed ?						} else							node.appendChild(repeatLink);													spanNode.appendChild(textNode); 						repeatLink.appendChild(spanNode); 					}					// Add hidden counter field if necessary					var counterField = document.getElementById(node.id + wFORMS.idSuffix_repeatCounter);					if(!counterField) {						// IE Specific :-(						if(document.all && !window.opera) { 							// see http://msdn.microsoft.com/workshop/author/dhtml/reference/properties/name_2.asp							var counterFieldId = node.id + wFORMS.idSuffix_repeatCounter;							if(navigator.appVersion.indexOf("MSIE") != -1 && navigator.appVersion.indexOf("Windows") == -1) // IE5 Mac								counterField   = document.createElement("INPUT NAME=\"" + counterFieldId + "\"");							else								counterField   = document.createElement("<INPUT NAME=\"" + counterFieldId + "\"></INPUT>"); 												counterField.type  ='hidden';							counterField.id    = counterFieldId; 							counterField.value = "1";						}						else {							counterField = document.createElement("INPUT"); 							counterField.setAttribute('type','hidden'); // hidden							counterField.setAttribute('value','1');							counterField.setAttribute('name', node.id + wFORMS.idSuffix_repeatCounter);							counterField.setAttribute('id', node.id + wFORMS.idSuffix_repeatCounter); 						}												// get the form element												var form = node.parentNode;						while(form && form.tagName.toUpperCase() != "FORM")							form = form.parentNode;												form.appendChild(counterField);					}										// Add event handler								wFORMS.helpers.addEvent(repeatLink,'click',wFORMS.behaviors['repeat'].duplicateFieldGroup);							}			 	  	// ------------------------------------------------------------------------------------------				// Removeable element				if(wFORMS.helpers.hasClass(node, wFORMS.className_delete)) {					var removeLink = document.createElement("a");					var spanNode   = document.createElement("span");  // could be used for CSS image replacement 					var textNode   = document.createTextNode(wFORMS.arrMsg[2]);					removeLink.setAttribute('href',"#");						removeLink.className = wFORMS.className_removeLink;					removeLink.setAttribute('title',wFORMS.arrMsg[3]);						// find where to insert the link					if(node.tagName.toUpperCase()=="TR") {						// find the last TD						var n = node.lastChild;							while(n && n.nodeType != 1)  							n = n.previousSibling;						if(n && n.nodeType == 1) 							n.appendChild(removeLink);						// Else Couldn't find the TD. Table row malformed ?					} else						node.appendChild(removeLink);					spanNode.appendChild(textNode); 					removeLink.appendChild(spanNode); 						wFORMS.helpers.addEvent(removeLink,'click',wFORMS.behaviors['repeat'].removeFieldGroup);							}	           	},
meta: 8955	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/8955/6d14c684dd8273f31809474ecd9367d1af1aa14e/wforms_repeat_php.js/clean/trunk/src/wforms_repeat_php.js