com = new Object();
com.st = new Object();
com.st.utils = new Object();
com.st.utils.isIE =function ()
{
	return(navigator.userAgent.indexOf("MSIE")>0)
}
com.st.utils.isSafari =function ()
{
	return(navigator.userAgent.indexOf("Safari")>0)
}
com.st.utils.isOldIE =function ()
{
	if(com.st.utils.isIE())
	{
		var v=navigator.userAgent.split("MSIE ");
		return parseFloat(v[1])<7;
	}
	return false;
}

com.st.utils.getAbsPos=function(obj)
{
	var top = obj.offsetTop;
	var left= obj.offsetLeft;
	var p=obj.offsetParent;
	while(p.tagName!="BODY"){
		if(p.tagName!="TR" && p.tagName!="P"){top += p.offsetTop;left +=  p.offsetLeft;
		}p=p.offsetParent;
	}return {x:left,y:top};
}
com.st.eventHandlerList = function()
{
	//alert();
	this.items= [];
}
com.st.eventHandlerList.prototype.add = function(evt,callback)
{
	var index=this.items.length;
	if(typeof(callback)=="function")
		this.items[index]= new com.st.eventHandler(evt,callback);
	else{
		if(typeof(callback)=="object")
		this.items[index]= evt;
	}
	return this.items[index];
}
com.st.eventHandlerList.prototype.remove = function(handler)
{
	for(i=0;i<this.items.length;i++)
	{
		if(this.items[i]==handler)
		{
			this.items.splice(i,1);
			break;
		}
	}
}
com.st.eventHandlerList.prototype.fire = function(evtname,e)
{
	for(i=0;i<this.items.length;i++)
	{
		var oHandler=this.items[i];
		if(oHandler.name==evtname)
		{
			if(e!=undefined)
				oHandler.callback(e);
			else
				oHandler.callback();
			break;
		}
	}
}
com.st.eventHandler = function(name,callback)
{
	this.name=name;
	this.callback=callback;
}