function jump(selector, path) {
	var target = selector.options[selector.selectedIndex].value;
	if (target == "")
		return false;
	window.location = path + target;
	return true;
}

function printTopMenu(path, section, self) {
	document.write('<ul id="topmenu">');
	document.write('<li>' + (section == 'home' ? '<span class="here">Home</span>' : '<a href="' + path + '">Home</a>') + '</li>');
	document.write('<li>' + (section == 'contrib' ? '<span class="here">Your Contribution</span>' : '<a href="' + path + 'contribute.html">Your Contribution</a>') + '</li>');
	document.write('<li>' + (section == 'search' ? '<span class="here">Search Page</span>' : '<a href="' + path + 'search/">Search Page</a>') + '</li>');
	document.write('<li>' + (section == 'stories' ? '<a href="' + path + 'stories.html"><span class="here">Election Stories, Referenda and Maps</span></a>' : '<a href="' + path + 'stories.html">Election Stories, Referenda and Maps</a>') + '</li>');
	if (path != './' && section == 'stories')
		printStoryMenu('./', self);
	document.write('<li>' + (section == 'lists' ? '<a href="' + path + 'lists.html"><span class="here">Election Facts</span></a>' : '<a href="' + path + 'lists.html">Election Facts</a>') + '</li>');
	if (path != './' && section == 'lists')
		printListMenu('./', self);
	document.write('<li class="squeeze"><a href="http://blog.electiontrendsproject.org">Ward Healer Blog</a></li>');
	document.write('<li>' + (section == 'bio' ? '<span class="here">Who We Are</span>' : '<a href="' + path + 'bio.html">Who We Are</a>') + '</li>');
	document.write('</ul>');
	//document.write('<br />');
}

function printStoryMenu(path, self) {
	//document.write('<p class="menu_section">The Stories:</p>');
	document.write('<ul id="storymenu">');
	document.write('<li>' + (self == 'roadoil' ? '<span class="here">1928 Road-Oil Scandal</span>' : '<a href="' + path + 'roadoil.html">1928 Road-Oil Scandal</a>') + '</li>');
	document.write('<li>' + (self == 'secombe' ? '<span class="here">D.A. Secombe</span>' : '<a href="' + path + 'secombe.html">D.A. Secombe</a>') + '</li>');
	document.write('<li>' + (self == 'ames' ? '<span class="here">Doc Ames</span>' : '<a href="' + path + 'doc-ames.html">Doc Ames</a>') + '</li>');
	document.write('<li>' + (self == 'sheff' ? '<span class="here">Sheffield-Riley Shooting</span>' : '<a href="' + path + 'sheffield-riley.html">Sheffield-Riley Shooting</a>') + '</li>');
	document.write('<li>' + (self == 'liquor' ? '<span class="here">1961 Liquor Scandal</span>' : '<a href="' + path + 'liquor-scandal.html">1961 Liquor Scandal</a>') + '</li>');
	document.write('<li>' + (self == 'scandals' ? '<span class="here">Noteworthy Scandals</span>' : '<a href="' + path + 'scandals.html">Noteworthy Scandals</a>') + '</li>');
	document.write('<li>' + (self == 'ortman' ? '<span class="here">Ernest Ortman</span>' : '<a href="' + path + 'ernestortman.html">Ernest Ortman</a>') + '</li>');
	document.write('<li>' + (self == 'pioneers' ? '<span class="here">Two Pioneers</span>' : '<a href="' + path + 'twopioneers.html">Two Pioneers</a>') + '</li>');
	document.write('<li>' + (self == 'haugan' ? '<span class="here">Andrew Haugan</span>' : '<a href="' + path + 'andrewhaugan.html">Andrew Haugan</a>') + '</li>');
	document.write('<li>' + (self == 'tales1897' ? '<span class="here">Tales From 1897</span>' : '<a href="' + path + 'tales1897.html">Tales From 1897</a>') + '</li>');
document.write('<li>' + (self == 'maps' ? '<span class="here">Maps and Links</span>' : '<a href="' + path + 'maps.html">Maps and Links</a>') + '</li>');
        document.write('<li>' + (self == 'referenda' ? '<span class="here">Referendum Page</span>' : '<a href="' + path + 'List of Referenda.html">Referendum Page</a>') + '</li>');


	document.write('</ul>');
	document.write('<br />');
}

