/*======================================================================
	prelim(str)
	
	Description: Object to hold the preliminary result data row.  Each row
	is consists of:
		propid,stnum,stnumext,street,unit,townname,[use] stateuse:short,price,date,presort
		
		str is the input "~" delimited string which has the above's format.
	     
====================================================================== */
function prelim(str) {
	var temp = str.split("~");;	
	this.propid = temp[0];
	this.stnum = temp[1];
	this.stnumext = temp[2];
	this.street = temp[3];
	this.unit = temp[4];
	this.townname = temp[5];
	this.use = temp[6];
	this.shortd = temp[7];
	this.price = temp[8];
	this.date = temp[9];
	this.inactvfl = temp[10];
	// Added Complevl - TKC - 10/27/2004
	this.complevl = temp[11];
	this.lat = temp[12];
	this.lon = temp[13];
	// Original Sort Order (Address Sort)...
	this.orgSort = temp[14];
	// Default to all selections are on...
	this.selection = true;
}
function fobj(str) {
	this.str = str;
}
// Function to make sure to place the '.' at the right space...
function decplac(num,digit) {
	var rt = num;
	var tmp, tmp1, tmp2;
	if (num == 0) {
		rt = "0.";
		for (var i=0;i<digit;i++) {
			rt += "0";
		}
		tmp2 = rt;
	} else {
		for (var i=0;i<digit;i++) {
			rt = rt * 10;
		}
		tmp = ""+Math.round(rt);
		tmp1 = tmp.length - digit;
		tmp2 = tmp.substring(0,tmp1) + "." + tmp.substring(tmp1);
	}
	
	return tmp2;
}

