//This file depends on XslUtil.js having been included in the htm

///////////////////////////////////////////////////////////////////////////////
//this section is for the coverage
function rrAddStateEntry( stateName )
{
	document.write( "<TR>" );
	document.write(	"<TD CLASS=\"regtext\" BGCOLOR=\"#E1F4FD\" COLSPAN=\"3\"><B CLASS=\"whitetitle\">" + stateName + "</B></TD>" );
	document.write( "</TR>" );
}

function rrAddCountEntry( countName, realEstateTaxAssessorRecords, realEstateDeedRecords )
{
	if ( ( realEstateTaxAssessorRecords != null ) && ( realEstateTaxAssessorRecords != "" ) )
	{
		document.write( "<TR>" );
		document.write(	"<TD VALIGN=\"middle\" CLASS=\"regtext\" ALIGN=\"center\">&nbsp;</TD>" );
		document.write(	"<TD VALIGN=\"middle\" CLASS=\"regtext\" ALIGN=\"center\">&nbsp;</TD>" );
		document.write(	"<TD CLASS=\"regtext\">" + countName + "</TD>" );
		document.write( "</TR>" );
	}
}
///////////////////////////////////////////////////////////////////////////////

///////////////////////////////////////////////////////////////////////////////
//this section is for the style sheets
var rrNameTitle = "Name:";
var rrBuyerNameTitle = "Buyer Name:";
var rrSellerNameTitle = "Seller Name:";
var rrPrintPrefixNameValue = "";
var rrPrintOutNameTitle = true;
var rrPrintOutBuyerNameTitle = true;
var rrPrintOutBuyerAddrValue = false; //if set true must provide rrPrintOutBuyAddr
var rrPrintOutSellerNameTitle = true;

//This makes the assumption that buyer precedes seller and both exist in the xml
//otherwise the buyers address will be in the wrong place.
function rrPrintOutName( value )
{
	if ( ( rrPrintPrefixNameValue != null ) && ( rrPrintPrefixNameValue == "S" ) && rrPrintOutSellerNameTitle )
	{
		if ( rrPrintOutBuyerAddrValue )
		{
			rrPrintOutBuyerAddrValue = false;
			rrPrintOutBuyAddr();
		}
	}

	var localTitle = "&nbsp;";
	if ( ( rrPrintPrefixNameValue != null ) && ( rrPrintPrefixNameValue == "B" ) && rrPrintOutBuyerNameTitle )
	{
		localTitle = rrBuyerNameTitle;
		rrPrintOutBuyerNameTitle = false;
	}
	else if ( ( rrPrintPrefixNameValue != null ) && ( rrPrintPrefixNameValue == "S" ) && rrPrintOutSellerNameTitle )
	{
		localTitle = rrSellerNameTitle;
		rrPrintOutSellerNameTitle = false;
	}
	else if ( rrPrintOutNameTitle )
	{
		localTitle = rrNameTitle;
		rrPrintOutNameTitle = false;
	}

	xuAddHighlightedRow( localTitle, value );

	rrPrintOutNameTitle = false;
}

var rrShowAmpersand = false;
function rrPrintAmpersand()
{
	if ( rrShowAmpersand )
	{
		document.write( "&amp;" );
	}
	else
	{
		rrShowAmpersand = true;
	}
}
///////////////////////////////////////////////////////////////////////////////