function printListMenu(path, self) {
	//document.write('<p class="menu_section">The Stories:</p>');
	document.write('<ul id="storymenu">');
	document.write('<li>' + (self == 'towns' ? '<span class="here">Former Towns Of Minneapolis</span>' : '<a href="' + path + 'mplstowns.html">Former Towns Of Minneapolis</a>') + '</li>');
	document.write('<li>' + (self == 'referenda' ? '<span class="here">Minneapolis Referenda, Approved</span>' : '<a href="' + path + 'referenda2.html">Minneapolis Referenda, Approved</a>') + '</li>');
	document.write('<li>' + (self == 'indicted' ? '<span class="here">Indicted, Convicted, etc.</span>' : '<a href="' + path + 'indicted.html">Indicted, Convicted, etc.</a>') + '</li>');
	document.write('<li>' + (self == 'library' ? '<span class="here">Library Board</span>' : '<a href="' + path + 'libraryboard.html">Library Board</a>') + '</li>');
	document.write('<li>' + (self == 'essay' ? '<span class="here">Essay On Political Office</span>' : '<a href="' + path + 'electionessay.html">Essay On Political Office</a>') + '</li>');
	document.write('<li>' + (self == 'estimate' ? '<span class="here">Board Of Estimate And Taxation</span>' : '<a href="' + path + 'estimate.html">Board Of Estimate And Taxation</a>') + '</li>');
        document.write('<li>' + (self == 'schoolboard1' ? '<span class="here">School Board</span>' : '<a href="' + path + 'schoolboard1.html">School Board</a>') + '</li>');
	document.write('<li>' + (self == 'parkboard' ? '<span class="here">Park Board</span>' : '<a href="' + path + 'parkboard.html">Park Board</a>') + '</li>');
document.write('<li>' + (self == 'mayorsMay5' ? '<span class="here">Mayors of Minneapolis and St. Anthony</span>' : '<a href="' + path + 'mayorsMay5.html">Mayors of Minneapolis and St. Anthony</a>') + '</li>');
        document.write('<li>' + (self == '1st Ward' ? '<span class="here">Ward 1</span>' : '<a href="' + path + '1st Ward.html">Ward 1</a>') + '</li>');
        document.write('<li>' + (self == '2nd Wardc' ? '<span class="here">Ward 2</span>' : '<a href="' + path + '2nd Wardc.html">Ward 2</a>') + '</li>');
        document.write('<li>' + (self == '3rd Ward' ? '<span class="here">Ward 3</span>' : '<a href="' + path + '3rd Ward.html">Ward 3</a>') + '</li>');
        document.write('<li>' + (self == '4th Ward' ? '<span class="here">Ward 4</span>' : '<a href="' + path + '4th Ward.html">Ward 4</a>') + '</li>');
        document.write('<li>' + (self == '5th Ward' ? '<span class="here">Ward 5</span>' : '<a href="' + path + '5th Ward.html">Ward 5</a>') + '</li>');
        document.write('<li>' + (self == '6th Ward' ? '<span class="here">Ward 6</span>' : '<a href="' + path + '6th Ward.html">Ward 6</a>') + '</li>');
        document.write('<li>' + (self == '7th Ward' ? '<span class="here">Ward 7</span>' : '<a href="' + path + '7th Ward.html">Ward 7</a>') + '</li>');
        document.write('<li>' + (self == '8th Ward' ? '<span class="here">Ward 8</span>' : '<a href="' + path + '8th Ward.html">Ward 8</a>') + '</li>');
        document.write('<li>' + (self == '9th Ward' ? '<span class="here">Ward 9</span>' : '<a href="' + path + '9th Ward.html">Ward 9</a>') + '</li>');
        document.write('<li>' + (self == '10th Ward' ? '<span class="here">Ward 10</span>' : '<a href="' + path + '10th Ward.html">Ward 10</a>') + '</li>');
        document.write('<li>' + (self == '11th Ward' ? '<span class="here">Ward 11</span>' : '<a href="' + path + '11th Ward.html">Ward 11</a>') + '</li>');
        document.write('<li>' + (self == '12th Ward' ? '<span class="here">Ward 12</span>' : '<a href="' + path + '12th Ward.html">Ward 12</a>') + '</li>');
        document.write('<li>' + (self == '13th Ward' ? '<span class="here">Ward 13</span>' : '<a href="' + path + '13th Ward.html">Ward 13</a>') + '</li>');
        document.write('<li>' + (self == 'comptrollers' ? '<span class="here">Comptrollers and Treasurers</span>' : '<a href="' + path + 'comptrollers.html">Comptrollers and Treasurers</a>') + '</li>');
        document.write('<li>' + (self == 'Mpls town2' ? '<span class="here">Town of Minneapolis</span>' : '<a href="' + path + 'Mpls town2.html">Town of Minneapolis</a>') + '</li>');
        document.write('<li>' + (self == 'Minneapolis Township' ? '<span class="here">Minneapolis Township</span>' : '<a href="' + path + 'Minneapolis Township.html">Minneapolis Township</a>') + '</li>');
        document.write('<li>' + (self == 'aldermen, St. A' ? '<span class="here">Aldermen of St. Anthony</span>' : '<a href="' + path + 'aldermen, St. A.html">Aldermen of St. Anthony</a>') + '</li>');
        document.write('<li>' + (self == 'City Judges' ? '<span class="here">Municipal Judges and Justices of the Peace</span>' : '<a href="' + path + 'City Judges.html">Municipal Judges and Justices of the Peace</a>') + '</li>');
        document.write('<li>' + (self == 'sources' ? '<span class="here">Sources</span>' : '<a href="' + path + 'sources.html">Sources</a>') + '</li>');
        document.write('</ul>');
	document.write('<br />');
}

