function Is() {
	var agent = navigator.userAgent.toLowerCase();
	this.major = parseInt(navigator.appVersion);
	this.minor = parseFloat(navigator.appVersion);
	this.ns  = ((agent.indexOf('mozilla')!=-1) && ((agent.indexOf('spoofer')==-1) && (agent.indexOf('compatible') == -1)));
	this.ns2 = (this.ns && (this.major == 3));
	this.ns3 = (this.ns && (this.major == 3));
	this.ns4 = (this.ns && (this.major >= 4));
	this.ie   = (agent.indexOf("msie") != -1);
	this.ie3  = (this.ie && (this.major == 2));
	this.ie4  = (this.ie && (this.major >= 4));
	this.op3 = (agent.indexOf("opera") != -1);
	this.dom = document.getElementById ? true:false;
}

function getObjectById(id) {
	var is = new Is();
	var obj;
	if(is.dom) obj = document.getElementById(id);
	else if(is.ie4) obj = document.all[id];
	else if(is.ns4) obj = document.layers[id];
	return obj;
}

function getParentObjById(id) {
	var is = new Is();
	var Obj;
	if(is.dom) Obj = parent.document.getElementById(id);
	else if(is.ie4) Obj = parent.document.all[id];
	else if(is.ns4) Obj = parent.document.layers[id];
	return Obj;
}

function getStyleById(id) {
	var is = new Is();
	var styleObj;
	if(is.dom) styleObj = document.getElementById(id).style;
	else if(is.ie4) styleObj = document.all[id].style;
	else if(is.ns4) styleObj = document.layers[id];
	return styleObj;
}
