//******************************************************
// File Name: aer_prts.js
// Purpose: Javascript for the Annual Energy Review web site
// Author: Charles A. Allen II (Tony)
// Version: 1.5
// Revision: June 2009
// Release:  Annual Energy Review 2008
//******************************************************
<!-- Hide script from old web browsers
function DataEndYear(lngLagValue)
{
	var lngSetCalendarYear, lngDataYear;
	lngSetCalendarYear = 2009;
	lngDataYear = lngSetCalendarYear - lngLagValue;
	document.write(lngDataYear);
	return;
}
function PubReleaseTimeStampString()
{
	var strPubReleaseString;
	strPubReleaseString = "Annual Energy Review 2008<br>Report No. DOE/EIA-0384(2008)<br>Release Date: June 26, 2009<br>Next Update: June 2010";
	document.write(strPubReleaseString);
	return;
}
// 01/18/2007 - added
function PubErrataTimeStampString()
{
	var strPubReleaseString;
	strPubReleaseString = "Annual Energy Review 2008 - Errata<br>Report No. DOE/EIA-0384(2008)<br>Release Date:  June 26, 2009";
	document.write(strPubReleaseString);
	return;
}
function WriteAERBreadcrumbs(intPageNum)
{
	var strcrumbs;
	var strcrumbs1, strcrumbs2, strcrumbs3, strcrumbs4, strcrumbs5;
	var strcrumbs6, strcrumbs7, strcrumbs8, strcrumbs9, strcrumbs10;
	var strcrumbs11, strcrumbs12, strcrumbs13, strcrumbs14, strcrumbs15;
	var strcrumbs16, strcrumbs17, strcrumbs18, strcrumbs19, strcrumbs20;
	var strcrumbs21, strcrumbs22, strcrumbs23, strcrumbs24, strcrumbs25;
	var strcrumbs26, strcrumbs27, strcrumbs28, strcrumbs29, strcrumbs30;
	var strcrumbs31;

	strcrumbs1 = '<SPAN class=breadcrumbs><A href="http://www.eia.doe.gov/">Home</A></span>';
	strcrumbs2 = '&gt; <SPAN class=breadcrumbs><A href="http://www.eia.doe.gov/overview_hd.html">Historical Energy Data</A></span>';
	strcrumbs3 = '&gt; <SPAN class=breadcrumbs><a href="contents.html">AER</a></span>';
	strcrumbs4 = '&gt; <span class=breadcrumbshd>Contents</a></span>';
	strcrumbs5 = '&gt; <span class=breadcrumbshd>Energy Overview</span>';
	strcrumbs6 = '&gt; <span class=breadcrumbshd>Energy Consumption by Sector</span>';
	strcrumbs7 = '&gt; <span class=breadcrumbshd>Financial Indicators</span>';
	strcrumbs8 = '&gt; <span class=breadcrumbshd>Energy Resources</span>';
	strcrumbs9 = '&gt; <span class=breadcrumbshd>Petroleum</span>';
	strcrumbs10 = '&gt; <span class=breadcrumbshd>Natural Gas</span>';
	strcrumbs11 = '&gt; <span class=breadcrumbshd>Coal</span>';
	strcrumbs12 = '&gt; <span class=breadcrumbshd>Electricity</span>';
	strcrumbs13 = '&gt; <span class=breadcrumbshd>Nuclear Energy</span>';
	strcrumbs14 = '&gt; <span class=breadcrumbshd>Renewable Energy</span>';
	strcrumbs15 = '&gt; <span class=breadcrumbshd>International Energy</span>';
	strcrumbs16 = '&gt; <span class=breadcrumbshd>Environmental Indicators</span>';
	strcrumbs17 = '&gt; <span class=breadcrumbshd>Appendix A</span>';
	strcrumbs18 = '&gt; <span class=breadcrumbshd>Appendix B</span>';
	strcrumbs19 = '&gt; <span class=breadcrumbshd>Appendix C</span>';
	strcrumbs20 = '&gt; <span class=breadcrumbshd>Appendix D</span>';
	strcrumbs21 = '&gt; <span class=breadcrumbshd>Appendix E</span>';
	strcrumbs22 = '&gt; <span class=breadcrumbshd>Contact</span>';
	strcrumbs23 = '&gt; <span class=breadcrumbshd>What &rsquo;s New In</span>';
	strcrumbs24 = '&gt; <span class=breadcrumbshd>Order Information</span>';
	strcrumbs25 = '&gt; <span class=breadcrumbshd>About the Data</span>';
	strcrumbs26 = '&gt; <span class=breadcrumbshd>Flow Diagram - Energy</span>';
	strcrumbs27 = '&gt; <span class=breadcrumbshd>Flow Diagram - Petroleum</span>';
	strcrumbs28 = '&gt; <span class=breadcrumbshd>Flow Diagram - Natural Gas</span>';
	strcrumbs29 = '&gt; <span class=breadcrumbshd>Flow Diagram - Coal</span>';
	strcrumbs30 = '&gt; <span class=breadcrumbshd>Flow Diagram - Electricity</span>';
	strcrumbs31 = '&gt; <span class=breadcrumbshd>Consumption by Source and Sector</span>';
	strcrumbs32 = '&gt; <span class=breadcrumbshd>Errata</span>';
	switch (intPageNum)
	{
	case 0: //base
		strcrumbs = strcrumbs1 + strcrumbs2 + strcrumbs3
	  break
	case 1: //section 1
		strcrumbs = strcrumbs1 + strcrumbs2 + strcrumbs3 + strcrumbs5
	  break
	case 2: //section 2
		strcrumbs = strcrumbs1 + strcrumbs2 + strcrumbs3 + strcrumbs6
	  break
	case 3: //section 3
		strcrumbs = strcrumbs1 + strcrumbs2 + strcrumbs3 + strcrumbs7
	  break
	case 4: //section 4
		strcrumbs = strcrumbs1 + strcrumbs2 + strcrumbs3 + strcrumbs8
	  break
	case 5: //section 5
		strcrumbs = strcrumbs1 + strcrumbs2 + strcrumbs3 + strcrumbs9
	  break
	case 6: //section 6
		strcrumbs = strcrumbs1 + strcrumbs2 + strcrumbs3 + strcrumbs10
	  break
	case 7:  //section 7
		strcrumbs = strcrumbs1 + strcrumbs2 + strcrumbs3 + strcrumbs11
	  break
	case 8:  //section 8
		strcrumbs = strcrumbs1 + strcrumbs2 + strcrumbs3 + strcrumbs12
	  break
	case 9:  //section 9
		strcrumbs = strcrumbs1 + strcrumbs2 + strcrumbs3 + strcrumbs13
	  break
	case 10:  //section 10
		strcrumbs = strcrumbs1 + strcrumbs2 + strcrumbs3 + strcrumbs14
	  break
	case 11:  //section 11
		strcrumbs = strcrumbs1 + strcrumbs2 + strcrumbs3 + strcrumbs15
	  break
	case 12:  //section 12
		strcrumbs = strcrumbs1 + strcrumbs2 + strcrumbs3 + strcrumbs16
	  break
	case 13:  //appendix a
		strcrumbs = strcrumbs1 + strcrumbs2 + strcrumbs3 + strcrumbs17
	  break
	case 14:  //appendix b
		strcrumbs = strcrumbs1 + strcrumbs2 + strcrumbs3 + strcrumbs18
	  break
	case 15:  //appendix c
		strcrumbs = strcrumbs1 + strcrumbs2 + strcrumbs3 + strcrumbs19
	  break
	case 16:  //appendix d
		strcrumbs = strcrumbs1 + strcrumbs2 + strcrumbs3 + strcrumbs20
	  break
	case 17:  //appendix e
		strcrumbs = strcrumbs1 + strcrumbs2 + strcrumbs3 + strcrumbs21
	  break
	case 18: //Contact
		strcrumbs = strcrumbs1 + strcrumbs2 + strcrumbs3 + strcrumbs22
	  break
	case 19: //What's New In
		strcrumbs = strcrumbs1 + strcrumbs2 + strcrumbs3 + strcrumbs23
	  break
	case 20: //Order Information
		strcrumbs = strcrumbs1 + strcrumbs2 + strcrumbs3 + strcrumbs24
	  break
	case 21: //About The Data
		strcrumbs = strcrumbs1 + strcrumbs2 + strcrumbs3 + strcrumbs25
	  break
	case 22: //Energy Flow
		strcrumbs = strcrumbs1 + strcrumbs2 + strcrumbs3 + strcrumbs26
	  break
	case 23: //Petroleum Flow
		strcrumbs = strcrumbs1 + strcrumbs2 + strcrumbs3 + strcrumbs27
	  break
	case 24: //Natural Gas Flow
		strcrumbs = strcrumbs1 + strcrumbs2 + strcrumbs3 + strcrumbs28
	  break
	case 25: //Coal Flow
		strcrumbs = strcrumbs1 + strcrumbs2 + strcrumbs3 + strcrumbs29
	  break
	case 26: //Electricity Flow
		strcrumbs = strcrumbs1 + strcrumbs2 + strcrumbs3 + strcrumbs30
	  break
	case 27: //Consumption by Source and Sector diagram
		strcrumbs = strcrumbs1 + strcrumbs2 + strcrumbs3 + strcrumbs31
	  break
	case 28: //Errata page
		strcrumbs = strcrumbs1 + strcrumbs2 + strcrumbs3 + strcrumbs32
	  break
	}
	document.write(strcrumbs);
	return;
}
function WriteNotes()
{
	var strNotes, strNote1, strNote2, strNote3, strNote4, strNote5;
	strNote1 = '<tr><td class=plugs colspan=7><sup class=asterisk>*</sup>Notes:</td></tr>';
	strNote2 ='<tr><td class=plugs colspan=7>(1) Many of the PDF files display data for selected years only.  Excel and HTML files display all available annual data.</td></tr>';
	strNote3 ='<tr><td class=plugs colspan=7>(2) All files include notation ("R"=revised) on the data that have changed, at the level of precision shown in the PDF and HTML files, since the previous release of the Annual Energy Review.  In Excel files, revisions that are too small to cause revisions in the PDF and HTML files are not identified.</td></tr>';
	strNote4 = '<tr><td class=plugs colspan=7>(3) All files identify data that are estimated, with notation ("E"=estimate) on years or data values; or with “Estimated” in the table title.</td></tr>';
	strNote5 = '<tr><td class=plugs colspan=7>(4) All files identify data that are preliminary or forecast, with notation ("P"=preliminary, "F"=forecast) on years or data values.</td></tr>';
	strNotes = strNote1 + strNote2 + strNote3 + strNote4 + strNote5;
	document.write(strNotes);
	return;
}
// 01/18/2007 - Added
function WriteErrataNotes()
{
	var strNotes, strNote1, strNote2, strNote3, strNote4, strNote5;
	strNote1 = '<tr><td class=plugs colspan=8><sup class=asterisk>*</sup>Notes:</td></tr>';
	strNote2 ='<tr><td class=plugs colspan=8>(1) Many of the PDF files display data for selected years only.  Excel and HTML files display all available annual data.</td></tr>';
	strNote3 ='<tr><td class=plugs colspan=8>(2) All files include notation ("R"=revised) on the data that have changed, at the level of precision shown in the PDF and HTML files, since the previous release of the Annual Energy Review.  In Excel files, revisions that are too small to cause revisions in the PDF and HTML files are not identified.</td></tr>';
	strNote4 = '<tr><td class=plugs colspan=8>(3) All files identify data that are estimated, with notation ("E"=estimate) on years or data values; or with “Estimated” in the table title.</td></tr>';
	strNote5 = '<tr><td class=plugs colspan=8>(4) All files identify data that are preliminary or forecast, with notation ("P"=preliminary, "F"=forecast) on years or data values.</td></tr>';
	strNotes = strNote1 + strNote2 + strNote3 + strNote4 + strNote5;
	document.write(strNotes);
	return;
}
// 07/10/2007 - Added
function WriteLinks()
{
	var strPrevious, strContact, strMER, strSEDS;
	var strIEA, strIPM, strSTEO, strAEO, strIEO;
	var strLinks;
strPrevious='<br>&nbsp;&nbsp;<a href="http://tonto.eia.doe.gov/bookshelf/SearchResults.asp?title=Annual+Energy+Review" target="_blank">Previous Editions of AER</a>';
strContact='<br>&nbsp;&nbsp;<a href="aercontacts.html" target="_blank">Contact AER Authors</a><br>';
strMER='<br>&nbsp;&nbsp;<a href="http://www.eia.doe.gov/emeu/mer/contents.html" target="_blank">Monthly Energy Review</a>';
strSEDS='<br>&nbsp;&nbsp;<a href="http://www.eia.doe.gov/emeu/states/_seds.html" target="_blank">State Energy Data System</a><br>';
strIEA='<br>&nbsp;&nbsp;<a href="http://www.eia.doe.gov/iea/contents.html" target="_blank">International Energy Annual</a>';
strIPM='<br>&nbsp;&nbsp;<a href="http://www.eia.doe.gov/ipm/contents.html" target="_blank">International Petroleum Monthly</a><br>';
strSTEO='<br>&nbsp;&nbsp;<a href="http://www.eia.doe.gov/emeu/steo/pub/contents.html" target="_blank">Short-Term Energy Outlook</a>';
strAEO='<br>&nbsp;&nbsp;<a href="http://www.eia.doe.gov/oiaf/aeo/index.html" target="_blank">Annual Energy Outlook</a>';
strIEO='<br>&nbsp;&nbsp;<a href="http://www.eia.doe.gov/oiaf/ieo/index.html" target="_blank">International Energy Outlook</a><br><br>';
strLinks = strPrevious + strContact + strMER + strSEDS + strIEA + strIPM + strSTEO + strAEO + strIEO;
	document.write(strLinks);
	return;
}

-->
