Ext.ns('Ext.ux');
Ext.ux.iconMgr = function(iconName) {
	var ruleBodyTpl  = ' \n\r .{0} {  background-image: url({1}) !important; }';
	var styleSheetId = 'iconMgr_' + Ext.id();
	var styleSheet = Ext.get(Ext.util.CSS.createStyleSheet('/* iconMgr stylesheet */\n', styleSheetId));
	var imgExtension = (Ext.isIE6) ? '.gif' : '.png';
	return  {
		getIcon : function(iconPath, icon) {		
			var cls         = 'icon_' + Ext.id();
			var iconImgPath = iconPath + icon + imgExtension;
			var styleBody   = String.format(ruleBodyTpl, cls, iconImgPath);
			var styleSheet = Ext.get(styleSheetId);
			if (! Ext.isIE) {					
				styleSheet.dom.sheet.insertRule(styleBody, styleSheet.dom.sheet.cssRules.length);
			}
			else {
				document.styleSheets[styleSheetId].cssText += styleBody;
			}
			Ext.util.CSS.refreshCache();
			return(cls);
		}
	}
}();