/**
 * Due to the fact that IE6 is broken when it comes to CSS2 selectors
 * this function is called at every page render to force styling on
 * HTML elements.
 *
 * Uses jQuery.
 *
 * This allows to keep HTML templates cleaner, because we need to drop
 * CSS classes only on outside elements of template blocks.
 */
function __mptpsipFreshenCss()
{
	//file upload specific
	$(".dialog input[type=file]").attr("class", "textbox");

	//.form specific
	/*
	$(".content:first .form > tbody > tr > td:first-child").attr("class", "col0");
	$(".content:first .form > tbody > tr > td:first-child + td").attr("class", "col1");
	$(".dialog .form > tbody > tr > td:first-child").attr("class", "col0");
	$(".dialog .form > tbody > tr > td:first-child + td").attr("class", "col1");

	$(".content:first .formHighlight > tbody > tr > td:first-child").attr("class", "col0");
	$(".content:first .formHighlight > tbody > tr > td:first-child + td").attr("class", "col1");
	$(".dialog .formHighlight > tbody > tr > td:first-child").attr("class", "col0");
	$(".dialog .formHighlight > tbody > tr > td:first-child + td").attr("class", "col1");
	*/

	//.dataGrid specific
	/*
	$(".content:first .dataGrid tr:first-child").attr("class", "headerRow");
	$(".content:first .dataGrid tr:first-child ~ tr").attr("class", "row");
	$(".dialog .dataGrid tr:first-child").attr("class", "headerRow");
	$(".dialog .dataGrid tr:first-child ~ tr").attr("class", "row");
	*/

	//.pagedDataGrid specific
	/*
	$(".content:first .pagedDataGrid tr:first-child").attr("class", "pageRow");
	$(".content:first .pagedDataGrid tr:first-child + tr").attr("class", "headerRow");
	$(".content:first .pagedDataGrid tr:first-child + tr ~ tr").attr("class", "row");
	$(".dialog .pagedDataGrid tr:first-child").attr("class", "pageRow");
	$(".dialog .pagedDataGrid tr:first-child + tr").attr("class", "headerRow");
	$(".dialog .pagedDataGrid tr:first-child + tr ~ tr").attr("class", "row");
	*/

	//.tree specific
	/*
	$(".content:first .tree table.node > tbody > tr > td:first-child").attr("class", "arrow");
	$(".content:first .tree table.node > tbody > tr > td:first-child + td").attr("class", "data");
	$(".content:first .tree table.node > tbody > tr > td:first-child + td + td").attr("class", "buttons");
	$(".dialog .tree table.node > tbody > tr > td:first-child").attr("class", "arrow");
	$(".dialog .tree table.node > tbody > tr > td:first-child + td").attr("class", "data");
	$(".dialog .tree table.node > tbody > tr > td:first-child + td + td").attr("class", "buttons");
	*/

	// Set write window size
	if ($("#MasterControlPageContent"))
	{
		if ($("#MasterControlPageContent").height() < ($(window).height()-152) )
			$("#MasterControlPageContent").height($(window).height()-152);
	}
	
	if ($("#MasterControlGuest"))
	{
		if ($("#MasterControlGuest").height() < ($(window).height()-333) )
			$("#MasterControlGuest").height($(window).height()-333);
	}

};
