
var isNS4 = false;
var isIE4 = false;
var isIE5 = false;
var isNS6 = false;
var isDOM = false;

isNS4 = (document.layers) ? true : false;
isIE4 = (document.all && !document.getElementById) ? true : false;
isIE5 = (document.all && document.getElementById) ? true : false;
isNS6 = (!document.all && document.getElementById) ? true : false;
isDOM = document.getElementById ? true : false;
isIE = (isIE4 | isIE5) ? true : false;

function is4DOMInit() {
}

function is4SetPx(eltid,eltprop,value) {
	if(isDOM) {
		document.getElementById(eltid).style[eltprop] = value + "px";
	} else if(isNS4) {
		document.layers[eltid][eltprop] = value;
	} else if(isIE4) {
		document.all[eltid][eltprop] = value;
	} 
}
	
function is4AvailWidth() {
	if(isDOM | isIE) return window.screen.availWidth;
	return 800;
}

function is4AvailHeight() {
	if(isDOM | isIE) return window.screen.availHeight;
	return 600;
}

function is4ElementByID(id) {
	if (isDOM) return document.getElementById(id);
	if (isNS4) return document.layers[id];
	if (isIE4) return document.all[id];
}	

function is4StyleByID(id) {
	if (isDOM) return document.getElementById(id).style;
	if (isNS4) return document.layers[id];
	if (isIE4) return document.all[id];
}	

