<?php

require_once(ROOT . 'functions/func-filters.php');

if($aliases_arr[1] == '' ) {
	require_once(ROOT . 'modules/main/block-side.php');
}

if($aliases_arr[1] == 'tasks' OR $aliases_arr[1] == 'tasks-archive' OR $aliases_arr[1] == 'timeline'){
	require_once(ROOT . 'modules/tasks/block-side.php');
}

if($aliases_arr[1] == 'clients'){
	require_once(ROOT . 'modules/clients/block-side.php');
}

if($aliases_arr[1] == 'deals' OR $aliases_arr[1] == 'deals-archive' OR $aliases_arr[1] == 'payments'){
	require_once(ROOT . 'modules/deals/block-side.php');
}
if($aliases_arr[1] == 'users'){
	require_once(ROOT . 'modules/users/block-side.php');
}
if($aliases_arr[1] == 'vacations'){
	require_once(ROOT . 'modules/users/block-side.php');
}
if($aliases_arr[1] == 'events'){
	require_once(ROOT . 'modules/events/block-side.php');
}

if($aliases_arr[1] == 'letters'){
	require_once(ROOT . 'modules/letters/block-side.php');
} 
?>

<script type="text/javascript">
	$(document).ready(function() {
		function sorted(id){
			for(var c=document.getElementById(id),b=c.options,a=0;a<b.length;)
			if(b[a+1]&&b[a].text>b[a+1].text){c.insertBefore(b[a+1],b[a]);a=a>=1?a-1:a+1}else a++;
			b[0].selected=true; 
		};
		sorted("selectClient");
	});
</script>