var xuDetailDataHeaderFooterWidth = "100%";
var xuDetailDataRecordWidth = "100%";
var xuFirstColumnDataRowWidth = "40%";
var xuSecondColumnDataRowWidth = "60%";
var xuRowColorToggle = true;

function xuCommonRecord()
{
	document.write( "<tr>" );
	document.write(	"<td colspan=\"5\">" );
	//Green/White Table
	document.write(		"<table bordercolor=\"#006699\" cellspacing=\"0\" cellpadding=\"0\" width=\"100%\" border=\"1\">" );
	document.write(			"<tr>" );
	document.write(				"<td bgcolor=\"##006699\" class=\"bldwhite11\">&nbsp;Detail Record</td>" );
	document.write(			"</tr>" );
	document.write(		"</table>" );
	//End Green/White Table
	document.write(	"</td>" );
	document.write( "</tr>" );
}

function xuOpenRecord()
{
	document.write( "<table cellspacing=\"0\" cellpadding=\"0\" width=\"100%\" border=\"0\" align=\"center\">" );
	xuCommonRecord();
}

function xuCloseRecord()
{
	document.write(    "<tr bgcolor=\"#ccffcc\">" );
	document.write(      "<td width=\"2\">&nbsp;</td>" );
	document.write(      "<td colspan=\"3\" class=\"boldtext11\">" );
	document.write(          "THIS DATA IS FOR INFORMATIONAL PURPOSES ONLY.  CERTIFICATION " );
	document.write(          "CAN ONLY BE OBTAINED THROUGH THE OFFICIAL GOVERNMENT AGENCY." );
	document.write(      "</td>" );
	document.write(    "</tr>" );
	document.write( "</table>" );
}

function xuDetailDataHeader()
{
}

function xuDetailDataFooter()
{
}

function xuAddRowWithColor( title, value, color )
{
	document.write(     "<tr>" );
	document.write(       "<td bgcolor=\"" + color + "\" width=\"2\">&nbsp;</td>" );
	document.write(       "<td bgcolor=\"" + color + "\" class=\"boldtext12\">" + title + "</td>" );
	document.write(       "<td bgcolor=\"" + color + "\" width=\"2\">&nbsp;</td>" );
	document.write(       "<td bgcolor=\"" + color + "\" width=\"" + xuSecondColumnDataRowWidth + "\" class=\"regtext11\">" );
	document.write(         "<font class=\"regtext\">" );
	document.write(           value );
	document.write(         "</font>" );
	document.write(       "</td>" );
	document.write(     "</tr>" );
}

function xuAddHighlightedRow( title, value )
{
	xuAddRowWithColor( title, value, "#ccffcc" );
}

function xuAddRow( title, value )
{
	if ( xuRowColorToggle )
	{
		xuAddRowWithColor( title, value, "#ffffff" );
		xuRowColorToggle = false;
	}
	else
	{
		xuAddRowWithColor( title, value, "#f1f1f1" );
		xuRowColorToggle = true;
	}
}

function xuCatAddrElement( thing )
{
	var returnMe = "";
	if ( ( thing != null ) && ( thing != "" ) )
	{
		returnMe += thing + "&nbsp;";
	}
	return returnMe;
}

function xuPrintOutAddr(	title, careof, house, house_a, predir, street, sttype, postdir, unit, city, state, zip, zipfour )
{
	if ( ( careof != ""	) || 
		  ( house != ""	) || 
		  ( house_a != "" ) ||
		  ( predir != ""	) || 
		  ( street != ""	) || 
		  ( sttype != ""	) || 
		  ( postdir != "" ) || 
		  ( unit != ""		) || 
		  ( city != ""		) || 
		  ( state != ""	) || 
		  ( zip != ""		) || 
		  ( zipfour != "" )
		)
	{
	if ( ( careof != ""	) || 
		  ( house != ""	) || 
		  ( house_a != "" ) ||
		  ( predir != ""	) || 
		  ( street != ""	) || 
		  ( sttype != ""	) || 
		  ( postdir != "" ) 
		)
		{
			var finalAddress = "";
			finalAddress += xuCatAddrElement( careof );
			finalAddress += xuCatAddrElement( house );
			finalAddress += xuCatAddrElement( house_a );
			finalAddress += xuCatAddrElement( predir );
			finalAddress += xuCatAddrElement( street );
			finalAddress += xuCatAddrElement( sttype );
			finalAddress += xuCatAddrElement( postdir  );
			finalAddress += "<br/>";
		}
		finalAddress += xuCatAddrElement( unit );
		finalAddress += xuCatAddrElement( city );
		finalAddress += xuCatAddrElement( state );
		finalAddress += xuCatAddrElement( zip );
		if ( ( zipfour != null ) && ( zipfour != "" ) )
		{
			finalAddress += "-";
			finalAddress += xuCatAddrElement( zipfour );
		}
		xuAddHighlightedRow( title, finalAddress );
	}
}