// Output the Header and Footer to the Browser
function prelimClientOutputHeader(searchtype) {
	//dDoc.writeln("<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">");
	dDoc.writeln("<HTML>");
	dDoc.writeln("	<HEAD>");
	dDoc.writeln("	<TITLE>RE Records Search</TITLE>");
	dDoc.writeln("	<LINK href=\"warrenstyle.css\" type=\"text/css\" rel=\"stylesheet\">");
	dDoc.writeln("	<script LANGUAGE=\"JavaScript\">");
	dDoc.writeln("	<!--");
	dDoc.writeln("	var rgQuickPage = /address_search.asp($|[?#])/i;");
	dDoc.writeln("	var rgAdvancedPage = /comparable_search.asp($|[?#])/i;");
	dDoc.writeln("	var rgNamePage = /name_search.asp($|[?#])/i;");
	dDoc.writeln("	var rgMortgagePage = /mortgage_search.asp($|[?#])/i;");
	dDoc.writeln("	var rgProximityPage = /radius.asp($|[?#])/i;");
	dDoc.writeln("	var rgAccountPage = /my_account.asp($|[?#])/i;");
	dDoc.writeln("	var pageImage;");
	dDoc.writeln("	var pageHref = new Object();");
	if (/^address$/i.test(searchtype))
		dDoc.writeln("	pageHref[\"address\"] = \"refine\"");
	else
		dDoc.writeln("	pageHref[\"address\"] = \"search\"");
	if (/^comparable$/i.test(searchtype))
		dDoc.writeln("	pageHref[\"comparable\"] = \"refine\"");
	else
		dDoc.writeln("	pageHref[\"comparable\"] = \"search\"");
	if (/^name$/i.test(searchtype))
		dDoc.writeln("	pageHref[\"name\"] = \"refine\"");
	else
		dDoc.writeln("	pageHref[\"name\"] = \"search\"");
	if (/^mortgage$/i.test(searchtype))
		dDoc.writeln("	pageHref[\"mortgage\"] = \"refine\"");
	else
		dDoc.writeln("	pageHref[\"mortgage\"] = \"search\"");
	if (/^radius$/i.test(searchtype))
		dDoc.writeln("	pageHref[\"radius\"] = \"search\"");
	else
		dDoc.writeln("	pageHref[\"radius\"] = \"search\"");
	dDoc.writeln("	if (document.images) {");
	dDoc.writeln("		//topbar images");
	dDoc.writeln("		img01 = new Image();");
	dDoc.writeln("		if (rgQuickPage.test(window.location)) {");
	dDoc.writeln("			img01.src = \"img/address_over.gif\";");
	dDoc.writeln("			pageImage = \"img01\";");
	dDoc.writeln("		}");
	dDoc.writeln("		else ");
	dDoc.writeln("			img01.src = \"img/address_on.gif\";");
	dDoc.writeln("		img012 = new Image();");
	dDoc.writeln("		img012.src = \"img/address_over.gif\";");
	dDoc.writeln("		img02 = new Image();");
	dDoc.writeln("		if (rgAdvancedPage.test(window.location)) {");
	dDoc.writeln("			img02.src = \"img/CompCustom_over.gif\";");
	dDoc.writeln("			pageImage = \"img02\";");
	dDoc.writeln("		}");
	dDoc.writeln("		else ");
	dDoc.writeln("			img02.src = \"img/CompCustom_on.gif\";");
	dDoc.writeln("		img022 = new Image();");
	dDoc.writeln("		img022.src = \"img/CompCustom_over.gif\";");
	dDoc.writeln("		img03 = new Image();");
	dDoc.writeln("		if (rgNamePage.test(window.location)) {");
	dDoc.writeln("			img03.src = \"img/name_over.gif\";");
	dDoc.writeln("			pageImage = \"img03\";");
	dDoc.writeln("			pageHref[\"name\"] = \"refine\"");
	dDoc.writeln("		}");
	dDoc.writeln("		else ");
	dDoc.writeln("			img03.src = \"img/name_on.gif\";");
	dDoc.writeln("		img032 = new Image();");
	dDoc.writeln("		img032.src = \"img/name_over.gif\";");
	dDoc.writeln("		img04 = new Image();");
	dDoc.writeln("		if (rgMortgagePage.test(window.location)) {");
	dDoc.writeln("			img04.src = \"img/mort_over.gif\";");
	dDoc.writeln("			pageImage = \"img04\";");
	dDoc.writeln("		}");
	dDoc.writeln("		else ");
	dDoc.writeln("			img04.src = \"img/mort_on.gif\";");
	dDoc.writeln("		img042 = new Image();");
	dDoc.writeln("		img042.src = \"img/mort_over.gif\";");
	dDoc.writeln("		img05 = new Image();");
	dDoc.writeln("		if (rgAccountPage.test(window.location)) {");
	dDoc.writeln("			img05.src = \"img/acct_over.gif\";");
	dDoc.writeln("			pageImage = \"img05\";");
	dDoc.writeln("		}");
	dDoc.writeln("		else");
	dDoc.writeln("			img05.src = \"img/acct_on.gif\";");
	dDoc.writeln("		img052 = new Image();");
	dDoc.writeln("		img052.src = \"img/acct_over.gif\";");
	dDoc.writeln("		img06 = new Image();");
	dDoc.writeln("		img06.src = \"img/contact_on.gif\";");
	dDoc.writeln("		img062 = new Image();");
	dDoc.writeln("		img062.src = \"img/contact_over.gif\";");
	dDoc.writeln("		img07 = new Image();");
	dDoc.writeln("		img07.src = \"img/help_on.gif\";");
	dDoc.writeln("		img072 = new Image();");
	dDoc.writeln("		img072.src = \"img/help_over.gif\";");
	dDoc.writeln("	}");
	dDoc.writeln("	function OnImage(name) {");
	dDoc.writeln("		if (document.images) {");
	dDoc.writeln("			fullname = eval(name + \"2\");");
	dDoc.writeln("			document[name].src = fullname.src;");
	dDoc.writeln("		}");
	dDoc.writeln("	}");
	dDoc.writeln("	function OffImage(name) {");
	dDoc.writeln("		if (document.images) {");
	dDoc.writeln("			fullname = eval(name);");
	dDoc.writeln("			if (fullname.complete) {");
	dDoc.writeln("				document[name].src = fullname.src;");
	dDoc.writeln("			}");
	dDoc.writeln("		}");
	dDoc.writeln("	}");
	dDoc.writeln("	function acctWin() {");
	dDoc.writeln("		var nWin = window.open(\"user_admin/user_login.asp\", \"acctwin\", \"height=480,width=640,resizable=1,scrollbars=1,status=1,toolbar=0,location=0,directories=0,menubar=0\");");
	//dDoc.writeln("		var nWin = window.open(\"https://rers.thewarrengroup.com/sor/user_admin/user_login.asp\", \"acctwin\", \"height=480,width=640,resizable=1,scrollbars=1,status=1,toolbar=0,location=0,directories=0,menubar=0\");");
	dDoc.writeln("		nWin.focus();");
	dDoc.writeln("		return false;");
	dDoc.writeln("	}");
	dDoc.writeln("	function printWin() {");
	dDoc.writeln("		var nWin = window.open(\"PrintResults.asp\", \"printWin\", \"height="+ window.screen.availHeight +",width="+ window.screen.availWidth +",top=0,left=0,resizable=1,scrollbars=1,status=1,toolbar=0,location=0,directories=0,menubar=1\");");
	dDoc.writeln("		nWin.focus();");
	dDoc.writeln("	}");
	dDoc.writeln("	function navTo(Url) {");
	dDoc.writeln("		if (pageHref[Url] == \"refine\")");
	//added 6 apr 2005 KEB Census
	/*dDoc.writeln("			parent.document.location = \"frame.asp?search=refine&chk_avm=\"+ clientObj.reportOptions['chk_avm'] +\"&chk_deedimage=\"+ clientObj.reportOptions['chk_deedimage'] +\"&chk_cp_nghbrhd=\"+ clientObj.reportOptions['chk_cp_nghbrhd'] +\"&chk_cp_Census=\"+ clientObj.reportOptions['chk_cp_Census']+\"&chk_cp_crime=\"+ clientObj.reportOptions['chk_cp_crime'] +\"&chk_cp_school=\"+ clientObj.reportOptions['chk_cp_school'] +\"&chk_gs=\"+ clientObj.reportOptions['chk_gs'];");*/
//	dDoc.writeln("			parent.document.location = \"frame.asp?search=refine&chk_avm=\"+ clientObj.reportOptions['chk_avm'] +\"&chk_cp_nghbrhd=\"+ clientObj.reportOptions['chk_cp_nghbrhd'] +\"&chk_cp_Census=\"+ clientObj.reportOptions['chk_cp_Census']+\"&chk_cp_crime=\"+ clientObj.reportOptions['chk_cp_crime'] +\"&chk_cp_school=\"+ clientObj.reportOptions['chk_cp_school'] +\"&chk_gs=\"+ clientObj.reportOptions['chk_gs'];");
	dDoc.writeln("			parent.document.location = \"frame.asp?search=refine\";");
	dDoc.writeln("		else");
	dDoc.writeln("			document.location = Url +\"_search.asp\";");
	dDoc.writeln("	}");
	dDoc.writeln("if (self.parent.clientf) var clientObj = self.parent.clientf;");
	dDoc.writeln("if (self.parent.data.clientp) var clientObj = self.parent.data.clientp;");
	dDoc.writeln("	//-->");
	dDoc.writeln("	</script>");
	dDoc.writeln("</head>");
	dDoc.writeln("<body marginheight=\"0\" topmargin=\"0\" marginwidth=\"0\" leftmargin=\"0\" onload=\"if(pageImage)OnImage(pageImage)\">");
	dDoc.writeln("<table width=\"500\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\" bgcolor=\"#ffffff\">");
	dDoc.writeln("	<tr>");
	dDoc.writeln("		<td valign=top>");
	dDoc.writeln("			<img src=\"img/banner_sm.jpg\" border=\"0\"><br>");
	dDoc.writeln("			<a href=\"JavaScript:navTo('address');\" ONMOUSEOVER=\"OnImage('img01');\" ONMOUSEOUT=\"OffImage('img01');\"><img name=\"img01\" src=\"img/address_on.gif\" bgcolor=\"#63516B\" border=\"0\" width=65 height=23></a><a href=\"JavaScript:navTo('comparable');\" ONMOUSEOVER=\"OnImage('img02');\" ONMOUSEOUT=\"OffImage('img02');\"><img name=\"img02\" src=\"img/CompCustom_on.gif\" bgcolor=\"#63516B\" border=\"0\"></a><a href=\"JavaScript:navTo('name');\" ONMOUSEOVER=\"OnImage('img03');\" ONMOUSEOUT=\"OffImage('img03');\"><img name=\"img03\" src=\"img/name_on.gif\" bgcolor=\"#63516B\" border=\"0\"></a><a href=\"JavaScript:navTo('mortgage');\" ONMOUSEOVER=\"OnImage('img04');\" ONMOUSEOUT=\"OffImage('img04');\"><img name=\"img04\" src=\"img/mort_on.gif\" bgcolor=\"#63516B\" border=\"0\"></a><img src=\"img/top_t.gif\" width=92 height=22 border=0><a href=\"JavaScript:void(acctWin())\" ONMOUSEOVER=\"OnImage('img05');\" ONMOUSEOUT=\"OffImage('img05');\"><img name=\"img05\" src=\"img/acct_on.gif\" bgcolor=\"#63516B\" border=\"0\"></a><a href=\"/contactus/contact_us.asp\" target=\"helpwin\" ONMOUSEOVER=\"OnImage('img06');\" ONMOUSEOUT=\"OffImage('img06');\"><img name=\"img06\" src=\"img/contact_on.gif\" bgcolor=\"#63516B\" border=\"0\"></a><a href=\"help/directory.asp\" target=\"helpwin\" ONMOUSEOVER=\"OnImage('img07');\" ONMOUSEOUT=\"OffImage('img07');\"><img name=\"img07\" src=\"img/help_on.gif\" bgcolor=\"#63516B\" border=\"0\"></a>");
	dDoc.writeln("		</td>");
	dDoc.writeln("	</tr>");
	dDoc.writeln("</table>");
	dDoc.writeln("<table align=\"left\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\" width=\"650\" bgcolor=\"#ffffff\">");
	dDoc.writeln("	<tr>");
	dDoc.writeln("		<td valign=top>");
}

