//	FILNAM:	...\aspin\scripts\main_scripts.js
//	ORGDAT:	2004 
//	UPDATE:	17-MAR-09
//
//	FILTTL:	ASPIN Main Scripts
//
//  Note:  If change horizon() or leftnav(), need to make the same changes
//            in subhorizon() or subleftnav()
//
//	12-Mar-06
//		Changed table width from a fixed value to 100%, so table will
//		  adjust to variable browser widths
//		Reference to a non-existant privacy page was removed.
//  13-Mar-06
//		Moved the <td> specifications out of the leftnav function and into
//		  the HTML so that the <td> attributes incorrectly attached to a <tr>
//		  tag could be inserted into the <td> tag.
//
//  28-May-06
//		Created sub-directory versions of the main functions so that relative
//		  path HREFs would still work.  The preceeding version, Date.js, had
//		  two versions.  The second version was located in the archives 
//		  directory and added "../" in front of relative URLs.		
//
//  01-Oct-06, 08-Oct-06
//		Added link to new roadmap page to left side menu.
//		Shortened length of name of link to two words so it does not seem
//		  to display as two different links.
//
//  18-Feb-07
//		Added link to new roadmap page to left side menu for sub-directories
//		  i.e. function subleftnav()
//
//  25-Nov-07
//		Changed link to survey page (renamed from quest.html to survey.html)
//		Removed link to roadmap page
//		Changed link name "SPIN Bylaws" to "A-SPIN Bylaws"
//		Updated copyright year
//
//  30-Mar-08
//		Updated link to SEI Spins page to match change made by SEI.
//
//  08-Jun-08	
//		Added link to Austin SW Community Collaboration page.
//
//  15-Jan-09	
//		Removed link to Austin SW Community Collaboration page.
//		Added Meeting Location link.
//		Added blank lines between each link in the left nav to improve readability.
//
//  20-Jan-09	
//		Made same changes to subleftnav().  Fixed <strong></strong> tags.
//  
//  25-Feb-09	
//		Added links to Sponsor and Sponsor Information pages.
// 
//  17-MAR-09	
//		Changed "Archives" link name to "Meeting Archives".
//  
function horizon() {
  document.write(" <tr><td colspan='2' bgcolor='#008888'> ");
  document.write(" <table width='100%' cellspacing='3' cellpadding='3' align='center'><tr valign='middle'> ");
  document.write(" <td align='center'><font face='Arial,Helvetica,sans-serif' size='-1' color='#ffffff'><strong> ");
  document.write("      <a href='index.html' class='nav'>Announcements</a></strong></font></td> ");
  document.write(" <td align='center'><font face='Arial,Helvetica,sans-serif' size='-1' color='#ffffff'><strong> ");
  document.write("      <a href='charter.html' class='nav'>Charter</a></strong></font></td> ");
  document.write(" <td align='center'><font face='Arial,Helvetica,sans-serif' size='-1' color='#ffffff'><strong> ");
  document.write("      <a href='contacts.html' class='nav'>Contact Us</a></strong></font></td> ");
  document.write(" <td align='center'><font face='Arial,Helvetica,sans-serif' size='-1' color='#ffffff'><strong> ");
  document.write("      <a href='history.html' class='nav'>History</a></strong></font></td> ");
  document.write(" <td align='center'><font face='Arial,Helvetica,sans-serif' size='-1' color='#ffffff'><strong> ");
  document.write("      <a href='board.html' class='nav'>Board Members</a></strong></font></td> ");
  document.write(" </font> ");
  document.write(" </tr></table> ");
  document.write(" </td></tr> ");
}

function leftnav() {
//  document.write(" <td bgcolor='#666666'><font face='Arial,Helvetica,sans-serif' size='-1' color='#ffffff'> ");
  document.write(" &nbsp;<BR> ");
  document.write(" <strong><a href='maps/amplify/amplify_map.html' class='nav'>Meeting Location</A></strong><BR> ");
  document.write(" &nbsp;<BR> ");
  document.write(" <strong><a href='archives.html' class='nav'>Meeting Archives</A></strong><BR> ");
  document.write(" &nbsp;<BR> ");
  document.write(" <strong><a href='sponsors.html' class='nav'>Sponsors</A></strong><BR> ");
  document.write(" &nbsp;<BR> ");
  document.write(" <strong><a href='sponsor_info.html' class='nav'>Sponsor Info</A></strong><BR> ");
  document.write(" &nbsp;<BR> ");
  document.write(" <strong><a href='survey.html' class='nav'>Survey Results Nov 07</A></strong><BR> ");
  document.write(" &nbsp;<BR> ");
  document.write(" <strong><a href='bylaws.html' class='nav'>A-SPIN Bylaws</A></strong><BR> ");
  document.write(" &nbsp;<BR> ");
  document.write(" <strong><a href='http://www.sei.cmu.edu/collaborating/spins/index.html' class='nav'>SEI National SPINs</A></strong><BR> ");
  document.write(" &nbsp;<BR> ");
  document.write(" <strong><a href='resources.html' class='nav'>Other Resources</A></strong> ");
//  document.write(" </font> ");
//  document.write(" </td> ");
}

//
//  Copies of the above 2 functions, modified for use in a sub-directory.  Used,
//    for example, in the archive files.  See notes for 26-May-06, above.

