// aimsPrint.js
/*
*  JavaScript template file for ArcIMS HTML Viewer
*		dependent on aimsXML.js, ArcIMSparam.js, aimsCommon.js, aimsMap.js,
*		aimsLayers.js, aimsDHTML.js
*		aimsClick.js, aimsNavigation.js,
*		aimsLegend.js
*/

aimsPrintPresent=true;

var printTitle = titleList[4];
var printMapURL="";
var printOVURL="";
var printLegURL="";

var layout="";
var legVis2=false;
var aimsLegendPresent=false;
/*
***************************************************************************************

Print functions 

***************************************************************************************
*/


// display print form
function printIt() {
	hideLayer("measureBox");
	if (useTextFrame) {
		parent.TextFrame.document.location = "printform.htm";
	} else {
		var Win1 = open("printform.htm","PrintFormWindow","width=575,height=150,scrollbars=yes,resizable=yes");
	}
}

// display print page size form
function printpageform() {
	hideLayer("measureBox");
	if (useTextFrame) {
		parent.TextFrame.document.location = "printpageform.htm";
	} else {
		var Win1 = open("printpageform.htm","PrintFormWindow","width=575,height=150,scrollbars=yes,resizable=yes");
	}
}


// create web page for printing
	// first get Map
function getPrinaMap(title) {
	showRetrieveMap();
	printTitle=title;
	var tempWidth = iWidth;
	var tempHeight = iHeight;
	iWidth=746;
	iHeight=543;
	layout=2;
	legVis2=legendVisible;
	if (aimsLegendPresent) legendVisible=true;
	var theString = writeXML();
	iWidth=tempWidth;
	iHeight = tempHeight;
	legendVisible = legVis2;
	sendToServer(imsURL,theString,101);
	tempWidth=null;
	tempHeight=null;
	theString=null;
}



// create web page for printing
	// first get Map
function getPrinbMap(title) {
	showRetrieveMap();
	printTitle=title;
	var tempWidth = iWidth;
	var tempHeight = iHeight;
	iWidth=746;
	iHeight=543;
	layout=1;
	legVis2=legendVisible;
	if (aimsLegendPresent) legendVisible=true;
	var theString = writeXML();
	iWidth=tempWidth;
	iHeight = tempHeight;
	legendVisible = legVis2;
	sendToServer(imsURL,theString,101);
	tempWidth=null;
	tempHeight=null;
	theString=null;
}

// create web page for printing
	// first get Map
function getPrincMap(title) {
	showRetrieveMap();
	printTitle=title;
	var tempWidth = iWidth;
	var tempHeight = iHeight;
	iWidth=750;
	iHeight=750;
	layout=3;
	legVis2=legendVisible;
	if (aimsLegendPresent) legendVisible=true;
	var theString = writeXML();
	iWidth=tempWidth;
	iHeight = tempHeight;
	legendVisible = legVis2;
	sendToServer(imsURL,theString,101);
	tempWidth=null;
	tempHeight=null;
	theString=null;
}




// create web page for printing
	// first get Map
function getPrindMap(title) {
	showRetrieveMap();
	printTitle=title;
	var tempWidth = iWidth;
	var tempHeight = iHeight;
	iWidth=1000;
	iHeight=700;
	layout=4;
	legVis2=legendVisible;
	if (aimsLegendPresent) legendVisible=true;
	var theString = writeXML();
	iWidth=tempWidth;
	iHeight = tempHeight;
	legendVisible = legVis2;
	sendToServer(imsURL,theString,101);
	tempWidth=null;
	tempHeight=null;
	theString=null;
}







