/* The following code is for determining the main navigation links on all pages.  */
/* These links include "Auditor's Home Page", "Elections", "Financial Services"   */
/* "Licensing", "Recording", and "Contact Us".  Change/Add/Delete any of these   */
/* links, and it is instantly changed in the entire website (as this section is   */
/* automatically loaded when each page loads - David Reeves, 8/26/2005            */

message = "<center>"
message = message + "<b>"
message = message + "<a href='http://www.co.thurston.wa.us/auditor/index.htm' class='mainmenu'>Auditor\'s Home Page</a>"
message = message + "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"
message = message + "<a href='http://www.co.thurston.wa.us/auditor/Elections/electns.htm' class='mainmenu'>Elections</a>"
message = message + "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"
message = message + "<a href='http://www.co.thurston.wa.us/auditor/Finance/finance.htm' class='mainmenu'>Financial Services</a>"
message = message + "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"
message = message + "<a href='http://www.co.thurston.wa.us/auditor/Licensing/license.htm' class='mainmenu'>Licensing</a>"
message = message + "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"
message = message + "<a href='http://www.co.thurston.wa.us/auditor/Recording/records.htm' class='mainmenu'>Recording</a>"
message = message + "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"
message = message + "<a href='http://www.co.thurston.wa.us/auditor/Forms/Hours&amp;Contact.htm' class='mainmenu'>Contact Us</a>"
message = message + "</b>"
message = message + "</center>"

/* The following function, "toggleT", hides and unhides the event content 				*/
/* The following code actually posts the links on each page. - David Reeves,      */
/* 8/26/2005                        */


function linx() {
	document.write(message);
	}

/* The following function, "toggleT", hides and unhides the event content 				*/
/* in the calendar pages.  It is set up to detect the browser and to handle 			*/
/* the display feature accordingly.  Note that this won't work on older browsers, */
/* but it is hoped that the vast majority of visitors have upgraded their 				*/
/* browsers to ones that will work just fine. - David Reeves, 8/26/2005 					*/

var isIE=document.all?true:false; 
var isDOM=document.getElementById?true:false; 
var isNS4=document.layers?true:false; 

/* _w : which ID (1) or (2) */ 
/* _h : (h)ide or (s)how */ 
function toggleT(_w,_h) { 
if (isDOM) 
{ 
if (_h=='s') document.getElementById(_w).style.display='inline'; 
if (_h=='h') document.getElementById(_w).style.display='none'; 
} 
else if (isIE) { 
if (_h=='s') eval("document.all."+_w+".style.display='inline';"); 
if (_h=='h') eval("document.all."+_w+".style.display='none';"); 
} 
else if(isNS4) 
{ 
if (_h=='s') eval("document.layers['"+_w+"'].display='inline';"); 
if (_h=='h') eval("document.layers['"+_w+"'].display='none';"); 
} 
}


/* This code displays a calendar event, utilizing the function above (toggleT) to */
/* hide and unhide the event details.  ***** DO NOT MODIFY THIS CODE UNLESS YOU   */
/* KNOW WHAT YOU ARE DOING! *****  It is EXTREMELY important to note that the     */
/* "eventID" variable on the web page must be different than any other "eventID"  */
/* on the page. - David Reeves, 8/26/2005                                    			*/

function eventWriter() {
document.writeln("<tr>");
document.writeln("        <td width=\"10%\" style='text-align:center;height:25;vertical-align:top;padding-top:7;'>");
document.writeln("          <div name=\"r1\" onclick=\"toggleT(\'"+eventID+"\',\'s\')\">");
document.writeln("            <img onMouseOver='this.style.cursor=\"pointer\"' alt=\"\" src=\"http:\/\/www.co.thurston.wa.us\/auditor\/images\/calendar\/display_button.gif\" border=\"0\" title='Click here to see more details of this event' />");
document.writeln("          <\/div>");
document.writeln("        <\/td>");
document.writeln("        <td width=\"7%\" style='text-align:right;vertical-align:top;padding-top:7;padding-right:10;'><b>"+eventDay+"<\/b><\/td>");
document.writeln("        <td width=\"83%\" colspan='2' style='vertical-align:top;padding-top:7;'><b>"+eventTitle+"<\/b><\/td>");
document.writeln("      <\/tr>");
document.writeln("      <tr>");
document.writeln("        <td colspan=\"4\" width='100%'>");
document.writeln("          <div id=\""+eventID+"\" class=\"widget\"");
document.writeln("            <blockquote>");
document.writeln("<table class='eventTable' width='90%'><tr><td valign='top'><b>Time:<\/b><\/td><td valign='top'>"+eventTime+"<\/td><\/tr>");
document.writeln("<tr><td valign='top'><b>Location:<\/b><\/td><td valign='top'>"+eventLocation+"<\/td><\/tr>");
document.writeln("<tr><td valign='top'><b>Address:<\/b><\/td><td valign='top'>"+eventAddress+"<\/td><\/tr>");
document.writeln("<tr><td valign='top'><b>Description:<\/b><\/td><td valign='top'>"+eventDescription+"<div style='float:right;' name=\"r1\" onclick=\"toggleT(\'"+eventID+"\',\'h\')\"><img onMouseOver=\"this.style.cursor=\'pointer\'\" alt=\"\" src=\"http:\/\/www.co.thurston.wa.us\/auditor\/images\/calendar\/hide_button.gif\" border=\"0\" title='Click here to close the details of this event' /><\/div><\/td><\/tr><\/table>");
document.writeln("            <\/blockquote>");
document.writeln("          <\/div>");
document.writeln("        <\/td>");
document.writeln("      <\/tr>");
}


