var isDOM = (typeof(document.getElementById) != 'undefined' && typeof(document.createElement) != 'undefined') ? 1 : 0;
var isIE4 = (typeof(document.all) != 'undefined' && parseInt(navigator.appVersion) >= 4) ? 1 : 0;
var isNS4 = (typeof(document.layers) != 'undefined') ? 1 : 0;
var isDHTML = (isDOM || isIE4 || isNS4) ? 1 : 0;
var capable = (isDOM || isIE4 || isNS4) ? 1 : 0;

// Uggly fix for Opera and Konqueror 2.2 that are half DOM compliant
if (capable) {
	if (typeof(window.opera) != 'undefined') {
		capable = 0;
	}
	else if (typeof(navigator.userAgent) != 'undefined') {
		var browserName = ' ' + navigator.userAgent.toLowerCase();
		if (browserName.indexOf('konqueror') > 0) {
			capable = 0;
		}
	} // end if... else if...
} // end if

//Récupère la node ou l'objet concerné
function getObject(id){
  if(!isDHTML)
    return null;

  var which=null;
  if(isDOM)
    which=document.getElementById(id);
  else if (isIE4)
    which=document.all(id);
  else if (isNS4)
    which=document.layers[id];
  return which;
}
