/**
 * On IE7 the document.getElementById method is buggy
 * it will return even meta tags that have the same 'name' attribute
 * what is not W3C compilant!
 * 
 * This method overrides (replaces) the default document.getElementById from IE
 * to work the way it was ment to 
 */
if (/MSIE/.test(navigator.userAgent)) {
	// overriding only IE
	document._getElementById = document.getElementById;
	document.getElementById = function(id) {
		var elem = document._getElementById(id);
		if (elem) {
			//make sure that it is a valid match on id
			if (elem.id == id) {
				return elem;
			} else {
				//otherwise find the correct element
				for (var i = 1; i < document.all[id].length; i++) {
					if (document.all[id][i].id == id) {
						return document.all[id][i];
					}
				}
			}
		}
		return null;
	};
}