function selectButton(typeLabel, paidResults) {
	if (paidResults) {
		switch (typeLabel) {
		case "Select All":
			var href = "href=\'JavaScript:void(parent.clientf.selectAll())\'";
			break;
		case "Clear All":
			var href = "href=\'JavaScript:void(parent.clientf.clearAll())\'";
			break;
		default:
			var href = "href=\'JavaScript:alert(\"No action specified.\")\'";
		}
	}
	else {
		switch (typeLabel) {
		case "Select All":
			var href = "href=\'JavaScript:void(parent.data.clientp.selectAll())\'";
			break;
		case "Clear All":
			var href = "href=\'JavaScript:void(parent.data.clientp.clearAll())\'";
			break;
		default:
			var href = "href=\'JavaScript:alert(\"No action specified.\")\'";
		}
	}
	if (document.all)
		return '<A style="BORDER-RIGHT: silver 1px solid; BORDER-TOP: silver 1px solid; FONT-WEIGHT: bold; FONT-SIZE: 11px; FILTER: progid:DXImageTransform.Microsoft.Gradient(GradientType=0, StartColorStr=\'#A0ffb001\', EndColorStr=\'#00000000\'); BORDER-LEFT: silver 1px solid; WIDTH: 82px; BACKGROUND-COLOR: #ffffff; COLOR: black; BORDER-BOTTOM: silver 1px solid; FONT-FAMILY: Arial; HEIGHT: 17px; TEXT-ALIGN: center; TEXT-DECORATION: none" '+ href +' width="82" height="17">'+ typeLabel +'</A>';
	else
		return '<A style="BORDER-RIGHT: silver 1px solid; BORDER-TOP: silver 1px solid; FONT-WEIGHT: bold; FONT-SIZE: 11px; BORDER-LEFT: silver 1px solid; WIDTH: 82px; BACKGROUND-COLOR: #ffb001; COLOR: black; BORDER-BOTTOM: silver 1px solid; FONT-FAMILY: Arial; HEIGHT: 17px; TEXT-ALIGN: center; TEXT-DECORATION: none" '+ href +' width="82" height="17">&nbsp;&nbsp;'+ typeLabel +'&nbsp;&nbsp;</A>';
}

function createLabelsButton() {
	if (document.all)
		return '<A style="BORDER-RIGHT: silver 1px solid; BORDER-TOP: silver 1px solid; FONT-WEIGHT: bold; FONT-SIZE: 11px; FILTER: progid:DXImageTransform.Microsoft.Gradient(GradientType=0, StartColorStr=\'#A0ffb001\', EndColorStr=\'#00000000\'); BORDER-LEFT: silver 1px solid; WIDTH: 92px; BACKGROUND-COLOR: #ffffff; COLOR: black; BORDER-BOTTOM: silver 1px solid; FONT-FAMILY: Arial; HEIGHT: 17px; TEXT-ALIGN: center; TEXT-DECORATION: none" href="JavaScript:void(document.forms[\'labeldbf\'].sel_dl.value = \'Create Labels\');void(document.forms[\'labeldbf\'].submit())" width="92" height="17">Create Labels</A>';
	else
		return '<A style="BORDER-RIGHT: silver 1px solid; BORDER-TOP: silver 1px solid; FONT-WEIGHT: bold; FONT-SIZE: 11px; BORDER-LEFT: silver 1px solid; WIDTH: 92px; BACKGROUND-COLOR: #ffb001; COLOR: black; BORDER-BOTTOM: silver 1px solid; FONT-FAMILY: Arial; HEIGHT: 17px; TEXT-ALIGN: center; TEXT-DECORATION: none" href="JavaScript:void(document.forms[\'labeldbf\'].sel_dl.value = \'Create Labels\');void(document.forms[\'labeldbf\'].submit())" width="92" height="17">&nbsp;&nbsp;Create Labels&nbsp;&nbsp;</A>';
}

function downloadFileButton() {
	if (document.all)
		return '<A style="BORDER-RIGHT: silver 1px solid; BORDER-TOP: silver 1px solid; FONT-WEIGHT: bold; FONT-SIZE: 11px; FILTER: progid:DXImageTransform.Microsoft.Gradient(GradientType=0, StartColorStr=\'#A0ffb001\', EndColorStr=\'#00000000\'); BORDER-LEFT: silver 1px solid; WIDTH: 90px; BACKGROUND-COLOR: #ffffff; COLOR: black; BORDER-BOTTOM: silver 1px solid; FONT-FAMILY: Arial; HEIGHT: 17px; TEXT-ALIGN: center; TEXT-DECORATION: none" href="JavaScript:void(document.forms[\'labeldbf\'].sel_dl.value = \'Download File\');void(document.forms[\'labeldbf\'].submit())" width="90" height="17">Download File</A>';
	else
		return '<A style="BORDER-RIGHT: silver 1px solid; BORDER-TOP: silver 1px solid; FONT-WEIGHT: bold; FONT-SIZE: 11px; BORDER-LEFT: silver 1px solid; WIDTH: 90px; BACKGROUND-COLOR: #ffb001; COLOR: black; BORDER-BOTTOM: silver 1px solid; FONT-FAMILY: Arial; HEIGHT: 17px; TEXT-ALIGN: center; TEXT-DECORATION: none" href="JavaScript:void(document.forms[\'labeldbf\'].sel_dl.value = \'Download File\');void(document.forms[\'labeldbf\'].submit())" width="90" height="17">&nbsp;&nbsp;Download File&nbsp;&nbsp;</A>';
}

