function objectControl(objectName)
{
	this.objectName = objectName;

	this.isIE = _objectControl_isIE;
	this.isNN = _objectControl_isNN4;
	this.isW3C = _objectControl_isW3C;

	this.getX = _objectControl_getX;
	this.getY = _objectControl_getY;
	this.setX = _objectControl_setX;
	this.setY = _objectControl_setY;

	this.getLink = _objectControl_getLink;
	this.getLinkPath = _objectControl_getLinkPath;
	this.getName = _objectControl_getName;

	this.clip = _objectControl_clip;
	this.show = _objectControl_show;
	this.hide = _objectControl_hide;
	this.display = _objectControl_display;
	this.getShowPath = _objectControl_getShowPath;
	this.getHidePath = _objectControl_getHidePath;
	
	this.underline = _objectControl_underline;
	this.bolden = _objectControl_bolden;
    this.cursive = _objectControl_cursive;
    this.overline = _objectControl_overline;

}


function _objectControl_isIE()
{
	if (document.all) return(true);
	return(false);
}

function _objectControl_isNN4()
{
	if (document.layers) return(true);
	return(false);
}

function _objectControl_isW3C()
{
	if (document.getElementById) return(true);
	return(false);
}

function _objectControl_getName()
{
	return(this.objectName);
}

function _objectControl_getLink()
{
	var link = null;

	link = eval(this.getLinkPath());

	return(link);
}

function _objectControl_getLinkPath()
{
	var link = null;

	if (this.isW3C())
	{
		link = 'document.getElementById("' + this.objectName + '")';
	} else
	if (this.isIE())
	{
		link = "document.all." + this.objectName;
	} else
	if (this.isNN4())
	{
		link = 'document.' + this.objectName;
	}


	return(link);
}

function _objectControl_getX()
{
	var offsetX = 0;

	targetLink = this.getLink();

	while (targetLink.offsetParent)
	{
		offsetX += targetLink.offsetLeft;
		targetLink = targetLink.offsetParent;
	}

	return(offsetX);
}

function _objectControl_getY()
{
	var offsetY = 0;

	targetLink = this.getLink();

	while (targetLink.offsetParent)
	{
		offsetY += targetLink.offsetTop;
		targetLink = targetLink.offsetParent;
	}

	return(offsetY);
}

function _objectControl_setX(newX)
{
	targetLink = this.getLink();
	targetLink.style.left = newX;
}

function _objectControl_setY(newY)
{
	targetLink = this.getLink();
	targetLink.style.top = newY;
}


function _objectControl_clip(top, right, bottom, left)
{
	var ref = this.getLink();

	if (this.isIE() || this.isW3C())
	{
		ref.style.clip = "rect(" + top + " " + right + " " + bottom + " " + left + ")";
	}
}


function _objectControl_show()
{
	var ref = this.getShowPath();
	eval(ref);
}

function _objectControl_display(newDisplay)
{
	var ref = this.getLink();
	
	if (this.isIE() || this.isW3C())
	{
		ref.style.display = newDisplay;
	} else if (this.NN4())
	{
        ref.display = newDisplay;
    }
}

function _objectControl_getShowPath()
{
	var ref = this.getLinkPath();

	if (this.isIE() || this.isW3C())
	{
		ref += '.style.visibility = "visible"';
	} else
	{
		if (this.NN4()) ref += '.visibility = "visible"';
	}

	return(ref);
}

function _objectControl_hide()
{
	var ref = this.getHidePath();
	eval(ref);
}

function _objectControl_getHidePath()
{
	var ref = this.getLinkPath();

	if (this.isIE() || this.isW3C())
	{
		ref += '.style.visibility = "hidden"';
	} else
	if (this.NN4())
	{
		ref += '.visibility = "hidden"';
	}

	return(ref);
}

function _objectControl_underline()
{
	var ref = this.getLink();

	if (this.isIE() || this.isW3C())
	{
        ref.style.textDecoration = (ref.style.textDecoration == "none") ? "underline" : "none";
    }
}    

function _objectControl_overline()
{
	var ref = this.getLink();

	if (this.isIE() || this.isW3C())
	{
        ref.style.textDecoration = (ref.style.textDecoration == "none") ? "overline" : "none";
    }
}

function _objectControl_cursive()
{
	var ref = this.getLink();

	if (this.isIE() || this.isW3C())
	{
        ref.style.fontStyle = (ref.style.fontStyle == "normal") ? "italic" : "normal";
    }
}

function _objectControl_bolden()
{
	var ref = this.getLink();

	if (this.isIE() || this.isW3C())
	{
        ref.style.fontWeight = (ref.style.fontWeight == "none") ? "bold" : "none";
    }
}