var wel = "Welcome to the Atascadero Art Association";

function w(s)  {document.write(s);}
function wl(s) {document.writeln(s);}

function help() {alert("help!");}

function onOut() {document.getElementById("menuInfo").innerHTML = wel;}

function onOver(id) {
  var s = "What?";
  if      (id == "Home") s = "Home page";
  else if (id == "Artists") s = "List of member artists who have submitted brief biographies and photos of their work";
  else if (id == "MerArtists") s = "Member artists participating in Merchant Program";
  else if (id == "Calendar") s = "A list of past events with links to a page for each documented event plus a calendar announcing coming events";
  else if (id == "Newsletter") s = "The current newsletter";  
  else if (id == "Gallery") s = "List of art currently on exhibit in the Martin Polin Room of the Atascadero Library";
  else if (id == "Scholarship") s = "A page honoring our scholarship winner(s)";
  else if (id == "Links") s = "Links to local art organizations and International museums";
  else if (id == "About") s = "Information about the Atascadero Art Association";

  document.getElementById("menuInfo").innerHTML = s;
}



function CommonHeading() {
//title
//alert("hello");

  wl('<table align="center" style="background-color: white; color: black;" border="1" cellpadding="3" width="100%">');
  wl('<tr>');
  wl('<td align="center">');
  wl('<b>Atascadero <font size="+1"><i>Art</i></font> Association</b>');
  wl('</td>');
  wl('<td align="center">');
  wl('<font size="1">P. O. Box 28, Atascadero<br>California  93423</font>');
  wl('</td>');
  wl('<td align="center">');
  wl('<font size="1">www.atascaderoartassn.fix.net<br>atasarts@gmail.com</font>');
  wl('</td>');
  wl('<td align="center">');
  wl('<font size="2"><b>Hosted by <a href="http://www.fix.net">Fix.net</a></b></font>');
  wl('</td>');
  wl('</td>');
  wl('</tr>');
  wl('</table>');
  //wl('<br clear="all"><br>');

//navigation bar


wl('<table align="center" bgcolor="white" cellpadding="3">');
wl('<tr>');
wl('<td class="hdr" onClick="onOut(); window.location=\'index.html\'" onMouseOver=\'onOver(\"Home\");\' onMouseOut=\'onOut();\'>Home</a></td>');
wl('<td class="hdr" onClick="onOut(); window.location=\'artists.html\'" onMouseOver=\'onOver(\"Artists\");\' onMouseOut=\'onOut();\'>Artists</a></td>');
wl('<td class="hdr" onClick="onOut(); window.location=\'merchantartists.html\'" onMouseOver=\'onOver(\"MerArtists\");\' onMouseOut=\'onOut();\'>Merchant-Artists</a></td>');
wl('<td class="hdr" onClick="onOut(); window.location=\'calendar.html\'" onMouseOver=\'onOver(\"Calendar\");\' onMouseOut=\'onOut();\'>Calendar</a></td>');
wl('<td class="hdr" onClick="onOut(); window.open(\'NL.pdf\')" onMouseOver=\'onOver(\"Newsletter\");\' onMouseOut=\'onOut();\'>Newsletter</a></td>');
wl('<td class="hdr" onClick="onOut(); window.location=\'gallery.html\'" onMouseOver=\'onOver(\"Gallery\");\' onMouseOut=\'onOut();\'>Gallery</a></td>');
wl('<td class="hdr" onClick="onOut(); window.location=\'20090511meeting.html\'" onMouseOver=\'onOver(\"Scholarship\");\' onMouseOut=\'onOut();\'>Scholarship</a></td>');
wl('<td class="hdr" onClick="onOut(); window.location=\'links.html\'" onMouseOver=\'onOver(\"Links\");\' onMouseOut=\'onOut();\'>Links</a></td>');
wl('<td class="hdr" onClick="onOut(); window.location=\'about.html\'" onMouseOver=\'onOver(\"About\");\' onMouseOut=\'onOut();\'>About</a></td>');
wl('</tr>');
wl('</table>');
wl('<table align="center">');
wl('<tr>');
wl('<td>');
wl('<div id="menuInfo" height="50" style="font-size: 8pt; text-align: center;">' + wel + '</div>');
wl('</td>');
wl('</tr>');
wl('</table>');
wl('<br>');

}  // end of CommonHeading function

function writeCookie(nam, val) {
  document.cookie = nam + "=" + encodeURIComponent(val);
}

function readCookie(nam) {
  var s = document.cookie.split("; ");
  //alert("length of s = " + s.length);
  if (s.length == 0) return "";
  for (var i = 0; i < s.length; i++) {
    var ss = s[i].split("=");
    //alert("s[i] = " +  s[i]);
    //alert("|" + nam + "|  |" + ss[0] + "| " + " boolean " + (ss[0] == nam));
    if (ss[0] == nam) return decodeURIComponent(ss[1]);
  }
  return "";
}
