// adding scripts within a script
var scripts = [
// including overlib script to get aqi popup to work properly
                  'http://www.epa.gov/region1/js/overlib.js'
//                  ,'script_2.js'
                 ];
   if ( document.getElementsByTagName ) {
     var head = document.getElementsByTagName('HEAD')[0]
     var scriptElement;
     var i = scripts.length;
     while ( i-- ) {
       scriptElement = document.createElement('script');
       scriptElement.type = 'text/javascript';
       scriptElement.src = scripts[i];
       head.appendChild(scriptElement);
     }
   }
//  end script include
// Set current Greenbytes issue date
var gb_date = "";

document.write('' +
// styles
'	<style>' +
' 	#ffpOuterWrapper {border:1px solid #839BC5; text-align:left; margin:0 auto; width:100%;} ' +
'	#ffpOuterWrapper p {margin:0; padding:5px 8px; font: 11px Verdana, Arial, Helvetica, sans-serif;} ' +
'	html>body #ffpOuterWrapper p {margin:0; padding:5px 8px; font: 11px Verdana, Arial, Helvetica, sans-serif;} ' +
'	h3#ffpHeader {margin: 0; padding: 24px 0 0 0; overflow: hidden; border-bottom: 1px solid #839BC5; background:#fff url("http://www.epa.gov/region1/images2/misc/headers/ffp.gif") no-repeat;  height: 0px !important; /* for most browsers */ height /**/:24px; /* for IE5.5 bad box model */ } ' +     
' 	.bg {background-color:#ffffff;} ' +
' 	.bgRollover {background-color:#E9F1F8;} ' +
' 	#wycd {margin:0; padding:2px 5px 0px 26px; color:#839BC5;} ' +
' 	#wycd li {padding:0 0 2px 0; font: 11px Verdana, Arial, Helvetica, sans-serif;} ' +
' 	span.wycdHeader{cursor:pointer; font-size:11; text-decoration:underline; color:#0000EE;} ' +
' 	span.wycdHeader:hover, #ffpOuterWrapper a:hover {color:#548D64; background: #E9F1F8} ' +
'	.spacer {margin:0; padding:0;}' +
' 	#expandImage {padding:0 5px 0 0;} ' +
' 	#buttonsContainer {width:172px; margin: auto; text-align:center;} ' +
' 	.bg2 {background-color:#ffffff; padding-top:2px; margin:0; vertical-align:middle;} ' +
'	.aqiRollover, .pandemicFluRollover, .pubnoticeRollover, .libraryRollover, .espanolRollover, .foiaRollover, .questionsRollover, .calRollover  {vertical-align:middle; margin:0; padding-top:2px; }' +
'	.aqiRollover {background-color:#DBF7F5; }' +
'	.pandemicFluRollover {background-color:#DEE0DF;}' +
' 	.pubnoticeRollover {background-color:#EEEEF7;}' +
' 	.libraryRollover {background-color:#D1E2F3;}' +
'	.espanolRollover {background-color:#D1E7CF;}' +
' 	.foiaRollover {background-color:#E6E6E6;}' +
' 	.questionsRollover {background-color:#FFDCB9;}' +
' 	.calRollover {background-color:#EFA3AA;}' +
' 	.listone {padding:0; margin:0;}' +
'	</style>' +
// write floating front page
'	<div id="ffpOuterWrapper">' +
'        <hr  style="display:none;" />' +
'        <h3 id="ffpHeader">Floating Front Page</h3>' +
'      <div class="bg" onMouseOver="this.className=\'bgRollover\'" onMouseOut="this.className=\'bg\'">' +
'        <p><strong><a href="http://yosemite.epa.gov/opa/admpress.nsf/Press%20Releases%20From%20Region%201!OpenView">News Releases</a></strong> <br>EPA New England News Releases<br><a href="http://service.govdelivery.com/service/subscribe.html?code=USAEPA_C21" onclick="window.open(this.href,\'popup\',\'width=725,height=500,left=25,top=25,location=no,resizable=yes,scrollbars=yes,status=yes\');return false;" target="_blank">Subscribe to mailing list</a>.</p>' +
'      </div>' +
'      <div class="bg" onMouseOver="this.className=\'bgRollover\'" onMouseOut="this.className=\'bg\'">' +
'      </div>' +
'      <div class="bg" onMouseOver="this.className=\'bgRollover\'" onMouseOut="this.className=\'bg\'">' +
'        <p><strong><a href="http://www.epa.gov/region1/topics/seasonal_issues.html">Autumn Issues</a></strong></p>' +
'      </div>' +
'      <div class="bg" onMouseOver="this.className=\'bgRollover\'" onMouseOut="this.className=\'bg\'">' +
'        <p><strong><a href="http://www.epa.gov/region1/whatsnew/index.html">New &amp; Updated Sites</a></strong></p>' +
'      </div>' +
'      <div class="bg" onMouseOver="this.className=\'bgRollover\'" onMouseOut="this.className=\'bg\'">' +
'        <p><strong><a href="http://www.epa.gov/region1/aqi/index.html" onMouseOver="return overlib(\'<div align=center><b class=largest>Ozone & Particle Pollution Forecast</b><br><img src=http://www.epa.gov/airnow/today/fc-ne0.gif><br><img src=http://www.epa.gov/region1/airquality/images/ozone-legend.gif></div>\', RELX, 175, RELY, 50)" onMouseOut="nd();">Real-Time Air Quality Data</a></strong></p>' +
'      </div>' +
'      <div class="bg" onMouseOver="this.className=\'bgRollover\'" onMouseOut="this.className=\'bg\'">' +
'        <p><strong><a href="http://www.epa.gov/region1/publicnotices/index.html">Public Notices/Comments</a></strong></p>' +
'      </div>' +
'      <div class="bg" onMouseOver="this.className=\'bgRollover\'" onMouseOut="this.className=\'bg\'">' +
'        <p><strong><a href="http://www.epa.gov/region1/cal/index.html">Upcoming Meetings</a></strong></p>' +
'      </div>' +
'       <p><strong>Visit EPA\'s Multilingual Web Sites at:</strong></p>' +
'      <ul style="padding-left:25px; font-size:.9em;">' +
'      <li class="bg" onMouseOver="this.className=\'bgRollover\'" onMouseOut="this.className=\'bg\'"><a href="http://www.epa.gov/region1/espanol/index.html">En Espa&ntilde;ol (Spanish)</a></li>' +
'      <li class="bg" onMouseOver="this.className=\'bgRollover\'" onMouseOut="this.className=\'bg\'"><a href="http://www.epa.gov/chinese/" title="EPA National">&#20013;&#25991;: &#32321;&#39636;&#29256; (Traditional Chinese)</a></li>' +
'      <li class="bg" onMouseOver="this.className=\'bgRollover\'" onMouseOut="this.className=\'bg\'"><a href="http://www.epa.gov/chinese/simple/" title="EPA National">&#20013;&#25991;: &#31616;&#20307;&#29256; (Simplified Chinese)</a></li>' +
'      <li class="bg" onMouseOver="this.className=\'bgRollover\'" onMouseOut="this.className=\'bg\'"><a href="http://www.epa.gov/vietnamese/" title="EPA National">Ti&#7871;ng Vi&#7879;t (Vietnamese)</a></li>' +
'      <li class="bg" onMouseOver="this.className=\'bgRollover\'" onMouseOut="this.className=\'bg\'"><a href="http://www.epa.gov/korean/" title="EPA National">&#54620;&#44397;&#50612; (Korean)</a></li>' +
'		</ul>' +
'      <div class="bg" onMouseOver="this.className=\'bgRollover\'" onMouseOut="this.className=\'bg\'">' +
'        <p><strong><a href="http://www.epa.gov/region1/foia/index.html">Freedom of Information Action Requests</a></strong></p>' +
'      </div>' +
'      <div class="bg" onMouseOver="this.className=\'bgRollover\'" onMouseOut="this.className=\'bg\'">' +
'        <p><strong><a href="http://www.epa.gov/region1/communities/index.html">Questions About Your Community</a></strong></p>' +
'      </div>' +
'      <div class="bg" onMouseOver="this.className=\'bgRollover\'" onMouseOut="this.className=\'bg\'">' +
'        <p><span class="wycdHeader" onClick="toggle(\'expandImage\',\'listOne\');" title="Click here to show/hide the \'What You Can Do\' section."><img src="http://www.epa.gov/region1/images2/misc/contract.gif" name="expandImage" width="11" height="11" id="expandImage"></span><span class="wycdHeader" onClick="toggle(\'expandImage\',\'listOne\');" title="Click here to show/hide the \'What You Can Do\' section."><strong>What You Can Do</strong></span></p>' +
'      </div>' +
'	  <div id="listOne">' +
// what you can do starts here 
'     <ul id="wycd">' +
'       <li class="bg" onMouseOver="this.className=\'bgRollover\'" onMouseOut="this.className=\'bg\'"><a href="http://www.energystar.gov/index.cfm?fuseaction=globalwarming.showPledge&amp;cpd_id=15245" title="EPA National">Take the ENERGY STAR Pledge Today!</a></li>' +
'       <li class="bg" onMouseOver="this.className=\'bgRollover\'" onMouseOut="this.className=\'bg\'"><a href="http://www.epa.gov/cellphone/">Recycle Your Cell Phone. It\'s an Easy Call.</a></li>' +
'        <li class="bg" onMouseOver="this.className=\'bgRollover\'" onMouseOut="this.className=\'bg\'"><a href="http://www.epa.gov/region1/eco/energy/energy-challenge.html">Community Energy Challenge</a></li>' +
'       <li class="bg" onMouseOver="this.className=\'bgRollover\'" onMouseOut="this.className=\'bg\'"><a href="http://www.epa.gov/region1/earthday/index.html">Earth Day Every Day</a></li>' +
'        <li class="bg" onMouseOver="this.className=\'bgRollover\'" onMouseOut="this.className=\'bg\'"><a href="http://www.epa.gov/region1/communities/traveltips.html">Eco-Friendly Travel Tips</a></li>' +
'        <li class="bg" onMouseOver="this.className=\'bgRollover\'" onMouseOut="this.className=\'bg\'"><a href="http://www.epa.gov/region1/solidwaste/electronic/index.html">Recycle Your Old PC/Mac</a></li>' +
'        <li class="bg" onMouseOver="this.className=\'bgRollover\'" onMouseOut="this.className=\'bg\'"><a href="http://www.energystar.gov/index.cfm?c=evaluate_performance.bus_portfoliomanager">Benchmark Your Building\'s Energy Use</a></li>' +
'        <li class="bg" onMouseOver="this.className=\'bgRollover\'" onMouseOut="this.className=\'bg\'"><a href="http://yosemite.epa.gov/opa/admpress.nsf/names/r01_2007-9-27_bwc">Best Workplaces for Commuters</a></li>' +
'      </ul>' +
'	  </div>' +
'	  <div style="padding:1px;"></div>' +
'    </div>' +			   
'');
// go here for full documentation http://www.safalra.com/programming/javascript/collapse.html
document.getElementById('listOne').style.display="block"; // collapse list "block" = uncollapsed on load,  "none"=collasped
//document.getElementById('listTwo').style.display="none"; // collapse list 
// this function toggles the status of a list 
function toggle(image,list){ 
var listElementStyle=document.getElementById(list).style; 
	if (listElementStyle.display=="none"){ 
	listElementStyle.display="block"; 
	document.getElementById(image).src="http://www.epa.gov/region1/images2/misc/contract.gif"; 
//	document.getElementById(image).alt="Close list"; 
	}else{ 
	listElementStyle.display="none"; 
	document.getElementById(image).src="http://www.epa.gov/region1/images2/misc/expand.gif"; 
//	document.getElementById(image).alt="Open list"; 
	}
 } 
/* auto collapse "what you can do" section after 15 seconds.*/
function closeTimer() {
	setTimeout("toggle('expandImage','listOne')", 30000);
}
window.onLoad=closeTimer();
