function toolbarCollapse(){
	toggleElement('toolbar-content',26,0,'open');
	if(toggledElm['toolbar-content'] == 'open')
	{
		$('toolbar-colapse').style.backgroundImage = 'url(images/toolbar_colapse.png)';
		$('toolbar-colapse').style.width = '21px';
		$('toolbar-colapse').style.height = '20px';
		$('toolbar-colapse').style.left = '10px';
		$('toolbar-colapse').style.top = '10px';
	}
	else
	{
		$('toolbar-colapse').style.backgroundImage = 'url(images/toolbar_expand.png)';
		$('toolbar-colapse').style.width = '5px';
		$('toolbar-colapse').style.height = '6px';
		$('toolbar-colapse').style.left = '5px';
		$('toolbar-colapse').style.top = '3px';
	}
}
function createStartToolbarButtons(button){
	if($(button.getAttribute('rel')+'-container').parentNode.id == 'hidden-components')
	{
		compOpened[button.getAttribute('rel')] = 'wrapper';
		button.style.color = '#FFFFFF';
		button.style.background = '#4d4d4d';
	}
	else
	{
		compOpened[button.getAttribute('rel')] = 'show';
		button.style.color = '#4d4d4d';
		button.style.background = '#1a1a1a';
	}
}
function toolbarLive(liveText){
	if(liveText.innerHTML == 'NOT LIVE')
	{
		liveText.innerHTML = 'LIVE';
		liveText.style.color = "#6cbc4c";
	}
	else if(liveText.innerHTML == 'LIVE')
	{
		liveText.innerHTML = 'STOP RECORDING';
		liveText.style.color = "#ec1c24";
	}
	else if(liveText.innerHTML == 'STOP RECORDING')
	{
		liveText.innerHTML = 'NOT LIVE';
		liveText.style.color = "#666666";
	}
}

// Fires the functions when the page finishes loading
window.addEvent('domready', function(){
	createSlider('toolbar-volume','horizontal',10);
	$$('.toolbar-buttons').each(function(tButton){
		createStartToolbarButtons(tButton);
	});
});