// **************
// script used to display navigation links & other pre-defined functions
// Written by: Conrad Matiuk, CUAHSI - April 11, 2007
// **************


// ** Main navigation schema
function sidenav() {
document.write(
'<a href="index.html">WATERS Home</a>'
+'<a href="about.html">About</a>'
+'<a href="design.html">Project Office</a>'
//+'<a href="team.html">Design Team</a>'
//+'<a href="#" onclick="menu_alert(\'Design Team\')">Design Team</a>'
+'<a href="mgmt.html">Project Office Management</a>'
//+'<a href="#" onclick="menu_alert(\'Project Office Management\')">Project Office Management</a>'
//+'<a href="board.html">Advisory Board</a>'
+'<a href="plngdocs.html">Planning Documents</a>'
+'<a href="presentations.html">Presentations</a>'
+'<a href="news.html">Newsletters</a>'
+'<dl id="subs">'
+'<dt><a href="news.html#subscribe">Subscribe</a></dt>'
+'</dl>'
+'<a href="javascript:void();">Meetings</a>'
+'<dl id="subs">'
+'<dt><a href="http://www.cuahsi.org/meetings/wtb-presentations.html" target="_blank">October 2007 Baltimore Meeting</a></dt>'
+'<dt><a href="workshop-20080324.html">2008 Community Workshop</a></dt>'
+'</dl>'
+'<a href="timeline.html">Timeline</a>'
+'<a href="history.html">History</a>'
+'<a href="contactus.html">Contact Us</a>'
+'<a href="#" onclick="rusure()">Cybercollaboratory</a>'
//+'<a href="http://ecid.ncsa.uiuc.edu/cybercollab/web/guest/home" target="_blank">Cybercollaboratory</a>'
+'<a href="#" style="background-color: rgb(103, 142, 201);">&nbsp;</a>'
+'<a href="wtbs/index.html">WATERS Test Beds Site Home</a>'
//+'<a href="#" style="background: beige;">&nbsp;</a>'
//+'<p align="center" style="font-size: 10px;"><img src="images/cuahsi_logo_notext.gif" width="87" height="87" alt=""><br><a href="http://www.cuahsi.org/" title="link to the Consortium of Universities for the Advancement of Hydrologic Science home page" target="_blank">CUAHSI</a><p align="center" style="font-size: 10px;"><img src="images/NSFlogo1sm.gif" width="64" height="65" alt=""><br><a href="http://www.nsf.gov/" title="link to the National Science Foundation home page" target="_blank">National Science Foundation</a>'
);
} // end function

// ** "WATERS" sub-set navigation schema
function sidenav_about() {
document.write(
'<a href="index.html">WATERS Home</a>'
+'<a href="about.html">About</a>'
+'<dl id="subs">'
+'<dt><a href="elements.html">Elements</a></dt>'
//+'<dt><a href="goals.html">Science</a></dt>'
+'</dl>'
+'<a href="design.html">Project Office</a>'
//+'<a href="team.html">Design Team</a>'
//+'<a href="#" onclick="menu_alert(\'Design Team\')">Design Team</a>'
+'<a href="mgmt.html">Project Office Management</a>'
//+'<a href="#" onclick="menu_alert(\'Project Office Management\')">Project Office Management</a>'
//+'<a href="board.html">Advisory Board</a>'
+'<a href="plngdocs.html">Planning Documents</a>'
+'<a href="presentations.html">Presentations</a>'
+'<a href="news.html">Newsletters</a>'
+'<dl id="subs">'
+'<dt><a href="news.html#subscribe">Subscribe</a></dt>'
+'</dl>'
+'<a href="javascript:void();">Meetings</a>'
+'<dl id="subs">'
+'<dt><a href="workshop-20080324.html">2008 Community Workshop</a></dt>'
+'</dl>'
+'<a href="timeline.html">Timeline</a>'
+'<a href="history.html">History</a>'
+'<a href="contactus.html">Contact Us</a>'
+'<a href="#" onclick="rusure()">Cybercollaboratory</a>'
//+'<a href="http://ecid.ncsa.uiuc.edu/cybercollab/web/guest/home" target="_blank">Cybercollaboratory</a>'
+'<a href="#" style="background-color: rgb(103, 142, 201);">&nbsp;</a>'
+'<a href="wtbs/index.html">WATERS Test Beds Site Home</a>'
//+'<a href="#" style="background: beige;">&nbsp;</a>'
//+'<p align="center" style="font-size: 10px;"><img src="images/cuahsi_logo_notext.gif" width="87" height="87" alt=""><br><a href="http://www.cuahsi.org/" title="link to the Consortium of Universities for the Advancement of Hydrologic Science home page" target="_blank">CUAHSI</a><p align="center" style="font-size: 10px;"><img src="images/NSFlogo1sm.gif" width="64" height="65" alt=""><br><a href="http://www.nsf.gov/" title="link to the National Science Foundation home page" target="_blank">National Science Foundation</a>'
);
} // end function

