
// JavaScript Document

	var currTab = 1;

	function showPane(divname, action, domain, numbuttons) {

		//alert('debug: ' + divname + ' - ' + action + ' - ' + domain + ' - ' + numbuttons);
		// Hide current tab and content pane before showing newly selected content tab
		//$('commerceWidget_content' + currTab).hide();
		for (i = 1; i <= numbuttons; i++) {
			$('commerceWidget_button' + i + '_over').hide();
			}
		//$('commerceWidget_button' + currTab + '_over').hide();
		//$('commerceWidget_content1').appear({duration: 0.5});
		//$('commerceWidget_button' + divname).hide();
		$('commerceWidget_button' + divname + '_over').appear({duration: 0.5});


                if (currTab == 1) {
                        $('commerceWidget_button1').appear({duration: 0.5});

			}


		//document.getElementById('commerceWidget_content1').innerHtml = 'Loading......';

		currTab = divname;
		//setTimeout('addnum()', 250);
		new Ajax.Updater({success: 'commerceWidget_content1', failure: 'errorBox'}, 'http://' + domain + '/common/commerce_widget.php', {method : 'get', parameters: 'action=' + action, onFailure: showError()});
		// Set current tab index to selected tab index

	}

function showError() {
	document.getElementById('commerceWidget_content1').innerHtml = 'ERROR: Data is not available for this module';
	}

function addnum() {
	i = 4 + 5;
	}