function printResultsSelector(path, self) {
	document.write('<p class="menu_section">View&nbsp;Sample&nbsp;Results:</p>');
	document.write('<table>');
	document.write('<tr>');
	document.write('<td class="menu_section" colspan="2">Select City</td>');
	document.write('</tr>');
	document.write('<tr>');
	document.write('<td>');
	document.write('<form class="selection">');
	document.write('<select onchange="return jump(this, \'' + path + '\')">');
	document.write('<option value=""></option>');
	document.write('<option value="winona1857.html"' + (self == 'winona1857' ? ' selected' : '') + '>Winona 1857</option>');
	document.write('<option value="stanthony1858.html"' + (self == 'stan' ? ' selected' : '') + '>St. Anthony 1858</option>');
	document.write('<option value="mpls1858.html"' + (self == '1858' ? ' selected' : '') + '>Minneapolis 1858</option>');
	document.write('<option value="stanthony1859.html"' + (self == '1859' ? ' selected' : '') + '>St Anthony 1859</option>');
	document.write('<option value="duluth1870.html"' + (self == 'duluth1870' ? ' selected' : '') + '>Duluth 1870</option>');
	document.write('<option value="mpls1945.html"' + (self == '1945' ? ' selected' : '') + '>Minneapolis 1945</option>');
	document.write('<option value="mpls1997.html"' + (self == '1997' ? ' selected' : '') + '>Minneapolis 1997</option>');
	document.write('</select>');
	document.write('</form>');
	document.write('</td>');
	document.write('</tr>');
	document.write('<tr>');
	document.write('<td class="menu_section" colspan="2">Or Office</td>');
	document.write('</tr>');
	document.write('<tr>');
	document.write('<td>');
	document.write('<form class="selection">');
	document.write('<select onchange="return jump(this, \'' + path + '\')">');
	document.write('<option value=""></option>');
	document.write('<option value="mankatomayor.html"' + (self == 'mankatomayor' ? ' selected' : '') + '>Mankato Mayor</option>');
	document.write('<option value="mplsmayor.html"' + (self == 'mplsmayor' ? ' selected' : '') + '>Minneapolis Mayor</option>');
	document.write('<option value="stpaulmayor.html"' + (self == 'stpaulmayor' ? ' selected' : '') + '>St. Paul Mayor</option>');
	document.write('</select>');
	document.write('</form>');
	document.write('</td>');
	document.write('</tr>');
	document.write('<tr>');
	document.write('<td class="menu_section" colspan="2">Or Candidate</td>');
	document.write('</tr>');
	document.write('<tr>');
	document.write('<td>');
	document.write('<form class="selection">');
	document.write('<select onchange="return jump(this, \'' + path + '\')">');
	document.write('<option value=""></option>');
	document.write('<option value="davie.html"' + (self == 'davie' ? ' selected' : '') + '>Engine Davie</option>');
	document.write('<option value="humphrey.html"' + (self == 'hhh' ? ' selected' : '') + '>Hubert H. Humphrey, Jr.</option>');
	document.write('<option value="murphy.html"' + (self == 'murphy' ? ' selected' : '') + '>Ensign Murphy</option>');
	document.write('<option value="plumer.html"' + (self == 'plumer' ? ' selected' : '') + '>Soft & Hard Plumer</option>');
	document.write('</select>');
	document.write('</form>');
	document.write('</td>');
	document.write('</tr>');
	document.write('</table>');
	document.write('<br />');
}