// ** "WATERS" sub-set navigation schema
function sidenav_news() {
document.write(
'<a href="index.html">WATERS Home</a>'
+'<a href="about.html">About</a>'
+'<a href="design.html">Project Office</a>'
//+'<a href="team.html">Design Team</a>'
//+'<a href="#" onclick="menu_alert(\'Design Team\')">Design Team</a>'
+'<a href="mgmt.html">Project Office Management</a>'
//+'<a href="#" onclick="menu_alert(\'Project Office Management\')">Project Office Management</a>'
//+'<a href="board.html">Advisory Board</a>'
+'<a href="plngdocs.html">Planning Documents</a>'
+'<a href="presentations.html">Presentations</a>'
+'<a href="news.html" title="click to hide available monthly newsletters in the navigation bar">Newsletters</a>'
+'<dl id="pdfs"><dt><a href="#" style="color: black;" onClick="hideall(); blocking(\'yr2009\'); return false;" title="click to reveal available monthly 2009 newsletters">2009 PDFs</a></dt>'
+'<dl ID="yr2009" style="display: none;">'
+'<dt><a href="docs/WNNApril2009.pdf" target="_blank">April \'09</a></dt>'
+'</dl></dl>'
+'<dl id="pdfs"><dt><a href="#" style="color: black;" onClick="hideall(); blocking(\'yr2008\'); return false;" title="click to reveal available monthly 2008 newsletters">2008 PDFs</a></dt>'
+'<dl ID="yr2008" style="display: none;">'
+'<dt><a href="docs/WNNJan2008.pdf" target="_blank">January \'08</a></dt>'
+'<dt><a href="docs/WNNSept2008.pdf" target="_blank">September \'08</a></dt>'
+'</dl></dl>'
+'<dl id="pdfs"><dt><a href="#" style="color: black;" onClick="hideall(); blocking(\'yr2007\'); return false;" title="click to reveal available monthly 2007 newsletters">2007 PDFs</a></dt>'
+'<dl ID="yr2007" style="display: none;">'
+'<dt><a href="docs/WNNMay2007.pdf" target="_blank">May \'07</a></dt>'
+'<dt><a href="docs/WNNOct2007.pdf" target="_blank">October \'07</a></dt>'
+'</dl></dl>'
+'<dl id="pdfs"><dt><a href="#" style="color: black;" onClick="hideall(); blocking(\'yr2006\'); return false;" title="click to reveal available monthly 2006 newsletters">2006 PDFs</a></dt>'
+'<dl ID="yr2006" style="display: none;">'
+'<dt><a href="docs/CQUmarch2006.pdf" target="_blank">March \'06</a></dt>'
+'<dt><a href="docs/CQUseptember2006.pdf" target="_blank">September \'06</a></dt>'
+'</dl></dl>'
+'<dl id="pdfs"><dt><a href="#" style="color: black;" onClick="hideall(); blocking(\'yr2005\'); return false;" title="click to reveal available monthly 2005 newsletters">2005 PDFs</a></dt>'
+'<dl ID="yr2005" style="display: none;">'
+'<dt><a href="docs/CQUnov2005.pdf" target="_blank">November \'05</a></dt>'
+'</dl></dl>'
+'<a href="javascript:void();">Meetings</a>'
+'<dl id="subs">'
+'<dt><a href="workshop-20080324.html">2008 Community Workshop</a></dt>'
+'</dl>'
+'<a href="timeline.html">Timeline</a>'
+'<a href="history.html">History</a>'
+'<a href="contactus.html">Contact Us</a>'
+'<a href="#" onclick="rusure()">Cybercollaboratory</a>'
//+'<a href="http://ecid.ncsa.uiuc.edu/cybercollab/web/guest/home" target="_blank">Cybercollaboratory</a>'
+'<a href="#" style="background-color: rgb(103, 142, 201);">&nbsp;</a>'
+'<a href="wtbs/index.html">WATERS Test Beds Site Home</a>'
//+'<a href="#" style="background: beige;">&nbsp;</a>'
//+'<p align="center" style="font-size: 10px;"><img src="images/cuahsi_logo_notext.gif" width="87" height="87" alt=""><br><a href="http://www.cuahsi.org/" title="link to the Consortium of Universities for the Advancement of Hydrologic Science home page" target="_blank">CUAHSI</a><p align="center" style="font-size: 10px;"><img src="images/NSFlogo1sm.gif" width="64" height="65" alt=""><br><a href="http://www.nsf.gov/" title="link to the National Science Foundation home page" target="_blank">National Science Foundation</a>'
);
} // end function

