Shenoa.RevealSetting = function(){
	var showproductel, logproductel, gridcontainerel, gridel;
	var basepath = document.location.pathname.substring(0,document.location.pathname.lastIndexOf('/')) ;

	return {
		init : function() {
			showproductel = Ext.get('show-product');
			logproductel = Ext.get('log-product');
			settingel = Ext.get('tabs-3');
			
		},
		showRing : function(diamondid,ringid) {
			
			//Shenoa.Tabs.updateChooseTabForce();
			
			// get update manager to refresh element using post
			var mgr = settingel.getUpdateManager();
			//var basepath = document.location.pathname.substring(0,document.location.pathname.lastIndexOf('/')) ;
						
			//mgr.update(thebase[0].href + "/selector/tab3.php", "diamondproductid="+diamondid+"&ringproductid="+ringid);
			
			mgr.update({url: basepath + "/tab3.php", params: {diamondproductid:diamondid, ringproductid:ringid}, scripts: true});

			
			new PeriodicalExecuter(hideAllTooltips, 2);
			
			// show product details
			//showproductel.fadeIn();
			
			
			
		},
		
		hideProduct : function() {
			showproductel.dom.style.display = 'none';
			gridel.dom.style.height = '250px';
			gridel.dom.style.visibility = 'visible';
			gridcontainerel.fadeIn();
		},
		addProduct : function() {
			Shenoa.Tabs.activateChooseTab(Shenoa.SelectedProductId); // set in grid.js
		}
	};
}();
Ext.onReady(Shenoa.RevealSetting.init, Shenoa.RevealSetting, true);