var node, i = 0; outer: while(node = candidateNodes[i++]){ var nodeClasses = dojo.html.getClasses(node); if(nodeClasses.length == 0){ continue outer; } var matches = 0;  for(var j = 0; j < nodeClasses.length; j++){ if(reClass.test(nodeClasses[j])){ if(classMatchType == dojo.html.classMatchType.ContainsAny){ nodes.push(node); continue outer; }else{ matches++; } }else{ if(classMatchType == dojo.html.classMatchType.IsOnly){ continue outer; } } }  if(matches == classes.length){ if(	(classMatchType == dojo.html.classMatchType.IsOnly)&& (matches == nodeClasses.length)){ nodes.push(node); }else if(classMatchType == dojo.html.classMatchType.ContainsAll){ nodes.push(node); } } } return nodes; } 
if(!useNonXpath && _document.evaluate) { var xpath = ". if(classMatchType != dojo.html.classMatchType.ContainsAny){ xpath += "concat(' ',@class,' '), ' " + classes.join(" ') and contains(concat(' ',@class,' '), ' ") + " ')"; if (classMatchType == 2) { xpath += " and string-length(@class)="+srtLength+"]"; }else{ xpath += "]"; } }else{ xpath += "concat(' ',@class,' '), ' " + classes.join(" ') or contains(concat(' ',@class,' '), ' ") + " ')]"; } var xpathResult = _document.evaluate(xpath, parent, null, XPathResult.ANY_TYPE, null); var result = xpathResult.iterateNext(); while(result){ try{ candidateNodes.push(result); result = xpathResult.iterateNext(); }catch(e){ break; } } return candidateNodes; }else{ if(!nodeType){ nodeType = "*"; } candidateNodes = parent.getElementsByTagName(nodeType);  var node, i = 0; outer: while(node = candidateNodes[i++]){ var nodeClasses = dojo.html.getClasses(node); if(nodeClasses.length == 0){ continue outer; } var matches = 0;  for(var j = 0; j < nodeClasses.length; j++){ if(reClass.test(nodeClasses[j])){ if(classMatchType == dojo.html.classMatchType.ContainsAny){ nodes.push(node); continue outer; }else{ matches++; } }else{ if(classMatchType == dojo.html.classMatchType.IsOnly){ continue outer; } } }  if(matches == classes.length){ if( (classMatchType == dojo.html.classMatchType.IsOnly)&& (matches == nodeClasses.length)){ nodes.push(node); }else if(classMatchType == dojo.html.classMatchType.ContainsAll){ nodes.push(node); } } } return nodes; } 
dojo.html.getElementsByClass = function(	/* string */classStr, 	/* HTMLElement? */parent, 	/* string? */nodeType, 	/* integer? */classMatchType, 	/* boolean? */useNonXpath){	//	summary	//	Returns an array of nodes for the given classStr, children of a	//	parent, and optionally of a certain nodeType	// FIXME: temporarily set to false because of several dojo tickets related	// to the xpath version not working consistently in firefox.	useNonXpath = false;	var _document = dojo.doc();	parent = dojo.byId(parent) || _document;	var classes = classStr.split(/\s+/g);	var nodes = [];	if( classMatchType != 1 && classMatchType != 2 ) classMatchType = 0; // make it enum	var reClass = new RegExp("(\\s|^)((" + classes.join(")|(") + "))(\\s|$)");	var srtLength = classes.join(" ").length;	var candidateNodes = [];		if(!useNonXpath && _document.evaluate) { // supports dom 3 xpath		var xpath = ".//" + (nodeType || "*") + "[contains(";		if(classMatchType != dojo.html.classMatchType.ContainsAny){			xpath += "concat(' ',@class,' '), ' " +			classes.join(" ') and contains(concat(' ',@class,' '), ' ") +			" ')";			if (classMatchType == 2) {				xpath += " and string-length(@class)="+srtLength+"]";			}else{				xpath += "]";			}		}else{			xpath += "concat(' ',@class,' '), ' " +			classes.join(" ') or contains(concat(' ',@class,' '), ' ") +			" ')]";		}		var xpathResult = _document.evaluate(xpath, parent, null, XPathResult.ANY_TYPE, null);		var result = xpathResult.iterateNext();		while(result){			try{				candidateNodes.push(result);				result = xpathResult.iterateNext();			}catch(e){ break; }		}		return candidateNodes;	//	NodeList	}else{		if(!nodeType){			nodeType = "*";		}		candidateNodes = parent.getElementsByTagName(nodeType);		var node, i = 0;		outer:		while(node = candidateNodes[i++]){			var nodeClasses = dojo.html.getClasses(node);			if(nodeClasses.length == 0){ continue outer; }			var matches = 0;				for(var j = 0; j < nodeClasses.length; j++){				if(reClass.test(nodeClasses[j])){					if(classMatchType == dojo.html.classMatchType.ContainsAny){						nodes.push(node);						continue outer;					}else{						matches++;					}				}else{					if(classMatchType == dojo.html.classMatchType.IsOnly){						continue outer;					}				}			}				if(matches == classes.length){				if(	(classMatchType == dojo.html.classMatchType.IsOnly)&&					(matches == nodeClasses.length)){					nodes.push(node);				}else if(classMatchType == dojo.html.classMatchType.ContainsAll){					nodes.push(node);				}			}		}		return nodes;	//	NodeList	}}
6315	/local1/tlutelli/issta_data/temp/all_js/javascript/2007_temp/2007/6315/2f1d2cb699c9d9329e8b782b0463156e211cb0f6/struts_dojo.js.uncompressed.js/buggy/src/main/resources/org/apache/struts2/static/dojo/struts_dojo.js.uncompressed.js