// ** Workshop navigation schema
function wn_20080324() {
document.write(
'<dt><a href="workshop-20080324.html">Workshop Home</a></dt>'
+'<dt><a href="docs/workshop-20080324-final-agenda.pdf" target="_blank" style="color: red; font-weight: 600;">Final Agenda</a></dt>'
+'<dt><a href="docs/Final-participant-list.pdf" target="_blank">Participant List</a></dt>'
+'<dt><a href="workshop-breakouts-20080324.html">Disciplinary and Cross-Disciplinary breakout group reports</a></dt>'
+'<dt><a href="workshop-presentations-20080324.html">Workshop Slide Presentations</a></dt>'
+'<dt><a href="http://www.tvworldwide.com/events/waters_network/080324/" target="_blank">Archived Workshop presentations and video</a></dt>'
//+'<dt><a href="http://www.tvworldwide.com/events/waters_network/080324/" target="_blank">Live Webcast</a></dt>'
//+'<dt><a href="workshop-form.html">Workshop Registration Form</a></dt>'
+'<dt style="padding-top: 0px;">&#8226;&nbsp;<strong>Science, Education, and Design Strategy for the WATer and Environmental Research Systems Network (SEDS)-February 27, 2008</strong><br>&#8226;&nbsp;<a href="http://www.watersnet.org/docs/SEDS-20080227-draft.pdf" target="_blank" class="moreinfo">Main document (draft)</a><br>&#8226;&nbsp;<a href="http://www.watersnet.org/docs/SEDS-20080227-appendices.pdf" target="_blank" class="moreinfo">Appendices</a> (all)'
+'<blockquote style="margin-top: 0pt; margin-bottom: 0pt; margin-left: 10pt;">'
+'&#8226;&nbsp;<a href="http://www.watersnet.org/docs/SEDS-20080227-Appendix-A.pdf" target="_blank" class="moreinfo">Appendix A</a><br>'
+'&#8226;&nbsp;<a href="http://www.watersnet.org/docs/SEDS-20080227-Appendix-B.pdf" target="_blank" class="moreinfo">Appendix B</a><br>'
+'&#8226;&nbsp;<a href="http://www.watersnet.org/docs/SEDS-20080227-Appendix-C.pdf" target="_blank" class="moreinfo">Appendix C</a>'
+'</blockquote>'
+'&#8226;&nbsp;<a href="http://blog.watersnet.org" target="_blank" class="moreinfo">Comments Blog</a><hr></dt>'
//+'<dt><a href="workshop-20080324-hilton.html">Hilton Hotel Reservations</a></dt>'
//+'<dt><a href="workshop-20080324-holidayinn.html">Holiday Inn Reservations</a></dt>'
);
} // end function