/* This code is for displaying a new month.  Paste this before you add any        */
/* eventWriter functions to the page; otherwise, the page won't display properly. */
/* Any number of "eventWriter" functions will work after this one, however, but   */
/* make sure the endMonth function follows these.  Here's how the functions       */
/* should be ordered.  Any other way will display improperly:                     */
/*      beginMonth()                                                              */
/*      eventWriter()                                                             */
/*      eventWriter()                                                             */
/*      eventWriter()                                                             */
/*      endMonth()                                                                */
/*  - David Reeves, 8/26/2005                                                     */

function beginMonth() {
document.writeln("<!-- Begin Month -->");
document.writeln("  <li>");
document.writeln("    <table width=\"550\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\"");
document.writeln("      <tr>");
document.writeln("        <td width=\"10%\" valign=\"bottom\" style='text-align:center;'><b><u>Details<\/u><\/b><\/td>");
document.writeln("        <td width=\"7%\" valign=\"bottom\" style='text-align:center;'><b><u>Day<\/u><\/b><\/td>");
document.writeln("        <td width=\"83%\" colspan=\"2\" valign=\"bottom\"><b><u>Event<\/u><\/b><\/td>");
document.writeln("      <\/tr>");
}

function endMonth() {
	document.writeln("<\/table>");
document.writeln("  <\/li>");
document.writeln("<\/ul>");
document.writeln("");
document.writeln("<!-- End Month -->");	
}

/* The following code displays a .gif calendar on demand for the calendar page    */
/*  - David Reeves, 8/26/2005                                                     */

function beginCalendarWindow() {
document.writeln("<ul type=\"none\">");
document.writeln("<img onMouseOver=\"this.style.cursor=\'pointer\'\" title=\"Click Here To See Calendar For This Month\" src=\"http://www.co.thurston.wa.us/auditor/images/calendar/cal.gif\" border=\"1\" ");
document.writeln("onClick='javascript:");
}

function calWindow() {
		leftPos=screen.width*.6;
		topPos=screen.width*.15;
		popupWindow = window.open("", "catWin", "toolbar=no,location=no,scrollbars=no,resizable=yes,width=300,height=200,left="+leftPos+",top="+topPos+"")
		popupWindow.document.write("<html><head><title>Event Calendar<\/title>")
		popupWindow.document.write("</head>")
		popupWindow.document.write("<body bgcolor='navy' style='color:white;' onBlur='self.focus()'><center>")
		popupWindow.document.write("<img alt=\"\" src=\"http://www.co.thurston.wa.us/auditor/images/calendar/"+eventCalendarName+"\" />")
		popupWindow.document.write("</center></body></html>")
		popupWindow.document.close()
				popupWindow.focus()
	}

function endCalendarWindow() {
document.writeln("eventCalendarName=\""+eventCalendarName+"\";");
document.writeln("calWindow()' />");
document.writeln("<font color=\"#CC0000\" style='font-size:18px;font-weight:bold;'>"+eventMonth+", "+eventYear+"<\/font>");

}

/* This code adds search engine capability to a web page.  You will also need */
/* to add the search code in the body of the page (provided by the Thurston   */
/* County's IT department.  For further information, go to the website        */
/* documentation page at:                                                     */
/* http://www.co.thurston.wa.us/auditor/doc_site/snippet_search_engine.htm    */
/*  - David Reeves, 9/16/2005                                                 */

document.writeln("<script language=\"javascript1.2\" src=\"http://www.co.thurston.wa.us/cm/search/includes/funcs.js\"><\/script>");
