rem:           if((id)&&((typeof id == "string")||(id instanceof String))){ if(!doc){ doc = dj_currentDocument; } var ele = doc.getElementById(id);  if(ele && (ele.id != id) && doc.all){ ele = null;  eles = doc.all[id]; if(eles){  if(eles.length){ for(var i=0; i<eles.length; i++){ if(eles[i].id == id){ ele = eles[i]; break; } }  }else{ ele = eles; } } 
add:           if((id)&&((typeof id == "string")||(id instanceof String))){ return (doc||dojo.doc()).getElementById(id); 
context: 	dojo.byId = function(/*String*/id, /*DocumentElement*/doc){		// summary:		// 		similar to other library's "$" function, takes a string		// 		representing a DOM id or a DomNode and returns the		// 		corresponding DomNode. If a Node is passed, this function is a		// 		no-op. Returns a single DOM node or null, working around		// 		several browser-specific bugs to do so.		// id: DOM id or DOM Node		// doc:		//		optional, defaults to the current value of dj_currentDocument.		//		Can be used to retreive node references from other documents.		if((id)&&((typeof id == "string")||(id instanceof String))){			if(!doc){ doc = dj_currentDocument; }			var ele = doc.getElementById(id);			// workaround bug in IE and Opera 8.2 where getElementById returns wrong element			if(ele && (ele.id != id) && doc.all){				ele = null;				// get all matching elements with this id				eles = doc.all[id];				if(eles){					// if more than 1, choose first with the correct id					if(eles.length){						for(var i=0; i<eles.length; i++){							if(eles[i].id == id){								ele = eles[i];								break;							}						}					// return 1 and only element					}else{						ele = eles;					}				}			}			return ele; // DomNode		}		return id; // DomNode	}
meta: 4497	/local1/tlutelli/issta_data/temp/all_js/javascript/2007_temp/2007/4497/44536367f321d7b97eafd67c4552cce1e020c9d4/hostenv_browser.js/buggy/_base/_loader/hostenv_browser.js