function waters_sidenav_20070227() {
document.write(
'<a href="index.html">WATERS Home</a>'
+'<a href="about.html">About</a>'
+'<a href="design.html">Project Office</a>'
+'<a href="team.html">Design Team</a>'
+'<a href="mgmt.html">Management Team</a>'
+'<a href="board.html">Advisory Board</a>'
+'<a href="timeline.html">Timeline</a>'
+'<a href="history.html">History</a>'
+'<a href="contactus.html">Contact Us</a>'
//+'<a href="#" style="background: beige;">&nbsp;</a>'
//+'<a href="http://www.cuahsi.org/index.html">CUAHSI Home</a>'
+'<a href="#" style="background: beige;">&nbsp;</a>'
);
} // 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>).<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" title="link to home page">Home</a> |  <a href="about.html" title="link to About page">About</a> | <a href="design.html" title="link to Project Office page">Project Office</a> | <a href="timeline.html" title="link to Timeline page">Timeline</a> | <a href="contactus.html" title="link to Contact Us page">Contact Us</a> |</dt>'
);
} // end function

function botnav_20070529() {
document.write(
'<div align="center">| <a href="index.html" title="link to home page">Home</a> |  <a href="about.html" title="link to About page">About</a> | <a href="design.html" title="link to Project Office page">Project Office</a> | <a href="timeline.html" title="link to Timeline page">Timeline</a> | <a href="contactus.html" title="link to Contact Us page">Contact Us</a> | <a href="http://www.cuahsi.org/index.html" title="link to home page">CUAHSI Home</a> |</dt>'
);
} // end function

function botnav_20070220() {
document.write(
'<div align="center"><a href="http://www.cuahsi.org/index.html" title="link to home page">CUAHSI Home</a> | <a href="about.html" title="link to about page">About</a> | <a href="#" title="link to stuff">Stuff</a> | <a href="#" title="link to more stuff">More Stuff</a> | <a href="#" title="link to a lot of stuff">A lot of stuff</a> | <a href="#" title="link to downloads page">Downloads</a> | <a href="http://www.hydrologicscience.org/his/feedback-form.cfm" title="link to feedback page">Feedback</a></dt>'
);
} // 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 blocking(nr)
{
	if (document.layers)
	{
		current = (document.layers[nr].display == 'none') ? 'block' : 'none';
		document.layers[nr].display = current;
	}
	else if (document.all)
	{
		current = (document.all[nr].style.display == 'none') ? 'block' : 'none';
		document.all[nr].style.display = current;
	}
	else if (document.getElementById)
	{
		vista = (document.getElementById(nr).style.display == 'none') ? 'block' : 'none';
		document.getElementById(nr).style.display = vista;
	}
}

function hideall()
{
	if (document.layers)
	{
		document.layers['yr2009'].display = 'none';
		document.layers['yr2008'].display = 'none';
		document.layers['yr2007'].display = 'none';
		document.layers['yr2006'].display = 'none';
		document.layers['yr2005'].display = 'none';
	}
	else if (document.all)
	{
		document.all['yr2009'].style.display = 'none';
		document.all['yr2008'].style.display = 'none';
		document.all['yr2007'].style.display = 'none';
		document.all['yr2006'].style.display = 'none';
		document.all['yr2005'].style.display = 'none';
	}
	else if (document.getElementById)
	{
		document.getElementById('yr2009').style.display = 'none';
		document.getElementById('yr2008').style.display = 'none';
		document.getElementById('yr2007').style.display = 'none';
		document.getElementById('yr2006').style.display = 'none';
		document.getElementById('yr2005').style.display = 'none';
	}
}

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_________________ WATERS Network _________________\n\nOur " + thispage + " page is currently under development.\n\n Thanks for your patience.\n\n_________________ WATERS Network _________________");
} // end function

function rusure(){
	question = confirm("Please Note:\n\nThe Cybercollaboratory site is password protected.\n\nAre you sure you want to proceed?\n\nIf so, you will need to turn off any pop-up blockers.  Thanks.")
	if (question !="0"){
//		window.top.location = "http://river.sdsc.edu/hisweb/"
		open("http://ecid.ncsa.uiuc.edu/cybercollab/web/guest/home","collab")
	}
}