// JavaScript Document

//Detectar Browser y funcionalidad DHTML
DHTML = 0;
explorer5 = 0;
explorer4 = 0;
netscape4 = 0;

if (document.getElementById) {
	explorer5 = 1;
	DHTML = 1;
}

else if (document.all) {
	explorer4 = 1;
	DHTML = 1;
}

else {
	browserVersion = parseInt(navigator.appVersion);
	if ((navigator.appName.indexOf('Netscape') != -1) && (browserVersion == 4)) {
		netscape4 = 1;
		DHTML = 1;
	}
}

function returnObject(id, withStyle){
	if (explorer5)
		x = withStyle ? document.getElementById(id).style:document.getElementById(id);
	
	if (explorer4)
		x = withStyle ? document.all[id].style: document.all[id];
		
	if (netscape4)
		x = document.layers[id];
	
	return (x);
}

function detectDHTML(){
	return DHTML;
}