function reportContent(pageId, urlParams) {
	if ($('div#reportContent').length > 0) return closeReportContentWindow();

	var outer = $('<div id="reportContentOuter">');
	var div = $('<div id="reportContent">');
	var inner = $('<div id="reportContentInner">');
	var table = $('<table cellpadding="0" cellspacing="0">');
	var row1 = $('<tr>');
	var row2 = $('<tr>');
	var textarea = $('<textarea>');

	row1.append($('<td valign="top" width="50"></td>').html(reportContentTexts['reason']));
	row1.append($('<td>').append(textarea));

	row2.append($('<td></td>'));
	row2.append($('<td>').append(
		$('<input type="submit" id="reportContentSubmit" name="submit">').
			attr('value', reportContentTexts['submit']).
			click(function() {
				$('div#reportContent input').attr('disabled', 'disabled');
				$.ajax({
					type: "POST",
					url: "axml/reportcontent.xml",
					data: ({
						value: $('div#reportContent textarea').attr('value'),
						page: pageId,
						queryString: urlParams
					}),
					context: document.body,
					dataType: "xml",
					success: function(data, textStatus, XMLHttpRequest){
						// alert($(data).text());
					}
				});
				closeReportContentWindow();
			})
		).prepend(
			$('<input type="button" id="reportContentCancel" name="cancel">').
				attr('value', reportContentTexts['cancel']).
				click(function() {
					closeReportContentWindow();
				})
			)
	);

		
	table.append(row1);
	table.append(row2);

	inner.append($('<p>').html(reportContentTexts['reasontext']));
	inner.append($('<hr>'));
	inner.append(table);

	div.append($('<div id="reportContentTitle">').html(reportContentTexts['title']));
	div.append(inner);

	outer.click(function() {closeReportContentWindow()});

	$('body').append(outer);
	$('body').append(div);

	outer.fadeIn(400, function() {
	});

	div.fadeIn(200, function() {
		textarea.focus();
	});
}

function closeReportContentWindow() {
	$('div#reportContentOuter').fadeOut(200, function()
		{
			$(this).remove()
		});
	$('div#reportContent').remove();
}

