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) && (agent.indexOf('opera') == -1) && (agent.indexOf('webtv') == -1));
	this.ns2 = (this.ns && (this.major == 2));
	this.ns3 = (this.ns && (this.major == 3));
	this.ns4 = (this.ns && (this.major == 4));
	this.ns6 = (this.ns && (this.major >= 5));
	this.ie = (agent.indexOf("msie") != -1);
	this.ie3 = (this.ie && (this.major < 4));
	this.ie4 = (this.ie && (this.major == 4) &&
	(agent.indexOf("msie 5.0")   == -1));
	this.ie5 = (this.ie && (this.major == 4) &&
	(agent.indexOf("msie 5.0") != -1));
	this.ieX = (this.ie && !this.ie3 && !this.ie4);
}
var ns4 = (document.layers);
var ie4 = (document.all && !document.getElementById);
var ie5 = (document.all && document.getElementById);
var ns6 = (!document.all && document.getElementById);

var is = new Is();

function layerObject(id, left, top, width, height, visibility) {
	if (ie5||ns6) {
		this.obj = document.getElementById(id).style;
		this.obj.left = left;
		this.obj.top = top;
		this.obj.width = width;
		this.obj.height = height;
		this.obj.visibility = visibility;
		return this.obj;
	}
	else if(ie4) {
		this.obj = document.all[id].style;
		this.obj.left = left;
		this.obj.top = top;
		this.obj.width = width;
		this.obj.height = height;
		this.obj.visibility = visibility;
		return this.obj;
	}
	else if(ns4) {
		this.obj = document.layers[id];
		this.obj.left = left;
		this.obj.top = top;
		this.obj.width = width;
		this.obj.height = height;
		this.obj.visibility = visibility;
		return this.obj;
	}
}

function winResize() {
	if(ns4 ||ns6||ie4||ie5) {
		history.go(0);
	}
}

function GetElementLeft(eElement) {
	if (!eElement && this)
	{
		eElement = this;
	}
	var nLeftPos = eElement.offsetLeft;
	var eParElement = eElement.offsetParent;
	while (eParElement != null)
	{
		nLeftPos += eParElement.offsetLeft;
		eParElement = eParElement.offsetParent;
	}
	return nLeftPos;
}

function GetElementTop(eElement) {
	if (!eElement && this)
	{
		eElement = this;
	}
	var nTopPos = eElement.offsetTop;
	var eParElement = eElement.offsetParent;
	while (eParElement != null)
	{
		nTopPos += eParElement.offsetTop;
		eParElement = eParElement.offsetParent;
	}
	return nTopPos;
}

function hidedot(lay) {
	if (ie4) {
		document.all[lay].style.visibility = "hidden";
	}
	if (ns4) {
		document.layers[lay].visibility = "hide";
	}
	if (ns6||ie5) {
		document.getElementById([lay]).style.display = "none";
	}
}

function showdot(lay) {
	if (ie4) {
		document.all[lay].style.visibility = "visible";
	}
	if (ns4) {
		document.layers[lay].visibility = "show";
	}
	if (ns6||ie5) {
		document.getElementById([lay]).style.display = "block";
	}
}