function saveSelectedButton() {
	if (document.all)
		return '<A style="BORDER-RIGHT: silver 1px solid; BORDER-TOP: silver 1px solid; FONT-WEIGHT: bold; FONT-SIZE: 11px; FILTER: progid:DXImageTransform.Microsoft.Gradient(GradientType=0, StartColorStr=\'#A0ffb001\', EndColorStr=\'#00000000\'); BORDER-LEFT: silver 1px solid; WIDTH: 126px; BACKGROUND-COLOR: #ffffff; COLOR: black; BORDER-BOTTOM: silver 1px solid; FONT-FAMILY: Arial; HEIGHT: 17px; TEXT-ALIGN: center; TEXT-DECORATION: none" href="JavaScript:void(parent.clientf.saveSelected(document.forms[\'bundledreport\']))" width="126" height="17">Save Selected</A>';
	else
		return '<A style="BORDER-RIGHT: silver 1px solid; BORDER-TOP: silver 1px solid; FONT-WEIGHT: bold; FONT-SIZE: 11px; BORDER-LEFT: silver 1px solid; WIDTH: 126px; BACKGROUND-COLOR: #ffb001; COLOR: black; BORDER-BOTTOM: silver 1px solid; FONT-FAMILY: Arial; HEIGHT: 17px; TEXT-ALIGN: center; TEXT-DECORATION: none" href="JavaScript:void(parent.clientf.saveSelected(document.forms[\'bundledreport\']))" width="126" height="17">&nbsp;&nbsp;Save Selected&nbsp;&nbsp;</A>';
}

function multiPropertiesMapButton() {
	if (document.all)
		return '<A style="BORDER-RIGHT: silver 1px solid; BORDER-TOP: silver 1px solid; FONT-WEIGHT: bold; FONT-SIZE: 11px; FILTER: progid:DXImageTransform.Microsoft.Gradient(GradientType=0, StartColorStr=\'#A0ffb001\', EndColorStr=\'#00000000\'); BORDER-LEFT: silver 1px solid; WIDTH: 126px; BACKGROUND-COLOR: #ffffff; COLOR: black; BORDER-BOTTOM: silver 1px solid; FONT-FAMILY: Arial; HEIGHT: 17px; TEXT-ALIGN: center; TEXT-DECORATION: none" href="JavaScript:void(parent.clientf.multiPropertiesMap(document.forms[\'bundledreport\']))" width="126" height="17">COMP Map</A>';
	else
		return '<A style="BORDER-RIGHT: silver 1px solid; BORDER-TOP: silver 1px solid; FONT-WEIGHT: bold; FONT-SIZE: 11px; BORDER-LEFT: silver 1px solid; WIDTH: 126px; BACKGROUND-COLOR: #ffb001; COLOR: black; BORDER-BOTTOM: silver 1px solid; FONT-FAMILY: Arial; HEIGHT: 17px; TEXT-ALIGN: center; TEXT-DECORATION: none" href="JavaScript:void(parent.clientf.multiPropertiesMap(document.forms[\'bundledreport\']))" width="126" height="17">&nbsp;&nbsp;COMP Map&nbsp;&nbsp;</A>';
}

function getFullRecordsButton() {
	if (document.all)
		return '<A style="BORDER-RIGHT: silver 1px solid; BORDER-TOP: silver 1px solid; FONT-WEIGHT: bold; FONT-SIZE: 11px; FILTER: progid:DXImageTransform.Microsoft.Gradient(GradientType=0, StartColorStr=\'#A0ffd406\', EndColorStr=\'#00000000\'); BORDER-LEFT: silver 1px solid; WIDTH: 107px; BACKGROUND-COLOR: #ffffff; COLOR: black; BORDER-BOTTOM: silver 1px solid; FONT-FAMILY: Arial; HEIGHT: 17px; TEXT-ALIGN: center; TEXT-DECORATION: none" href="JavaScript:if(parent.display.document.forms[0].totalselections == undefined || parent.data.clientp.buy(document.forms[0]))void(document.forms[0].submit())" width="107" height="17">Get Full Records</A>';
	else
		return '<A style="BORDER-RIGHT: silver 1px solid; BORDER-TOP: silver 1px solid; FONT-WEIGHT: bold; FONT-SIZE: 11px; BORDER-LEFT: silver 1px solid; WIDTH: 107px; BACKGROUND-COLOR: #ffd406; COLOR: black; BORDER-BOTTOM: silver 1px solid; FONT-FAMILY: Arial; HEIGHT: 17px; TEXT-ALIGN: center; TEXT-DECORATION: none" href="JavaScript:if(parent.display.document.forms[0].totalselections == undefined || parent.data.clientp.buy(document.forms[0]))void(document.forms[0].submit())" width="107" height="17">&nbsp;&nbsp;Get Full Records&nbsp;&nbsp;</A>';
}

function printWinButton(printReady) {
	if (printReady)
		var href = "href=JavaScript:printWin()";
	else
		var href = "href=JavaScript:void(window.print())";
	if (document.all)
		return '<A style="BORDER-RIGHT: silver 1px solid; BORDER-TOP: silver 1px solid; FONT-WEIGHT: bold; FONT-SIZE: 11px; FILTER: progid:DXImageTransform.Microsoft.Gradient(GradientType=0, StartColorStr=\'#A0ffd406\', EndColorStr=\'#00000000\'); BORDER-LEFT: silver 1px solid; WIDTH: 41px; BACKGROUND-COLOR: #ffffff; COLOR: black; BORDER-BOTTOM: silver 1px solid; FONT-FAMILY: Arial; HEIGHT: 17px; TEXT-ALIGN: center; TEXT-DECORATION: none" '+ href +' width="41" height="17">Print</A>';
	else
		return '<A style="BORDER-RIGHT: silver 1px solid; BORDER-TOP: silver 1px solid; FONT-WEIGHT: bold; FONT-SIZE: 11px; BORDER-LEFT: silver 1px solid; WIDTH: 41px; BACKGROUND-COLOR: #ffd406; COLOR: black; BORDER-BOTTOM: silver 1px solid; FONT-FAMILY: Arial; HEIGHT: 17px; TEXT-ALIGN: center; TEXT-DECORATION: none" '+ href +' width="41" height="17">&nbsp;&nbsp;Print&nbsp;&nbsp;</A>';
}

