

function showProfileTab(tabName, templateId, params) {
	
	var urlToTab = false;
	
	if (templateId = 1) {
		var color = '#b0b0b0';
		var color_selected = '#b9002c';		
		var background = '#f2f2f2';
		var title_background = 'transparent url(/i/icons/kat_back.jpg) no-repeat';
		var background_selected = '#fff';		
		var border = '1px solid #e1e1e1';
		var border_selected = 'none';
	};	
	
	/*$('IMR').src = '/i/icons/icon_'+templateId+'_mr.png';
	$('IMG').src = '/i/icons/icon_'+templateId+'_mg.png';
	$('IMF').src = '/i/icons/icon_'+templateId+'_mf.png';
	$('IMT').src = '/i/icons/icon_'+templateId+'_mt.png';*/
	
	$('IMR').parentNode.parentNode.className = 'unselected';
	$('IMG').parentNode.parentNode.className = 'unselected';
	$('IMF').parentNode.parentNode.className = 'unselected';
	$('IMT').parentNode.parentNode.className = 'last';
	
	$('LMR').className = 'unselected';
	$('LMG').className = 'unselected';
	$('LMF').className = 'unselected';
	$('LMT').className = 'last';
	
	$('LMR').style.background = background;
	$('LMG').style.background = background;
	$('LMF').style.background = background;
	$('LMT').style.background = background;	
	
	$('LMR').style.borderBottom = border;
	$('LMG').style.borderBottom = border;
	$('LMF').style.borderBottom = border;
	$('LMT').style.borderBottom = border;

	/*$('AMR').style.color = color;
	$('AMG').style.color = color;
	$('AMF').style.color = color;
	$('AMT').style.color = color;*/
	
	
	if (tabName == 'mojerecenzje') {
		//$('IMR').src = '/i/icons/icon_'+templateId+'_mr_selected.png';
		$('IMR').parentNode.parentNode.className += ' selected';
		$('LMR').className = 'selected';
		$('LMR').style.background = background_selected;

		$('LMR').style.borderBottom = 'none';
		//$('AMR').style.color = color_selected;	
		
		var urlToTab = '/tworczosc/zakladkarecenzje/';
		if (params) urlToTab = urlToTab + params
	}
	
	if (tabName == 'mojegalerie') {
		//$('IMG').src = '/i/icons/icon_'+templateId+'_mg_selected.png';
		$('IMG').parentNode.parentNode.className += ' selected';
		$('LMG').className = 'selected';
		$('LMG').style.background = background_selected;
		$('LMG').style.borderBottom = 'none';
		//$('AMG').style.color = color_selected;
		
		var urlToTab = '/tworczosc/zakladkagalerie/';
		if (params) urlToTab = urlToTab + params
	}
	if (tabName == 'mojefilmy') {
		//$('IMF').src = '/i/icons/icon_'+templateId+'_mf_selected.png';	
		$('IMF').parentNode.parentNode.className += ' selected';
		$('LMF').className = 'selected';	
		$('LMF').style.background = background_selected;
		$('LMF').style.borderBottom = 'none';
		//$('AMF').style.color = color_selected;	
		
		var urlToTab = '/tworczosc/zakladkafilmy/';
		if (params) urlToTab = urlToTab + params
	}
	if (tabName == 'mojeteksty') {
		//$('IMT').src = '/i/icons/icon_'+templateId+'_mt_selected.png';
		$('IMT').parentNode.parentNode.className += ' selected';
		$('LMT').className += ' selected';
		$('LMT').style.background = background_selected;
		$('LMT').style.borderBottom = 'none';
		//$('AMT').style.color = color_selected;
		
		var urlToTab = '/tworczosc/zakladkateksty/';
		if (params) urlToTab = urlToTab + params
	}
	
	if (urlToTab) {
		$('ArtsTabsContainer').innerHTML = '<div class="center"><img src="/i/loading.gif" alt="loading..." title="loading..." class="loading" /></div>';
		new Ajax.Updater('ArtsTabsContainer', urlToTab, { method: 'get' });
	}
	
	return false;
}

function showCalendar(user,date,pack) {
	if (!pack) pack = 1;
	var urlToTab = '/kalendarium/wizytowka/uzytkownik/'+user+'/data/'+date+'/paczka/'+pack+'/';
	
	$('MyCalendarContainer').innerHTML = '<div class="center"><img src="/i/loading.gif" alt="loading..." title="loading..." class="loading" /></div>';
	new Ajax.Updater('MyCalendarContainer', urlToTab, { method: 'get' });	
}