// **************
// script used to display navigation links & other pre-defined functions
// Written by: Conrad Matiuk, CUAHSI - June 17, 2009
// **************


// ** Main navigation schema
function sidenav() {
document.write(
'<ul class="leftnavigation">'
+'<li><a href="index.html">Section Home</a></li>'
+'<li><a href="officers.html">Officers</a></li>'
+'<li><a href="committees.html">Committees</a></li>'
+'<li><a href="bylaws.html">Bylaws</a></li>'
+'<li><a href="http://www.agu.org/meetings/" target="_blank">Meetings</a></li>'
//+'<li><a href="docs/AGUHydro-201007.pdf" target="_blank">Newsletter</a></li>'
+'<li><a href="newsletter.html">Newsletter</a></li>'
+'<li><a href="awards.html">Awards &amp; Honors</a></li>'
+'<li><a href="resources.html">Resources</a></li>'
+'<li><a href="focus.html">Related Focus Groups</a></li>'
+'<li><a href="photos.html">Photo Gallery</a></li>'
+'<li><a href="http://www.agu.org/journals/wr/" target="_blank">Water Resources Research</a></li>'
+'<li><a href="http://www.agu.org/" target="_blank">AGU Home</a></li>'
+'<li><a href="http://www.agu.org/membership/" target="_blank">Join AGU</a></li>'
+'</ul>'
);
} // end function

// ** Langbein navigation schema
function sidenav_langbein() {
document.write(
'<a href="index.html">H-Section Home</a>'
+'<a href="agu-meetings.html">Meetings</a>'
+'<a href="honors.html">Recent Honors</a>'
+'<a href="honors-archive.html">Honors & Awards</a>'
+'<a href="langbein.html">Langbein Lecture</a>'
+'<dl id="subs">'
+'<dt><a href="langbein-awardees.html">Past Awardees</a></dt>'
+'</dl>'
+'<a href="#" style="background: beige;">&nbsp;</a>'
+'<a href="resources.html">Resources</a>'
+'<a href="gallery3.html#show">Photo Gallery</a>'
+'<a href="#" style="background: beige;">&nbsp;</a>'
+'<a href="stac.html">Committees</a>'
+'<a href="bylaws.html">Bylaws</a>'
+'<a href="#" style="background: beige;">&nbsp;</a>'
+'<a href="#" style="background: #369; color: #fff; text-indent: 1.0em;">Related Sites</a>'
+'<a href="http://www.agu.org/about/governance/" target="_blank">AGU Governance</a>'
+'<a href="http://www.agu.org/about/governance/leadership/index.php#sectionls" target="_blank">AGU Focus Group Leadership</a>'
+'<a href="http://www.agu.org/journals/wr" target="_blank">WRR Web Page</a>'
+'<a href="#" style="background: beige;">&nbsp;</a>'
+'<a href="http://www.agu.org/membership/" target="_blank" class="devforum">Join AGU</a>'
);
} // end function

// ** Committees sub-set navigation schema
function sidenav_comm() {
document.write(
'<a href="index.html">H-Section Home</a>'
+'<a href="agu-meetings.html">Meetings</a>'
+'<a href="honors.html">Recent Honors</a>'
+'<a href="honors-archive.html">Honors & Awards</a>'
+'<a href="langbein.html">Langbein Lecture</a>'
+'<a href="#" style="background: beige;">&nbsp;</a>'
+'<a href="resources.html">Resources</a>'
+'<a href="gallery3.html#show">Photo Gallery</a>'
+'<a href="#" style="background: beige;">&nbsp;</a>'
+'<a href="stac.html">Committees</a>'
+'<dl id="subs">'
+'<dt><a href="stac.html">STAC</a></dt>'
+'<dt><a href="excom.html">Excom</a></dt>'
+'<dt><a href="section_officers.html">All Officers</a></dt>'
+'</dl>'
+'<a href="bylaws.html">Bylaws</a>'
+'<a href="#" style="background: beige;">&nbsp;</a>'
+'<a href="#" style="background: #369; color: #fff; text-align: center;">Related Sites</a>'
+'<a href="http://www.agu.org/about/governance/" target="_blank">AGU Governance</a>'
+'<a href="http://www.agu.org/about/governance/leadership/index.php#sectionls" target="_blank">AGU Focus Group Leadership</a>'
+'<a href="http://www.agu.org/journals/wr" target="_blank">WRR Web Page</a>'
+'<a href="#" style="background: beige;">&nbsp;</a>'
+'<a href="http://www.agu.org/membership/" target="_blank" class="devforum">Join AGU</a>'
);
} // end function