function moveButtons(paidresults, bof, eof) {
	if (paidresults) {
		if (!bof) 
			dDoc.writeln("									<A "+ moveStyle() +" href=\"JavaScript:void(parent.clientf.movePrev())\" WIDTH=\"16\" HEIGHT=\"17\">&lt;</A>");
		else 
			dDoc.writeln("									<A "+ moveStyle() +" href=\"JavaScript:void(parent.clientf.warnBof())\" WIDTH=\"16\" HEIGHT=\"17\">&lt;</A>");
		if (!eof)
			dDoc.writeln("									<A "+ moveStyle() +" href=\"JavaScript:void(parent.clientf.moveNext())\" WIDTH=\"16\" HEIGHT=\"17\">&gt;</A>");
		else
			dDoc.writeln("									<A "+ moveStyle() +" href=\"JavaScript:void(parent.clientf.warnEof())\" WIDTH=\"16\" HEIGHT=\"17\">&gt;</A>");
	}
	else {
		if (!bof) 
			dDoc.writeln("									<A "+ moveStyle() +" href=\"JavaScript:void(parent.data.clientp.movePrev())\" WIDTH=\"16\" HEIGHT=\"17\">&lt;</A>");
		else 
			dDoc.writeln("									<A "+ moveStyle() +" href=\"JavaScript:void(parent.data.clientp.warnBof())\" WIDTH=\"16\" HEIGHT=\"17\">&lt;</A>");
		if (!eof)
			dDoc.writeln("									<A "+ moveStyle() +" href=\"JavaScript:void(parent.data.clientp.moveNext())\" WIDTH=\"16\" HEIGHT=\"17\">&gt;</A>");
		else
			dDoc.writeln("									<A "+ moveStyle() +" href=\"JavaScript:void(parent.data.clientp.warnEof())\" WIDTH=\"16\" HEIGHT=\"17\">&gt;</A>");
	}
}
function moveStyle() {
	if (document.all)
		return 'style="BORDER-RIGHT: silver 1px solid; BORDER-TOP: silver 1px solid; FONT-WEIGHT: bold; FONT-SIZE: 11px; FILTER: progid:DXImageTransform.Microsoft.Gradient(GradientType=0, StartColorStr=\'#A0ffb001\', EndColorStr=\'#00000000\'); BORDER-LEFT: silver 1px solid; WIDTH: 16px; BACKGROUND-COLOR: #ffffff; COLOR: black; BORDER-BOTTOM: silver 1px solid; FONT-FAMILY: Arial; HEIGHT: 17px; TEXT-ALIGN: center; TEXT-DECORATION: none"';
	else
		return 'style="BORDER-RIGHT: silver 1px solid; BORDER-TOP: silver 1px solid; FONT-WEIGHT: bold; FONT-SIZE: 11px; BORDER-LEFT: silver 1px solid; WIDTH: 16px; BACKGROUND-COLOR: #ffb001; COLOR: black; BORDER-BOTTOM: silver 1px solid; FONT-FAMILY: Arial; HEIGHT: 17px; TEXT-ALIGN: center; TEXT-DECORATION: none"';
}

