			

		// load custom tabs.
		var tabsUrl = "/assets/powder_coatings/scripts/color_swatches/data/color_tabs.json"+"?ts=" + (new Date()).getTime();
		var storeTabs = new dojo.data.ItemFileReadStore({url: tabsUrl} );
		
		// define the query criteria
		var queryByField = "color_type";
		var sortKeys = [{attribute: "name", descending: false}];
		
		// define the fetch parameters
		var fetchSwatchesArgs = 
		{
			queryOptions: {ignoreCase: true},
			query: { color_type: id, status: "active" },
			onComplete: gotData,
			onError: gotDataError,
			scope: dojo.global,
			sort:sortKeys
		}

		//  initialize the Dojo component.
		dojo.addOnLoad(function() {
			initDojo();
			
			tc = dijit.byId("swatchTC");
            tabListenerObj = dojo.connect(tc.tablist, 'onButtonClick', switchTab, 'loadContent');
			
		});
		