// ** Resources sub-set navigation schema
function sidenav_resources() {
document.write(
'<a href="index.html">H-Section Home</a>'
+'<a href="agu-meetings.html">Meetings</a>'
+'<a href="honors.html">Recent Honors</a>'
+'<a href="honors-archive.html">Honors & Awards</a>'
+'<a href="langbein.html">Langbein Lecture</a>'
+'<a href="#" style="background: beige;">&nbsp;</a>'
+'<a href="resources.html">Resources</a>'
+'<dl id="subs">'
+'<dt><a href="resources.html">AGU Digital Library</a></dt>'
+'<dt><a href="tapes.html">Taped Interviews</a></dt>'
+'<dt><a href="cuahsi-news.html">CUAHSI Links</a></dt>'
+'<dt><a href="links.html">Hydrology Links</a></dt>'
+'</dl>'
+'<a href="gallery3.html#show">Photo Gallery</a>'
+'<a href="#" style="background: beige;">&nbsp;</a>'
+'<a href="stac.html">Committees</a>'
+'<a href="bylaws.html">Bylaws</a>'
+'<a href="#" style="background: beige;">&nbsp;</a>'
+'<a href="#" style="background: #369; color: #fff; text-align: center;">Related Sites</a>'
+'<a href="http://www.agu.org/about/governance/" target="_blank">AGU Governance</a>'
+'<a href="http://www.agu.org/about/governance/leadership/index.php#sectionls" target="_blank">AGU Focus Group Leadership</a>'
+'<a href="http://www.agu.org/journals/wr" target="_blank">WRR Web Page</a>'
+'<a href="#" style="background: beige;">&nbsp;</a>'
+'<a href="http://www.agu.org/membership/" target="_blank" class="devforum">Join AGU</a>'
);
} // end function

function header() {
document.write(
'<table width="100%" cellspacing="0" cellpadding="0" border="0" align="center" style="width: 815px; border: 1px solid navy; background-color: rgb(255, 255, 255);"><tr><td align="left" valign="top" width="10%"><img src="images/AGU-hydrology2.jpg" alt="AGU Hydrology Section" height="244" width="800" border="0" align="left" hspace="0"><tr><td align="left" valign="top" STYLE="text-indent: 5.0em; font-family: verdana; font-size: 9pt; padding-bottom: 6px;"><a href="index.html">Hydrology Home</a>&nbsp;|&nbsp;<a href="agu-meetings.html">Meetings</a>&nbsp;|&nbsp;<a href="resources.html">Resources</a>&nbsp;|&nbsp;<a href="stac.html">Committees</a>&nbsp;|&nbsp;<a href="http://www.agu.org" target="_blank">AGU Home</a></td></tr></td></tr></table>'
);
} // end function

function disclaimer()
{
document.write('<p class="sm-text" style="margin-top: 0px;">This material is based upon work supported by the <strong>National Science Foundation</strong> (<a href="http://www.nsf.gov" target="_blanl">NSF</a>) under Grant Nos. 03-26064, 04-12975, and 04-47287.<br><br>Any opinions, findings and conclusions or recommendations expressed in this material are those of the author(s) and do not necessarily reflect the views of the NSF.');
} // end function