//function clientPanel(paidresults, searchtype, pagesize, aveprice, totaveprice, dataArray, s1, s2, count, bof, eof, viewArray, outputselection, totalselections, sortArray, sortElement, sortDirection, checkall, reportOptions, sid, rsearch, distressedsearch, addr, criteria, formTag) {
function clientPanel(paidresults, searchtype, pagesize, aveprice, totaveprice, dataArray, s1, s2, count, bof, eof, viewArray, outputselection, totalselections, sortArray, sortElement, sortDirection, checkall, sid, rsearch, distressedsearch, addr, criteria, formTag) {

	// dDoc.writeln("<!-- " + formTag + " -->");
	var searchName;
	switch (searchtype) {
		case "xAddress":
			searchName = "Quick"; break;
		case "Comparable":
			searchName = "Comp/Custom"; break;
		default: 
			searchName = searchtype;
	}

	if (rsearch && parent.radiusCriteria) {
		dDoc.writeln("<form style=\"margin:0\" method=post action=radius.asp id=\"proximityForm\">");
		dDoc.writeln("<input type=hidden name=lat value="+ parent.radiusCriteria["lat"]+ ">");
		dDoc.writeln("<input type=hidden name=lon value="+ parent.radiusCriteria["lon"]+ ">");
		dDoc.writeln("<input type=hidden name=pid value=\""+ parent.radiusCriteria["pid"]+ "\">");
		dDoc.writeln("<input type=hidden name=addr value=\""+ parent.radiusCriteria["addr"]+ "\">");
		dDoc.writeln("<input type=hidden name=distance value="+ parent.radiusCriteria["distance"]+ ">");
		dDoc.writeln("<input type=hidden name=town value="+ parent.radiusCriteria["town"]+ ">");
		dDoc.writeln("<input type=hidden name=state value="+ parent.radiusCriteria["state"]+ ">");
		dDoc.writeln("<input type=hidden name=refine value=yes>");
		dDoc.writeln("</form>");
	}

	if (distressedsearch && parent.radiusCriteria) {
		dDoc.writeln("<form style=\"margin:0\" method=post action=distress_radius.asp id=\"proximityForm\">");
		dDoc.writeln("<input type=hidden name=lat value="+ parent.radiusCriteria["lat"]+ ">");
		dDoc.writeln("<input type=hidden name=lon value="+ parent.radiusCriteria["lon"]+ ">");
		dDoc.writeln("<input type=hidden name=pid value=\""+ parent.radiusCriteria["pid"]+ "\">");
		dDoc.writeln("<input type=hidden name=addr value=\""+ parent.radiusCriteria["addr"]+ "\">");
		dDoc.writeln("<input type=hidden name=distance value="+ parent.radiusCriteria["distance"]+ ">");
		dDoc.writeln("<input type=hidden name=town value="+ parent.radiusCriteria["town"]+ ">");
		dDoc.writeln("<input type=hidden name=state value="+ parent.radiusCriteria["state"]+ ">");
		dDoc.writeln("<input type=hidden name=refine value=yes>");
		dDoc.writeln("</form>");
	}

	dDoc.writeln("<table border=\"0\" bgcolor=\"#ffffff\" width=\"650\">");
	dDoc.writeln("	<tr>");
	dDoc.writeln("		<td>");
	dDoc.writeln("			<img src=\"img/t.gif\" width=\"8\" height=\"1\"><img src=\"img/blue_arrow_fwd.gif\" WIDTH=\"7\" HEIGHT=\"10\"><img src=\"img/blue_arrow_fwd.gif\" WIDTH=\"7\" HEIGHT=\"10\">");
//	if (rsearch) {
	// TKC - 1/20/2009 - Modified to include the distressed radius search
	if (rsearch) {
		if (parent.radiusCriteria) {
			dDoc.writeln("			<a class=\"reglinkb\" href=\"JavaScript:void(document.getElementById('proximityForm').submit())\">Back to Proximity Search</a> <img src=\"img/blue_arrow_fwd.gif\" WIDTH=\"7\" HEIGHT=\"10\"><img src=\"img/blue_arrow_fwd.gif\" WIDTH=\"7\" HEIGHT=\"10\">");
			//parent.radiusCriteria = undefined;
		}
	} else if (distressedsearch) {
		if (parent.radiusCriteria) {
			dDoc.writeln("			<a class=\"reglinkb\" href=\"JavaScript:void(document.getElementById('proximityForm').submit())\">Back to Find Foreclosures Search</a> <img src=\"img/blue_arrow_fwd.gif\" WIDTH=\"7\" HEIGHT=\"10\"><img src=\"img/blue_arrow_fwd.gif\" WIDTH=\"7\" HEIGHT=\"10\">");
		}	
	} else {
		dDoc.writeln("			<a class=\"reglinkb\" href=\"JavaScript:navTo('"+ searchtype.toLowerCase() +"')\">Back to "+ searchName +" Search</a> <img src=\"img/blue_arrow_fwd.gif\" WIDTH=\"7\" HEIGHT=\"10\"><img src=\"img/blue_arrow_fwd.gif\" WIDTH=\"7\" HEIGHT=\"10\">");
	}
	
	if (paidresults)
		dDoc.writeln("			<span class=\"medblackb\">Full Search Results</span>");
	else
		dDoc.writeln("			<span class=\"medblackb\">Free Search Results</span>");
//	if (rsearch) {
	// TKC - 1/20/2009 - Modified to include the distressed radius search
	if (rsearch || distressedsearch) {
		dDoc.writeln("			<br><img src=\"img/t.gif\" width=\"8\" height=\"1\"><span class=\"medblackb\">Starting Address:</span> <span class=\"medblack\">" + addr + "</span>");
	}
	if (paidresults)
		dDoc.writeln("			<br><img src=\"img/t.gif\" width=\"8\" height=\"1\"><span class=\"medblackb\">Your Criteria:</span> <span class=\"medblack\">"+pcSeparate(criteria)+"</span>");
	dDoc.writeln("		</td>");
	dDoc.writeln("	</tr>");
	dDoc.writeln("</table>");
	dDoc.writeln(formTag);
	dDoc.writeln("<table bgcolor=\"#ffffff\" width=\"650\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\">");
	dDoc.writeln("	<tr>");
	dDoc.writeln("		<td>&nbsp;&nbsp;</td>");
	dDoc.writeln("		<td valign=\"top\">");
	showReportOptions();
	dDoc.writeln("		</td>");
	dDoc.writeln("		<td valign=\"top\" cellspacing=\"2\" cellpadding=\"0\" bgcolor=\"#ffffff\" border=\"0\">");
	dDoc.writeln("			<table cellspacing=\"0\" cellpadding=\"1\" bgcolor=\"#ffffff\" border=\"0\">");
	dDoc.writeln("				<tr>");
	dDoc.writeln("					<td>");
	if (paidresults) {
		if (sid >= 0 && sid + 1 >= s1 && sid + 1 <= s2) {
			if (outputselection == 0)
				sPane(sid, sid+1, self.clientf.fAry[sid].pid, false);
			if (outputselection == 1)
				tPane(sid, sid+1, self.clientf.fAry[sid].pid, false);
			if ((outputselection == 2) || (outputselection == 3)) {
				fPane(sid, sid+1, self.clientf.fAry[sid].pid, false);
			}
		}
	}
	dDoc.writeln("						<table border=\"1\" bgcolor=\"#E6E4E6\" cellspacing=\"0\" cellpadding=\"0\" width=\"510\">");
	dDoc.writeln("							<tr>");
	dDoc.writeln("								<td valign=\"top\">");
	dDoc.writeln("									<span class=\"medblack\"><span class=\"medblackb\">Records</span> "+s1+" - "+s2+" <span class=\"medblackb\">of</span> "+count+"&nbsp;&nbsp;</span>");
	moveButtons(paidresults, bof, eof);
	dDoc.writeln("									<br>");
	dDoc.writeln("									<span class=\"smblackb\">");
	if (paidresults)
		dDoc.writeln("									Avg Last Sale Price of These Results: $"+ commaIn(parseInt(totaveprice)) +"<br>");
	dDoc.writeln("									Avg Last Sale Price From Free Results: $"+ commaIn(parseInt(aveprice)) +"<br><br>");
	dDoc.writeln("									Sort Results by:");
	if (paidresults)
		dDoc.writeln("									<select id=\"sortField\" class=\"smblack\" onchange=\"parent.clientf.setSort(this.options[this.selectedIndex].value, sortDirection.options[sortDirection.selectedIndex].value);\">");
	else
		dDoc.writeln("									<select id=\"sortField\" class=\"smblack\" onchange=\"parent.data.clientp.setSort(this.options[this.selectedIndex].value, sortDirection.options[sortDirection.selectedIndex].value);\">");
	for (i = 0; i < sortArray.length; i++) {
		if (i == sortElement)
			dDoc.writeln("										<option value=\""+ sortArray[i].value +"\" selected>"+ sortArray[i].name);
		else
			dDoc.writeln("										<option value=\""+ sortArray[i].value +"\">"+ sortArray[i].name);
	}
	dDoc.writeln("									</select>");
	dDoc.writeln("									&nbsp;Sort Order by:");
	if (paidresults)
		dDoc.writeln("									<select id=\"sortDirection\" class=\"smblack\" onchange=\"parent.clientf.setSort(sortField.options[sortField.selectedIndex].value, this.options[this.selectedIndex].value);\">");
	else		
		dDoc.writeln("									<select id=\"sortDirection\" class=\"smblack\" onchange=\"parent.data.clientp.setSort(sortField.options[sortField.selectedIndex].value, this.options[this.selectedIndex].value);\">");
	if (sortDirection) {
		dDoc.writeln("										<option value=\"descending\">Lo to Hi");
		dDoc.writeln("										<option selected value=\"ascending\">Hi to Lo");
	}
	else {
		dDoc.writeln("										<option selected value=\"descending\">Lo to Hi");
		dDoc.writeln("										<option value=\"ascending\">Hi to Lo");
	}
	dDoc.writeln("									</select>");
	if (paidresults) {
		dDoc.writeln("&nbsp;Display Mode: ");
		dDoc.writeln("<select id=\"displayMode\" name=\"views\" class=\"smblack\" onchange=\"parent.clientf.changeView1(displayMode.selectedIndex);\">");
		for (i = 0; i < viewArray.length; i++) {
			dDoc.write("<option value=\"" + i + "\"");
			if (i == outputselection) dDoc.write(" selected");
			dDoc.writeln(">" + viewArray[i]);
		}
		dDoc.writeln("</select>");
		dDoc.writeln("									</span>");
	}
	dDoc.writeln("								</td>");
	dDoc.writeln("							</tr>");
	dDoc.writeln("						</table>");
	dDoc.writeln("					</td>");
	dDoc.writeln("				</tr>");
	dDoc.writeln("			</table>");
	dDoc.writeln("			<table cellpadding=\"0\" bgcolor=\"#ffffff\" border=\"0\">");
	dDoc.writeln("				<tr>");
	if (paidresults) {
		dDoc.writeln("					<td align=\"left\" width=\"500\">");
		if (checkall)
			dDoc.writeln(selectButton("Clear All", 1));
		else
			dDoc.writeln(selectButton("Select All", 1));
		dDoc.writeln(saveSelectedButton());
		dDoc.writeln(createLabelsButton());
		dDoc.writeln(downloadFileButton());
		dDoc.writeln("						<img src=\"img/t.gif\" WIDTH=\"35\" HEIGHT=\"17\">");
		dDoc.writeln(printWinButton(1));
		// TKC - 5/4/2010 - multiproperties map is only available from radius or foreclosure radius search result
		if (rsearch || distressedsearch) {
			dDoc.writeln("<br/><img src=\"img/t.gif\" width=\"10\" height=\"5\"><br/>");
			dDoc.writeln(multiPropertiesMapButton());
			dDoc.writeln(" <a href=\"/sor/help/compmaps_help.asp\" target=\"helpwin\" class=\"reglinkb\">What's COMP Map?</a>");
		}
		dDoc.writeln("					</td>");
	}
	else {
		dDoc.writeln("					<td align=\"left\" width=\"500\">");
		if (checkall)
			dDoc.writeln(selectButton("Clear All", 0));
		else
			dDoc.writeln(selectButton("Select All", 0));
		dDoc.writeln("						<img src=\"img/t.gif\" width=\"154\" height=\"1\">");
		dDoc.writeln("						<img src=\"img/t.gif\" width=\"90\" height=\"1\">");
		dDoc.writeln(getFullRecordsButton());
		dDoc.writeln(printWinButton(0));
		dDoc.writeln("					</td>");
	}
	dDoc.writeln("				</tr>");
	dDoc.writeln("			</table>");
	if (paidresults) {
		if (sid >= 0 && sid < self.clientf.fAry.length)
			var pid = self.clientf.fAry[sid].pid;
		else
			var pid = "";
		if (outputselection == 0)
			sPane(s1-1, s2, pid, true);
		if (outputselection == 1)
			tPane(s1-1, s2, pid, true);
		if ((outputselection == 2) || (outputselection == 3)){
			fPane(s1-1, s2, pid, true);
			//********************************
			//KEB 22 July 2005 TT4711
			//fPane(s1-1, s2, pid, true,outputselection);
			//********************************
			}
		dDoc.writeln("						<table><tr><td></td></tr></table><table border=\"1\" width=\"520\" bgcolor=\"#E6E4E6\" cellspacing=\"0\" cellpadding=\"0\">");
		dDoc.writeln("							<tr>");
		dDoc.writeln("								<td valign=\"top\">");
		dDoc.writeln("									<span class=\"medblack\"><span class=\"medblackb\">Records</span> "+s1+" - "+s2+" <span class=\"medblackb\">of</span> "+count+"&nbsp;&nbsp;</span>");
		moveButtons(paidresults, bof, eof);
		dDoc.writeln("					</td>");
		dDoc.writeln("				</tr>");
		dDoc.writeln("			</table>");
	}
	else
		prelimClientOutputBody(dataArray, s1, s2)
	dDoc.writeln("		</td>");
	dDoc.writeln("	</tr>");
	dDoc.writeln("</table>");

	if (paidresults)
		dDoc.writeln("<input type=\"hidden\" name=\"totalselections\" value=\"\">");

	dDoc.writeln("</form>");
	
	if (paidresults) {
		dDoc.writeln("<form name=labeldbf action=\"\labeldbf.asp\" method=post>");
		dDoc.writeln("<input type=hidden name=totalselections value=\"" + totalselections + "\">");
		dDoc.writeln("<input type=hidden name=sel_dl>");
		dDoc.writeln("</form>");
	}

}

