function t_addListener ( node, sEventType, oFunction, bUseCapture ) { // add eventListener

		if ( document.addEventListener ) {
		  	node.addEventListener( sEventType, oFunction, bUseCapture );
		  	return true;
		} else if ( node.attachEvent ){
		  	var returnable = node.attachEvent ( "on" + sEventType, oFunction );
		  	return returnable;
		}
		else return;
} 

function t_removeListener ( node, sEventType, oFunction, bUseCapture ) { // remove eventListener

		if ( document.removeEventListener ) {
			node.removeEventListener ( sEventType, oFunction, bUseCapture );
			return true;
		} else if ( node.detachEvent ) {
			var returnable = node.detachEvent ( "on" + sEventType, oFunction );
			return returnable;
		}
		else return;
}

function t_infectNodeTree ( sFunction, node ) { // recursive infiltration of siblings and descendants

		var nextNode;
		next = node.firstChild;
		while ( next ) {
		        nextNode = next.nextSibling;
		        eval ( sFunction + "( next )" );
		        next = nextNode;
		}
}

function t_normalizeNodeTree ( node ) { // strip empty textnodes, matching mozilla to explorer
               
		if ( node.nodeType == 3 ) 
			if ( node.data.replace( /^[ \f\n\r\t\v]+/g, "") == "" ) 
				node.parentNode.removeChild ( node );
		t_infectNodeTree ( "t_normalizeNodeTree", node );
}

function t_computeStyle ( node , sStyle ) { // return computed style

		if ( document.defaultView ) 
			return document.defaultView.getComputedStyle ( node , null ).getPropertyValue( style );
		else if ( node.currentStyle ) 
			return eval ( "node.currentStyle." + sStyle );
		else return;
}

function t_globalLeft ( node ) { // return global x coordinate

		return ( document.all && !window.opera && node.tagName.indexOf ("t") == 0 ? 0 : node.offsetLeft ) 
		+ ( node.offsetParent && node.offsetParent.tagName != "html" ? t_globalLeft ( node.offsetParent ) : 0 );
}

function t_globalTop ( node ) { // return global y coordinate

  		return ( document.all && !window.opera && node.tagName.indexOf ("t") == 0 ? 0 : node.offsetTop ) 
		+ ( node.offsetParent && node.offsetParent.tagName != "html" ? t_globalTop ( node.offsetParent ) : 0 );
}

function t_getWindowXscroll () { // return horizontal scroll

		return window.pageXOffset || window.pageXOffset == 0 ? window.pageXOffset : 
		( document.body.scrollLeft + ( document.documentElement ? document.documentElement.scrollLeft : 0 ));
}

function t_getWindowYscroll () { // return vertical scroll

		return clientYscroll = window.pageYOffset ||window.pageYOffset == 0 ? window.pageYOffset : 
		( document.body.scrollTop + ( document.documentElement ? document.documentElement.scrollTop : 0 ));
}

function t_getWindowHeight () { // return client height

		return window.innerHeight ? window.innerHeight : document.body.clientHeight;
}

function t_getWindowWidth () { // return client width

		return window.innerWidth ? window.innerWidth : document.body.clientWidth;
}

function t_getWindowTop () { // return client top position

		return document.all ? window.screenTop : window.screenY;
}

function t_getWindowLeft () { // return client left position

		return document.all ? window.screenLeft : window.screenX;
}