function botnav() {
document.write(
'<div align="center">| <a href="index.html">Hydrology Home</a>&nbsp;|&nbsp;<a href="agu-meetings.html">Meetings</a>&nbsp;|&nbsp;<a href="resources.html">Resources</a>&nbsp;|&nbsp;<a href="stac.html">Committees</a>&nbsp;|&nbsp;<a href="http://www.agu.org" target="_blank">AGU Home</a> |<br><div style="color: #000000;">Website maintained by <a href="http://www.cuahsi.org" target="_blank">CUAHSI</a><br>Submit comments or corrections to <a href="mailto:cmatiuk@cuahsi.org?Subject=AGU Hydrology Section&Body=Your Name:%0A%0AUniversity/Organization:%0A%0AEmail:%0A%0AOther Comments (optional):">Conrad Matiuk</a> at <a href="mailto:cmatiuk@cuahsi.org?Subject=AGU Hydrology Section&Body=Your Name:%0A%0AUniversity/Organization:%0A%0AEmail:%0A%0AOther Comments (optional):">cmatiuk@cuahsi.org</a></div>'
);
} // end function

// General Date function variables

var today_date= new Date()
var day=today_date.getDay()
var month=today_date.getMonth()
var today=today_date.getDate()
//var year=today_date.getYear()
var year=today_date.getFullYear()
var days = new Array("Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday");
var months = new Array("January","February","March","April","May","June","July","August","September","October","November","December");
var alert_date = 'days[day]+", "+months[month]+" "+today+", "+year'

// Functions to display date modified and URL
function makeArray0() 
{
	for (i = 0; i<makeArray0.arguments.length; i++)
	this[i] = makeArray0.arguments[i]; 
}

var days = new makeArray0("Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday");
var months = new makeArray0('January','February','March','April','May','June','July','August','September','October','November','December');
				
function nths(day) 
{
	if (day == 1 || day == 21 || day == 31) return 'st';
	if (day == 2 || day == 22) return 'nd';
	if (day == 3 || day == 23) return 'rd';
	return 'th'; 
}
				
function getCorrectedYear(year) 
{
	year = year - 0;
	if (year < 70) return (2000 + year);
	if (year < 1900) return (1900 + year);
	return year;
}
				
function y2k(number) { return (number < 1000) ? number + 1900 : number; }

function page_upd()
{				
var dateError = new Date(document.lastModified);
var date = new Date(getCorrectedYear(dateError.getYear()),dateError.getMonth(),dateError.getDate());
				
document.write("<div class='links'>Last updated on " + days[date.getDay()] + ", " + months[date.getMonth()] + " " + date.getDate() + nths(date.getDate()) + ", " + y2k(date.getYear()) + "</dt>");
document.write("<div class='links'>URL: " + document.location.href + "</dt>"); 
}

function last_upd()
{
document.write('<div align="center" style="margin: 0px; padding: 0px;" class="links"><script language="JavaScript">document.write("This page last updated: " + Date(document.lastModified))</script></dt>');
}

function dayoftheweek()
{
//------------------------------------------------------+
// Purpose: display day of the week and date.           | 
//------------------------------------------------------+
//    Date    By  Description
// ----------	--- ------------------------------------+
// 09/11/1999 cm  Initial revision.                     |
//------------------------------------------------------+
  var date = new Date();
  var dow  = date.getDay();
  var mon  = date.getMonth() + 1;
  var day  = date.getDate();
  var year = date.getYear();
  switch(dow){
  case 0:
	dow = "Sunday";
	break;
  case 1:
	dow = "Monday";
	break;
  case 2:
	dow = "Tuesday";
	break;
  case 3:
	dow = "Wednesday";
	break;
  case 4:
	dow = "Thursday";
	break;
  case 5:
	dow = "Friday";
	break;
  case 6:
	dow = "Saturday";
	break;
	}
  var todayDate = dow + ', ' + mon + '/' + day + '/' + year;
//  document.write( todayDate );
return todayDate;
}

function reader()
{
document.write('<table width="95%"><tr bgcolor="#fff5ee"><td class="reader" style="border: thin solid #000066; padding: 10px;">You will need Adobe Acrobat Reader, available as a free download, to view some of the files on this Web site. Visit <a href="http://www.adobe.com/products/acrobat/readstep2.html" target="_blank">Adobe\'s PDF Reader page</a> to learn more about PDF and to download the free Acrobat Reader.</td></tr></table>');
}

function menu_alert(thispage){
	alert(dayoftheweek() + "\n\n_________________ CUAHSI HIS _________________\n\nOur " + thispage + " page is currently under development.\n\n Thanks for your patience.\n\n_________________ CUAHSI HIS _________________");
} // end function