function showReportOptions() {
	dDoc.writeln("<script>");
	dDoc.writeln("if (self.parent.clientf) var clientObj = self.parent.clientf;");
	dDoc.writeln("if (self.parent.data.clientp) var clientObj = self.parent.data.clientp;");
	dDoc.writeln("</script>");
	dDoc.writeln("<table cellpadding=\"0\" cellspacing=\"0\" border=\"0\">");
	dDoc.writeln("    <tr>");
	dDoc.writeln("        <td>");
	dDoc.writeln("            <table width=\"130\" cellpadding=\"0\" cellspacing=\"1\" border=\"0\" bgcolor=\"white\">");
	dDoc.writeln("				<tr>");
	dDoc.writeln("					<td>");
	dDoc.writeln("<img src=\"/sor/img/freewithsub.gif\" border=\"0\">");
	dDoc.writeln("<img src=\"/sor/img/bingmapimage.gif\" border=\"0\">");
	dDoc.writeln("<a href=\"javascript:void(0);\" onClick=\"parent.TownstatsEmbeddedSearch();\"><img src=\"/sor/img/townstats.jpg\" border=\"0\"></a><br/>");
	dDoc.writeln("<a href=\"javascript:void(0);\" onClick=\"parent.FCstatsEmbeddedSearch();\"><img src=\"/sor/img/access_fcstats.gif\" border=\"0\"></a>");
	dDoc.writeln("</td>");
	dDoc.writeln("				</tr>");
//	dDoc.writeln("                <tr>");
//	dDoc.writeln("                    <td bgcolor=#faebd7>");
//	dDoc.writeln("                        <table align=\"left\">");
//	dDoc.writeln("                            <tr>");
//	dDoc.writeln("                                <td align=\"left\"><span class=\"medblackb\"><font color=#b8860b>Other Services:</font></span><br>");
//	dDoc.writeln("									<a class=\"bizlink\" href=\"http://www.warrengroupforeclosures.com/\" target=\"twgwin\">Foreclosures</a><br>");
//	dDoc.writeln("									<a class=\"bizlink\" href=\"http://www.thewarrengroup.com/portal/ProductsServices/MortgageMarketshare/tabid/140/Default.aspx\" target=\"twgwin\">Marketshare Reports</a><br>");
//	dDoc.writeln("									<a class=\"bizlink\" href=\"https://rers.thewarrengroup.com/cml/search.asp\" target=\"twgwin\">Build Your Own Lists</a><br>");
//	dDoc.writeln("									<a class=\"bizlink\" href=\"http://www.thewarrengroup.com/portal/AboutUs/GeographicCoverage/tabid/161/Default.aspx\" target=\"twgwin\">Geographic Coverage</a><br>	");
//	dDoc.writeln("								</td>");
//	dDoc.writeln("                            </tr>");
//	dDoc.writeln("                        </table>");
//	dDoc.writeln("                    </td>");
//	dDoc.writeln("                </tr>");
	dDoc.writeln("			</table>");
//	dDoc.writeln("			<br/>");
//	dDoc.writeln("            <table width=\"130\" cellpadding=\"0\" cellspacing=\"1\" border=\"0\">");
//	dDoc.writeln("				<tr>");
//	dDoc.writeln("					<td align=\"center\" valign=\"middle\">");
//	dDoc.writeln("					<a href=\"http://www.homesmartreports.com/mock088/defaultW.aspx\" target=\"homesmartwin\"><img src=\"/sor/img/rers_button_sm.gif\" border=\"0\"/></a>");
//	dDoc.writeln("					</td>");
//	dDoc.writeln("				</tr>");
//	dDoc.writeln("            </table>");
	dDoc.writeln("        </td>");
	dDoc.writeln("    </tr>");
	dDoc.writeln("</table>");
}
//
function checkedBox(value, defaultValue) {
	if (value == "on" || !value && defaultValue == "on")
		return " checked";
	else
		return "";
}

