_expanded_index = ['pro_concurrent', 'pro_nd', 'std_concurrent', 'upgrade_concurrent', 'pro_concur', 'pro_nondev'];
_expanded_value = [false, false, false, false, false, false];
_open_table_display_style = '';

function expand_table(_table_name) {
	_index = _expanded_index.indexOf(_table_name);
	if (_expanded_value[_index]) {
		$$('.' + _table_name + '_expandable').setStyle('display', 'none');
		$(_table_name + '_link').setProperty('html', 'Click here to show volume discounts and pack sizes');
	} else {
		$(_table_name + '_link').setProperty('html', 'Click here to hide volume discounts and pack sizes');
		//$$('.' + _table_name + '_expandable').tween('display', 'table-row');
		$$('.' + _table_name + '_expandable').setStyle('display', _open_table_display_style);
		
	}
	_expanded_value[_index] = !_expanded_value[_index];
}

function contract_tables() {
	_open_table_display_style = $$('.pro_concurrent_expandable').getStyle('display');
	if (_open_table_display_style.length > 0) {
		_open_table_display_style = _open_table_display_style[0];
	}
	$$('.pro_concurrent_expandable').setStyle('display', 'none');
	$$('.pro_concur_expandable').setStyle('display', 'none');
	$$('.pro_nd_expandable').setStyle('display', 'none');
	$$('.std_concurrent_expandable').setStyle('display', 'none');
	$$('.upgrade_concurrent_expandable').setStyle('display', 'none');
}

window.addEvent('domready', function() {
	contract_tables();
});

