function popClass(object)
{
	url = object.href
	window.open(url,'','width=800,height=600,resizable=yes');
	
	return false;
}

function popPreview(object)
{
	url = object.href
	window.open(url,'','width=980,height=600,resizable=yes,scrollbars=yes');
	
	return false;
}

function popWindow(object, width, height)
{
	url = object.href
	window.open(url,'','width='+width+',height='+height+',resizable=yes,scrollbars=yes');
	
	return false;
}


var productGroups = Array();

function toggleProductGroup(groupID, speed, state)
{
	if (groupID == undefined) return;
	
	if (speed == undefined || speed>750) speed = 750;
	
	if (state == undefined)
	{
		if (productGroups[groupID] == undefined) productGroups[groupID] = 'closed';
		
		state = 'open';
		if (productGroups[groupID] == 'open') state = 'closed';
	}
	productGroups[groupID] = state
	
	if (state == 'open')
	{
		$('#productGroup-'+groupID).slideDown(speed);
		$('#productGroup-expand-'+groupID).hide();
		$('#productGroup-compress-'+groupID).show();
	}
	else
	{
		$('#productGroup-'+groupID).slideUp(speed);
		$('#productGroup-expand-'+groupID).show();
		$('#productGroup-compress-'+groupID).hide();
	}
}

function showProductGroup(groupID, clearObject)
{
	if (groupID == undefined) return false;

	$('#productGroup-'+groupID).show();
	if (clearObject !== undefined) $(clearObject).html('').blur();
	
	return false;
}