  if((!node)||(!ref)||(!position)){ return false; } switch(position.toLowerCase()){ case "before": return dojo.dom.insertBefore(node, ref); case "after": return dojo.dom.insertAfter(node, ref); case "first": if(ref.firstChild){ return dojo.dom.insertBefore(node, ref.firstChild); }else{ ref.appendChild(node); return true; } break; default: ref.appendChild(node); return true; } 
  if((!node)||(!ref)||(!position)){ return false; } switch(position.toLowerCase()){ case "before": return dojo.dom.insertBefore(node, ref); case "after": return dojo.dom.insertAfter(node, ref); case "first": if(ref.firstChild){ return dojo.dom.insertBefore(node, ref.firstChild); }else{ ref.appendChild(node); return true; } break; default: ref.appendChild(node); return true; } 
dojo.dom.insertAtPosition = function(/*Node*/node, /*Node*/ref, /*string*/position){	//	summary:	//		attempt to insert node in relation to ref based on position	if((!node)||(!ref)||(!position)){ 		return false;	//	boolean 	}	switch(position.toLowerCase()){		case "before":			return dojo.dom.insertBefore(node, ref);	//	boolean		case "after":			return dojo.dom.insertAfter(node, ref);		//	boolean		case "first":			if(ref.firstChild){				return dojo.dom.insertBefore(node, ref.firstChild);	//	boolean			}else{				ref.appendChild(node);				return true;	//	boolean			}			break;		default: // aka: last			ref.appendChild(node);			return true;	//	boolean	}}
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