// second, get OVMap
function getPrintOV() {
	var tempWidth = i2Width;
	var tempHeight = i2Height;
	i2Width=250;
	i2Height=150;
	var tempDraw=drawOVExtentBox;
	drawOVExtentBox=true;
	var theString = writeOVXML();
	drawOVExtentBox=tempDraw;
	i2Width=tempWidth;
	i2Height = tempHeight;
	sendToServer(imsOVURL,theString,102);
	tempWidth=null;
	tempHeight=null;
	theString=null;
}
// third, get Legend
function getPrintLegend() {
	//  waiting for Legend tags
	if (printLegURL=="") printLegURL = "images/nolegend.gif";
	writePrintPage();
}
// fourth, write the web page
function writePrintPage() {
	var Win1 = open("","PrintPage");
	//Win1.document.open();
	Win1.document.writeln('<html><meta http-equiv="Content-Type" content="text/html; charset=' + charSet + '"><head>');
	Win1.document.writeln('	<title>' + titleList[5] + '</title>');
		Win1.document.writeln('</head><script language="JavaScript">');
Win1.document.writeln('setTimeout("self.focus()",2);');
Win1.document.writeln('</script>');
	Win1.document.writeln('<body BGCOLOR="White" TEXT="Black" LEFTMARGIN=0 TOPMARGIN=0>');

	




Win1.document.writeln('<TABLE CELLPADDING=0 CELLSPACING=0 BORDER=0><TR><TD>');










	if (layout==1) {



Win1.document.writeln('<TABLE WIDTH="665" BORDER="1" CELLSPACING="0" CELLPADDING="0" NOWRAP>');
	Win1.document.writeln('	<TR>');
	Win1.document.writeln('		<TH COLSPAN="2"><IMG SRC="http://www.showmeboone.com/GIS/viewers/bc_ortho_app_v2/images/clearlogo.gif" width="75" align="left" BORDER=0 ALT=""><font size=+3>' + printTitle + ' <br><font size=+1>Prepared by the Boone County Clerk<br> 573-886-4375 </TH>');
	Win1.document.writeln('	</TR>');
	Win1.document.writeln('	<TR>');

	Win1.document.writeln('<TD>');
	Win1.document.writeln('			<center><IMG SRC="' + printMapURL + '" width=665 HSPACE=0 VSPACE=0 BORDER=0 ALT="">');


	

Win1.document.writeln('<table border=0 width=665><tr><td width=150><center><img src="http://www.showmeboone.com/GIS/viewers/bc_parcel_app_v4/images/northarrow.gif" BORDER="0"><font face="Arial" SIZE="-2"><p>');

	Win1.document.writeln('	<iframe src="http://gis.showmeboone.com/viewers/bc_voter_app_v1/date.asp" width="150" frameborder="0" height="60"></iframe> </td>');

Win1.document.writeln('<td valign=middle><center><font face="Arial" SIZE="-2">Overview Map<br><IMG SRC="' + printOVURL + '" WIDTH=250 HEIGHT=150 HSPACE=0 VSPACE=0 BORDER=0 ALT=""></td> ');



Win1.document.writeln('<td><center><img src="http://www.showmeboone.com/GIS/viewers/bc_parcel_app_v4/images/legend.gif" BORDER="0">');


Win1.document.writeln('</td></tr></table>');





	Win1.document.writeln('<font face="Arial" SIZE="-2"><center><b> ATTENTION!! </b> <br> ');


Win1.document.writeln('DISCLAIMER; READ CAREFULLY: These maps were prepared for the inventory of real property based on the utilization of deeds, plans, and/or supportive data.  In addition, map files are frequently changed to reflect changes in boundaries, lot lines and other geographic features resulting from changes in ownership, development and other causes.  The existence, dimension, and location of features, as well as other information, should not be relied upon for any purpose without actual field verification.  The County of Boone makes no warranty of any kind concerning the completeness or accuracy of information contained on these maps and assumes no liability or responsibility for the use or reuse of these maps by persons not affiliated with Boone County. Use of these maps by any person not affiliated with Boone County constitutes agreement by the user to assume full liability and responsibility for the verification of the accuracy of information shown on these maps.');




	}






if (layout==2) {


Win1.document.writeln('<TABLE WIDTH="665" BORDER="1" CELLSPACING="0" CELLPADDING="0" NOWRAP>');
	Win1.document.writeln('	<TR>');
	Win1.document.writeln('		<TH COLSPAN="2"><IMG SRC="http://www.showmeboone.com/GIS/viewers/bc_ortho_app_v2/images/clearlogo.gif" width="75" align="left" BORDER=0 ALT=""><font size=+3>' + printTitle + ' <br><font size=+1>Prepared by the Boone County Assessor Office, 573-886-4262</TH>');
	Win1.document.writeln('	</TR>');
	Win1.document.writeln('	<TR>');

	Win1.document.writeln('<TD>');
	Win1.document.writeln('	<center><IMG SRC="' + printMapURL + '" width=685 HSPACE=0 VSPACE=0 BORDER=0 ALT="">');

	Win1.document.writeln('	<center><font face="Arial" SIZE="-2"> <b>ATTENTION!!</b><br>    ');


Win1.document.writeln('DISCLAIMER; READ CAREFULLY: These maps were prepared for the inventory of real property based on the utilization of deeds, plans, and/or supportive data.  In addition, map files are frequently changed to reflect changes in boundaries, lot lines and other geographic features resulting from changes in ownership, development and other causes.  The existence, dimension, and location of features, as well as other information, should not be relied upon for any purpose without actual field verification.  The County of Boone makes no warranty of any kind concerning the completeness or accuracy of information contained on these maps and assumes no liability or responsibility for the use or reuse of these maps by persons not affiliated with Boone County. Use of these maps by any person not affiliated with Boone County constitutes agreement by the user to assume full liability and responsibility for the verification of the accuracy of information shown on these maps.');
	

Win1.document.writeln('</td><td><table border=0><tr><td><center><img src="http://www.showmeboone.com/GIS/viewers/bc_parcel_app_v4/images/northarrow.gif" BORDER="0"><br><br>');


	

	Win1.document.writeln('</td>');

Win1.document.writeln('</tr><tr><td valign=middle><center><font face="Arial" SIZE="-2">Overview Map<br><IMG SRC="' + printOVURL + '" WIDTH=200  HSPACE=0 VSPACE=0 BORDER=0 ALT=""></td> ');



Win1.document.writeln('</tr><tr><td><center><img src="http://www.showmeboone.com/GIS/viewers/bc_parcel_app_v4/images/legend.gif" BORDER="0"><font face="Arial" SIZE="-2"><p>');


Win1.document.writeln('<br><br><iframe src="http://gis.showmeboone.com/viewers/bc_voter_app_v1/date.asp" width="150" frameborder="0" height="60"></iframe> ');

Win1.document.writeln('</td></tr></table></td>');










	}




	Win1.document.writeln('		</TD>');
	Win1.document.writeln('	</TR>');
	
	Win1.document.writeln('</TABLE>');
	Win1.document.writeln('</B></FONT>');




	Win1.document.writeln('</TD></TR></TABLE>');




	//Win1.document.writeln('</body></html>');
	Win1.document.close();
	
	legendVisible=legVis2;
	Win1=null;
	hideRetrieveMap();
}





