context: 		   	duplicateFieldGroup: function(e) {				var element  = wFORMS.helpers.getSourceElement(e);				if(!element) element = e								// override of the wFORMS.preserveRadioName property using a class on the repeat link.				var preserveRadioName = wFORMS.helpers.hasClass(element,wFORMS.className_preserveRadioName) ? true : wFORMS.preserveRadioName;				//wFORMS.debug('preserveRadioName='+preserveRadioName);								// Get Element to duplicate.				var element = element.parentNode;				while (element && !wFORMS.helpers.hasClass(element,wFORMS.className_repeat)) {					element = element.parentNode;				}					if (element) {					// Extract row counter information					counterField = document.getElementById(element.id + wFORMS.idSuffix_repeatCounter);					if(!counterField) return; // should not happen.					var rowCount = parseInt(counterField.value) + 1;					var maxField = document.getElementById(element.id + wFORMS.idSuffix_maxRepeat);					if(maxField)						var maxRow = parseInt(maxField.value) + 1;					else 						var maxRow = 9999;										if (rowCount < maxRow) 						this.className=wFORMS.className_duplicateLink;					else 														this.className=wFORMS.className_duplicateLinkHidden;					// Prepare id suffix					var suffix = "-" + rowCount.toString()					// duplicate node tree 					var dupTree = wFORMS.behaviors['repeat'].replicateTree(element, null, suffix, preserveRadioName);  //  sourceNode.cloneNode(true); 					// find insert point in DOM tree (after existing repeated element)					var insertNode = element.nextSibling;										while(insertNode && 						 (insertNode.nodeType==3 ||       // skip text-node that can be generated server-side when populating a previously repeated group 						  wFORMS.helpers.hasClass(insertNode,wFORMS.className_delete))) {												insertNode = insertNode.nextSibling;					}					element.parentNode.insertBefore(dupTree,insertNode);	 // Buggy rendering in IE5/Mac					// if(navigator.appVersion.indexOf("MSIE") != -1 && navigator.appVersion.indexOf("Windows") == -1)								//										// the copy is not duplicable, it's removeable					dupTree.className = element.className.replace(wFORMS.className_repeat,wFORMS.className_delete);					// Save new row count 								document.getElementById(element.id + wFORMS.idSuffix_repeatCounter).value = rowCount;					// re-add wFORMS behaviors					wFORMS.addBehaviors(dupTree);															if(wFORMS.behaviors['repeat'].onRepeat)						wFORMS.behaviors['repeat'].onRepeat(element,dupTree);				}				return wFORMS.helpers.preventEvent(e);			},
meta: 8955	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/8955/6d14c684dd8273f31809474ecd9367d1af1aa14e/wforms_repeat_limited.js/clean/trunk/src/wforms_repeat_limited.js