function intelliBtn (rowID, label, pState, pNorm, pDisable, pOvr, pDwn, pClk, fClk)
{
	this.cState = pState;
	if(typeof rowID == "object")
		var rowObj = rowID;
	else
		var rowObj = document.getElementById(rowID);
	if(rowObj)
	{
		cellObj = document.createElement("TD");
		rowObj.appendChild(cellObj);
		cellObj.innerHTML = "&nbsp;";
		cellObj = document.createElement("TD");
		this.pObj = cellObj;
		this.cNorm = pNorm;
		this.cDisable = pDisable;
		this.cOvr = pOvr;
		this.cDwn = pDwn;
		this.cClk = pClk;
		this.fClick = fClk;
					
		cellObj.width = 1; cellObj.noWrap = 'true';
		cellObj.innerHTML = "<DIV align='center' noWrap>&nbsp;"+label+"&nbsp;</DIV";
		if(this.cState)
			cellObj.className = this.cNorm;
		else
			cellObj.className = this.cDisable;
		
    	var thisObj = this;
		this.pObj.onmouseover = function () {if(thisObj.cState)thisObj.pObj.className = thisObj.cOvr;};
		this.pObj.onmouseout = function () {if(thisObj.cState)thisObj.pObj.className = thisObj.cNorm;};
		this.pObj.onmousedown = function () {if(thisObj.cState)thisObj.pObj.className = thisObj.cDwn;};
		this.pObj.onclick = function () {if(thisObj.cState) {
											thisObj.pObj.className = thisObj.cClk;
											eval(thisObj.fClick)(thisObj);};};
		rowObj.appendChild(this.pObj);
		cellObj = document.createElement("TD");
		rowObj.appendChild(cellObj);
		cellObj.innerHTML = "&nbsp;";
	}
}
intelliBtn.prototype.changeState = function(newState)
{
	this.cState = newState;
	if(newState) this.pObj.className = this.cNorm;
	else this.pObj.className = this.cDisable;
}
intelliBtn.prototype.changeColor = function(cls, newColor)
{
	eval("this."+cls+"=newColor");
}
