//CODED BY MUTHU [THEX], BLACK BOX
//REFERENCES MADE FROM MOZILLA.COM, W3C

var IE, N, ver, useStnd;

//Browsers: NETSCAPE, COMMUNICATOR, GECKO <<>> IE, NEOPLANET, OPERA
function detectBrowser(){
	N = (navigator.appName.indexOf('Netscape') != -1 )?true:false;
	IE = (navigator.userAgent.indexOf("MSIE") != -1)?true:false;

	if(IE){
		var iepos = navigator.userAgent.indexOf('MSIE')
		ver = parseFloat(navigator.userAgent.substring(iepos+5,navigator.userAgent.indexOf(';',iepos)) );
	}
	if(N){
		ver = parseInt(navigator.appVersion.charAt(0));
	}
}
detectBrowser();
useStnd = ( ( N && (ver>=5) ) || ( IE && (ver>=5) )  )? true : false;

function IE4GetElementById(id){
	return document.all[id];
}
function NN4GetElementById(id){
	return document.layers[id];
}
if(!useStnd){
if(document.layers){
	document.getElementById = NN4GetElementById;
} else if(document.all && !document.getElementById){
	document.getElementById = IE4GetElementById;
}
}
function getStyleObject(id){
	var el = null, styleObj = null;	
	if(document.getElementById){
		el = document.getElementById(id);
	}	
	if(el){
		if(el.style){
			styleObj = el.style;
		} else if(document.layers){
			alert("Netscape 4");
			styleObj = el;
		}
	}


	return styleObj;
}
function getElementStyle(id, styl){
	var styleObj = getStyleObject(id);
	if(styleObj){
		if(styleObj[styl]){
			return styleObj[styl];
		}
	}
}

function setElementStyle(id, styl, val){
	var styleObj = getStyleObject(id);
	if(styleObj){
			styleObj[styl] = val;
	}
	
}
