function setRequest(target_w, script_path_s, query_o, confirm_b, location_replace_b)
{
	/* create the location target object */
	var target_o = target_w ? target_w : document;

	if (target_o)
	{
		/* set the script path */
		var url_s = script_path_s ? script_path_s : 'main.php';

		var pair_s = '';

		/* create the query string */
		if (query_o)
		{
			for (var i_mixed in query_o)
			{
				pair_s = pair_s ? '&' : '?';
				pair_s += i_mixed + '=' + escape(query_o[i_mixed]);

				url_s += pair_s;
			}
		}

		/* confirm this action */
		if (confirm_b)
		{
			if (!confirm('Weet u zeker dat u deze actie wilt uitvoeren?'))
			{
				return;
			}
		}

		/* call the server action */
		if (location_replace_b)
		{
			target_o.location.replace(url_s);
		}
		else
		{
			target_o.location.href = url_s;
		}
	}
}

function setWindowOpen(name_s, script_path_s, query_o, property_o)
{
	/* set the script path */
	var url_s = script_path_s ? script_path_s : 'main.php';

	var pair_s = '';
	var property_s = 'width=,height=,top=,left=,toolbar=no,scrollbars=no,resizable=no,menubar=no,status=no,directories=no,location=no,';

	/* create the query string */
	if (query_o)
	{
		for (var i_mixed in query_o)
		{
			pair_s = pair_s ? '&' : '?';
			pair_s += i_mixed + '=' + query_o[i_mixed];

			url_s += pair_s;
		}
	}

	/* create the property string */
	if (property_o)
	{
		for (var i_mixed in property_o)
		{
			var current_regexp = new RegExp(i_mixed + '=.*?,', 'i');

			property_s = property_s.replace(current_regexp, i_mixed + '=' + property_o[i_mixed] + ',');
		}

		if (!property_o.top && !property_o.left)
		{
			if (property_o.width && property_o.height)
			{
				property_s = property_s.replace('top=', 'top=' + ((screen.height / 2) - (property_o.height / 2)));
				property_s = property_s.replace('left=', 'left=' + ((screen.width / 2) - (property_o.width / 2)));
			}
		}

		property_s = property_s.substring(0, property_s.length - 1);
	}

	/* open the window */
	return window.open(url_s, name_s, property_s);
}