// **************
// script used to display navigation links & other pre-defined functions
// Written by: Conrad Matiuk, CUAHSI - December 20, 2007
// **************


function sidenav() {
document.write(
'<a href="index.html">Conference Home</a>'
+'<a href="#" style="background: beige; color: navy;">&nbsp;</a>'
+'<a href="topics.html" title="Conference Topics">Conference Topics</a>'
+'<a href="docs/ICRW4-Program.pdf" target="_blank" style="color: red;" title="Final Program">Final Program (PDF)</a>'
//+'<a href="docs/ICRW4-Agenda.pdf" target="_blank" style="color: red; text-indent: 1.0em;">PDF Version</a>'
+'<a href="lodging.html" title="Lodging & Weather">Lodging & Weather</a>'
//+'<a href="transportation.html" title="Transportation">Transportation</a>'
+'<a href="fieldtrips.html" title="Field Trips">Field Trips</a>'
+'<a href="abstracts.html" title="Discussions, Abstracts, and Proceedings">Submit Abstracts & Manuscripts</a>'
//+'<a href="presentations.html" title="Presentations">Presentations</a>'
//+'<a href="workshops.html" title="Workshopss">Workshops & Ancillary Meetings</a>'
//+'<a href="resources.html" title="Resources">Resources</a>'
+'<a href="sponsors.html" title="Sponsors">Sponsors</a>'
+'<a href="faqs.html" title="FAQs">FAQs</a>'
+'<a href="contacts.html" title="Contacts">Contacts/Info</a>'
+'<a href="feedback-form.cfm" title="Feedback">Feedback</a>'
+'<a href="#" style="background: beige; color: navy;">&nbsp;</a>'
+'<a href="registration.html" title="Registration" style="color: red;">Registration</a>'
+'<a href="#" style="background: beige; color: navy;">&nbsp;</a>'
+'<a href="docs/icrw4-flyer.pdf" target="_blank">Download Flyer</a>'
+'<a href="#" style="background: beige; color: navy;">&nbsp;</a>'
+'<p style="text-align: center; font-size: 9pt; font-family: verdana; background: #dcdcdc; padding: 6px 0px;">Additional material<br>to be posted as available'
);
} // end function

function header()
{
document.write('<h3>CUAHSI Fall 2007 Regional Meetings</h3><p><a href="rm-austin-20071005.html">Austin</a> | <a href="rm-chicago-20071012.html">Chicago</a> | <a href="rm-boise-20071026.html">Boise</a></p>');
}

function footer()
{
document.write('<a href="index.html">ICRW Home</a> | <a href="topics.html">Topics</a> | <a href="docs/ICRW4-Program.pdf" target="_blank">Program</a> | <a href="lodging.html">Lodging</a> | <a href="registration.html">Registration</a> | <a href="contacts.html">Contacts</a> | <a href="feedback-form.cfm" title="Feedback">Feedback</a> | <a href="http://www.cuahsi.org">CUAHSI Home</a><hr width="50%"><script type="text/javascript" language="Javascript">page_upd();</script><a href="mailto:webmaster@cuahsi.org?Subject=ICRW Web Site Comment">Contact Webmaster</a>');
//document.write('<a href="index.html">ICRW Home</a> | <a href="topics.html">Topics</a> | <a href="agenda.html">Agenda</a> | <a href="lodging.html">Lodging</a> | <a href="registration.html">Registration</a> | <a href="contacts.html">Contacts</a> | <a href="http://www.cuahsi.org">CUAHSI Home</a><hr width="50%"><span style="color: black;"><script type="text/javascript" language="Javascript">page_upd();</script></span>');
}

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>');
}

// 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()) + "</div>");
document.write("<div class='links'>URL: " + document.location.href + "</div>"); 
}

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></div>');
}

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;
}

//------------------------------------------------
// Purpose: display and hide Executive minutes.
// -----------------------------------------------
//    Date    By  Description
// ----------	--- ------------------------------
// 11/09/2005 cm  Initial revision.
//------------------------------------------------
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['yr2006'].display = 'none';
		document.layers['yr2005'].display = 'none';
		document.layers['yr2004'].display = 'none';
		document.layers['yr2003'].display = 'none';
		document.layers['yr2002'].display = 'none';
		document.layers['yr2001'].display = 'none';
	}
	else if (document.all)
	{
		document.all['yr2006'].style.display = 'none';
		document.all['yr2005'].style.display = 'none';
		document.all['yr2004'].style.display = 'none';
		document.all['yr2003'].style.display = 'none';
		document.all['yr2002'].style.display = 'none';
		document.all['yr2001'].style.display = 'none';
	}
	else if (document.getElementById)
	{
		document.getElementById('yr2006').style.display = 'none';
		document.getElementById('yr2005').style.display = 'none';
		document.getElementById('yr2004').style.display = 'none';
		document.getElementById('yr2003').style.display = 'none';
		document.getElementById('yr2002').style.display = 'none';
		document.getElementById('yr2001').style.display = 'none';
	}
}

function menu_alert(thispage){
	alert(dayoftheweek() + "\n\n_________________ CUAHSI _________________\n\nOur " + thispage + " page is currently under development.\n\n Thanks for your patience.\n\n_________________ CUAHSI _________________");
} // end function