function subhorizon() {
  document.write(" <tr><td colspan='2' bgcolor='#008888'> ");
  document.write(" <table width='100%' cellspacing='3' cellpadding='3' align='center'><tr valign='middle'> ");
  document.write(" <td align='center'><font face='Arial,Helvetica,sans-serif' size='-1' color='#ffffff'><strong> ");
  document.write("      <a href='../index.html' class='nav'>Announcements</a></strong></font></td> ");
  document.write(" <td align='center'><font face='Arial,Helvetica,sans-serif' size='-1' color='#ffffff'><strong> ");
  document.write("      <a href='../charter.html' class='nav'>Charter</a></strong></font></td> ");
  document.write(" <td align='center'><font face='Arial,Helvetica,sans-serif' size='-1' color='#ffffff'><strong> ");
  document.write("      <a href='../contacts.html' class='nav'>Contact Us</a></strong></font></td> ");
  document.write(" <td align='center'><font face='Arial,Helvetica,sans-serif' size='-1' color='#ffffff'><strong> ");
  document.write("      <a href='../history.html' class='nav'>History</a></strong></font></td> ");
  document.write(" <td align='center'><font face='Arial,Helvetica,sans-serif' size='-1' color='#ffffff'><strong> ");
  document.write("      <a href='../board.html' class='nav'>Board Members</a></strong></font></td> ");
  document.write(" </font> ");
  document.write(" </tr></table> ");
  document.write(" </td></tr> ");
}

function subleftnav() {
//  document.write(" <td bgcolor='#666666'><font face='Arial,Helvetica,sans-serif' size='-1' color='#ffffff'> ");
  document.write(" &nbsp;<BR> ");
  document.write(" <strong><a href='../maps/amplify/amplify_map.html' class='nav'>Meeting Location</A></strong><BR> ");
  document.write(" &nbsp;<BR> ");
  document.write(" <strong><a href='../archives.html' class='nav'>Meeting Archives</A></strong><BR> ");
  document.write(" &nbsp;<BR> ");
  document.write(" <strong><a href='../sponsors.html' class='nav'>Sponsors</A></strong><BR> ");
  document.write(" &nbsp;<BR> ");
  document.write(" <strong><a href='../sponsor_info.html' class='nav'>Sponsor Info</A></strong><BR> ");
  document.write(" &nbsp;<BR> ");
  document.write(" <strong><a href='../survey.html' class='nav'>Survey Results Nov 07</A></strong><BR> ");
  document.write(" &nbsp;<BR> ");
  document.write(" <strong><a href='../bylaws.html' class='nav'>A-SPIN Bylaws</A></strong><BR> ");
  document.write(" &nbsp;<BR> ");
  document.write(" <strong><a href='http://www.sei.cmu.edu/collaborating/spins/index.html' class='nav'>SEI National SPINs</A></strong><BR> ");
  document.write(" &nbsp;<BR> ");
  document.write(" <strong><a href='../resources.html' class='nav'>Other Resources</A></strong> ");
//  document.write(" </font> ");
//  document.write(" </td> ");
}


function trailer() {
  var modifieddate = new Date(document.lastModified);
  document.write(" <tr><td colspan='2' align='center' bgcolor='#444400'><font face='Arial,Helvetica,sans-serif' size='-2' color='#ffffff'> ");
  document.write(" This site is best viewed using Microsoft Internet Explorer 4.0 or higher.");
  document.write(" <br>© 2007:  ");
  document.write(" Last Modified: " + (modifieddate.getMonth()+1) + "/" + modifieddate.getDate() + "/" + modifieddate.getYear());
}


function myEmail(name, domain, com, desc){
output += "<A ID=" + name + " HREF=";
output += "mailto:";
output += name + "@" + domain + com + '">' + desc + "</A>";
return output;
}

function ClearForm() {
 document.aspin_update.next_meeting_date.value = "";
 document.aspin_update.next_meeting_subject.value = "";
 document.aspin_update.next_meeting_speaker.value = "";
 document.aspin_update.next_meeting_overview.value = "";
 document.aspin_update.about_speaker.value = "";
 document.aspin_update.directions.value = "";
 document.aspin_update.upcoming_meeting_1_date.value = "";
 document.aspin_update.upcoming_meeting_1_subject.value = "";
 document.aspin_update.upcoming_meeting_1_speaker.value = "";
 document.aspin_update.upcoming_meeting_2_date.value = "";
 document.aspin_update.upcoming_meeting_2_subject.value = "";
 document.aspin_update.upcoming_meeting_2_speaker.value = "";
}

function checkOverview(e)
{
  var CR = 13; // Carriage Return
  var TAB = 9; // Horizontal Tab
  var AMP = 38; // Ampersand 
  var strInput = document.aspin_update.next_meeting_overview.value;
  var charCode;
  if (navigator.appName == "Netscape")
     charCode = e.which 
  else 
     charCode = e.keyCode;
	 
  if (charCode == CR) {
  
    strInput = strInput + "<br><br>";
	document.aspin_update.next_meeting_overview.value = strInput;
  }
  
  return true;
}

function checkAboutSpeaker(e)
{
  var CR = 13; // Carriage Return
  var TAB = 9; // Horizontal Tab
  var AMP = 38; // Ampersand 
  var strInput = document.aspin_update.about_speaker.value;
  var charCode;
  if (navigator.appName == "Netscape")
     charCode = e.which 
  else 
     charCode = e.keyCode;
	 
  if (charCode == CR) {
  
    strInput = strInput + "<br><br>";
	document.aspin_update.about_speaker.value = strInput;
  }
  
  return true;
}
  


