jQuery.noConflict();

function showHideElement(id)
{
	var div;
	
	div = document.getElementById(id);

	if ( div.style.display != 'none' )
	{
		div.style.display = 'none';
	}
	else
	{
		div.style.display = '';
	}
	
}

function changeBg(id1, id2)
{
	var div1, div2;
	
	div1 = document.getElementById(id1);
	div2 = document.getElementById(id2);
	
	if ( div2.style.display == 'none' )
	{
		div1.style.background = 'url(../images/subcat-bg.gif)';
		div1.style.color = '#3f3f3f';
	}
	else
	{
		div1.style.background = 'url(../images/subcat-exp-bg.gif)';
		div1.style.color = '#ffffff';
	}
}

function changeTab(infoId, tabId)
	{
		var tab = document.getElementById(tabId);
		var tabinfo = document.getElementById(infoId);
		
		jQuery('#tabinfo1').hide('slow');
		jQuery('#tabinfo2').hide('slow');
		jQuery('#tabinfo3').hide('slow');
		jQuery('#tabinfo4').hide('slow');
		
		document.getElementById('tab1').style.background = 'url(../images/but-recent.gif)';
		document.getElementById('tab2').style.background = 'url(../images/but-popular.gif)';
		document.getElementById('tab3').style.background = 'url(../images/but-categories.gif)';
		document.getElementById('tab4').style.background = 'url(../images/but-addtip.gif)';
	
		jQuery('#' + infoId).show('slow');
		switch (tabId)
		{
			case 'tab1': tab.style.background = 'url(../images/but-p-recent.gif)';
				break;
			case 'tab2': tab.style.background = 'url(../images/but-p-popular.gif)';
				break;
			case 'tab3': tab.style.background = 'url(../images/but-p-categories.gif)';
				break;
			case 'tab4': tab.style.background = 'url(../images/but-p-addtip.gif)';
				break;
		}
	}