/**
 *
 */
function goTo(url)
{
	document.location.href = url;
}

/*
*/
function getCategories(id, obj)
{
	$.post(ROOT_PATH+'php/script/process.php', {'action': 'getCategories', 'id': id}, function(data)
	{
		obj.html(data);
	});
}

/*
*/
function getPages(id, obj)
{
	$.post(ROOT_PATH+'php/script/process.php', {'action': 'getPages', 'id': id}, function(data)
	{
		obj.html(data);
	});
}

/*
*/
function getLocations(parent_id, type, obj, first_option)
{
	$.post(ROOT_PATH+'php/script/process.php', {'action': 'getLocations', 'parent_id': parent_id, 'type': type, 'first_option' : first_option}, function(data)
	{
		obj.html(data);
	});
}

/*
*/
function getOpleidingen(parent_id, obj, first_option)
{
	$.post(ROOT_PATH+'php/script/process.php', {'action': 'getOpleidingen', 'parent_id': parent_id, 'first_option' : first_option}, function(data)
	{
		obj.html(data);
	});
}

/*
*/
function getStartdata(parent_id, type, obj)
{
	$.post(ROOT_PATH+'php/script/process.php', {'action': 'getStartdata', 'parent_id': parent_id, 'type': type}, function(data)
	{
		obj.html(data);
	});
}

/*
 */
$(document).ready(function()
{
	$('span.collapse').click(function()
	{
		var t = $(this);
		
		if(t.attr('rel') == 'block' || t.attr('rel') == null)
		{
			t.parent().find('.subnav_sub').hide();
			
			t.attr('rel', 'none').html('+');
		}
		else if(t.attr('rel') == 'none')
		{
			t.parent().find('.subnav_sub').show();
			
			t.attr('rel', 'block').html('-');
		};
});
});