function prelimClientOutputFooter() {
	var tday = new Date();
	dDoc.writeln("	<table cellpadding=0 cellspacing=0 width=650>");
	dDoc.writeln("		<tr>");
	dDoc.writeln("			<td bgcolor=\"#003366\" align=\"right\">");
	dDoc.writeln("			<a class=\"footer\" href=\"/contactus/contact_us.asp\" target=\"helpwin\">Contact Us</a>");
	dDoc.writeln("			<span class=smwhite>|</span>");
	dDoc.writeln("			<a class=\"footer\" href=\"help/directory.asp\" target=\"helpwin\">Help</a>");
	dDoc.writeln("			<span class=smwhite>|</span>");
	dDoc.writeln("			<a class=\"footer\" href=\"help/privacy.asp\" target=\"_blank\">Security & Privacy Policy</a>");
	dDoc.writeln("			<span class=smwhite>|&nbsp;&copy; 1997-" + tday.getFullYear() + " The Warren Group&nbsp;&nbsp;</span>");
	dDoc.writeln("			</td>");
	dDoc.writeln("		</tr>");
	dDoc.writeln("	</table>");
	dDoc.writeln("		</td>");
	dDoc.writeln("	</tr>");
	dDoc.writeln("</table>");
	dDoc.writeln("</body>");
	dDoc.writeln("</HTML>");
}

function ErrorForm() {
	this.form = null;
	this.error = null;
	this.showErrorForm = function(target) {

		dDoc = display.document;

		dDoc.close();
		dDoc.open();

		// For compatibility and consistency
		if (parent.pwin != null) {
			parent.pwin.close();
			parent.pwin = null;
		}

		prelimClientOutputHeader("");
		
		dDoc.writeln("<table bgcolor=\"#ffffff\" width=\"650\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\">");
		dDoc.writeln("	<tr>");
		dDoc.writeln("		<td valign=\"top\" cellspacing=\"0\" cellpadding=\"0\" bgcolor=\"#ffffff\" border=\"0\">");
		dDoc.writeln("			<table cellspacing=\"0\" cellpadding=\"0\" bgcolor=\"#ffffff\" border=\"0\">");
		dDoc.writeln("				<tr>");
		dDoc.writeln("					<td>");
		
		dDoc.writeln("<br>");
		dDoc.writeln("<img src=\"img/t.gif\" height=\"1\" width=\"10px\"><span class=\"medblackb\">I'm sorry.  RERS has experienced an error while retrieving your result set:</span><br><br>");
		dDoc.writeln("<img src=\"img/t.gif\" height=\"1\" width=\"10px\"><span class=\"errormsg\">"+ this.error.description +"</span><br><br>");
		dDoc.writeln("<img src=\"img/t.gif\" height=\"1\" width=\"10px\"><span class=\"medblackb\">Some problems are intermitent depending on the nature of the error.</span><br>");
		dDoc.writeln("<img src=\"img/t.gif\" height=\"1\" width=\"10px\"><span class=\"medblackb\">If you would like to retry your search use the button below.</span><br>");
		dDoc.writeln("<img src=\"img/t.gif\" height=\"1\" width=\"10px\"><span class=\"medblackb\">If this problem persists please contact us.</span><br>");
		dDoc.writeln("<form target=\"data\" method=\"post\" action=\""+ target +"\">");
		for (var item in this.form) {
			dDoc.writeln("<input type=\"hidden\" name=\""+ item +"\" value=\""+ this.form[item] +"\">");
		}
		dDoc.writeln("<img src=\"img/t.gif\" height=\"1\" width=\"290px\">");
		if (document.all)
			dDoc.writeln('<A style="BORDER-RIGHT: silver 1px solid; BORDER-TOP: silver 1px solid; FONT-WEIGHT: bold; FONT-SIZE: 11px; FILTER: progid:DXImageTransform.Microsoft.Gradient(GradientType=0, StartColorStr=\'#A0ffb001\', EndColorStr=\'#00000000\'); BORDER-LEFT: silver 1px solid; WIDTH: 92px; BACKGROUND-COLOR: #ffffff; COLOR: black; BORDER-BOTTOM: silver 1px solid; FONT-FAMILY: Arial; HEIGHT: 17px; TEXT-ALIGN: center; TEXT-DECORATION: none" href="JavaScript:void(this.enabled = false);void(document.getElementById(\'displayNote\').innerHTML = \'Please wait ...\');void(document.forms[0].submit())" width="92" height="17">Retry</A>');
		else
			dDoc.writeln('<A style="BORDER-RIGHT: silver 1px solid; BORDER-TOP: silver 1px solid; FONT-WEIGHT: bold; FONT-SIZE: 11px; BORDER-LEFT: silver 1px solid; WIDTH: 92px; BACKGROUND-COLOR: #ffb001; COLOR: black; BORDER-BOTTOM: silver 1px solid; FONT-FAMILY: Arial; HEIGHT: 17px; TEXT-ALIGN: center; TEXT-DECORATION: none" href="JavaScript:void(this.enabled = false);void(document.getElementById(\'displayNote\').innerHTML = \'Please wait ...\');void(document.forms[0].submit())" width="92" height="17">&nbsp;&nbsp;Retry&nbsp;&nbsp;</A>');
		dDoc.writeln("</form>");
		dDoc.writeln("<img src=\"img/t.gif\" height=\"1\" width=\"10px\"><span id=\"displayNote\" class=\"medblackb\"></span>");
		dDoc.writeln("		</td>");
		dDoc.writeln("	</tr>");
		dDoc.writeln("</table>");
		
		prelimClientOutputFooter();
	
		dDoc.close();
			
	}
}
// Define some constants to be used throughout
var gAVFlagVirtual = "virtual"
var gAVFlagArchive = "archive"
var gAVFlagNone = "none"

