var EllipsisText = (function(){

	if( document.getBoxObjectFor && window.openDialog){
    //return XUL label
		var $D = YAHOO.util.Dom;
		
		var d = document.createElement('div');
		var sNS = 'http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul';
		var xml =  document.createElementNS(sNS , 'window');
		var label = document.createElementNS(sNS, 'description');
        label.setAttribute('crop','end');
        //label.style.MozUserSelect = 'text';
        //label.style.backgroundColor = 'blue';
        //console.log( label.style.cssText );
        //console.log( label );
        
			xml.appendChild(label); 

		var fn = function(el){

			var xml2 =  xml.cloneNode(true);
			xml2.firstChild.setAttribute('value',el.textContent);
			el.innerHTML = '';
			el.appendChild(xml2);
		};
		
		
		var a = YAHOO.util.Dom.getElementsByClassName('ellipsis','div');
		for(var i=0;el=a[i];i++){
			fn(el);
		};

	}else{
		return function(){};
	};
	return fn;

})();