    {  
      normal=new Array(5);
      normal[0]="contact.jpg";
      normal[1]="schedule.jpg";
      normal[2]="material.jpg";
      normal[3]="personal.jpg";
      normal[4]="home.jpg";
      enhanced=new Array(5);
      enhanced[0]="contact_h.jpg";
      enhanced[1]="schedule_h.jpg";
      enhanced[2]="material_h.jpg";
      enhanced[3]="personal_h.jpg";
      enhanced[4]="home_h.jpg";

      navItems = new Array( )
      navItems[0] = new Array("How To Contact","How to Contact Dr. Lipson","contact","where",
                            "When and where to get in touch with Dr. Lipson",143,125,150,26)
      navItems[1] = new Array("Class Schedule","Dr. Lipson\\\'s Class Schedule","schedule","sched",
                             "Dr. Lipson\'s class schedule and office hours.",145,26,152,27)
      navItems[2] = new Array("Syllabus","Your syllabus - assignments - and so forth","material","material",
                             "Your syllabus, calendar, assignments\nand other course materials.\n\nHow to earn an A  !!!",148,25,155,26)
      navItems[3] = new Array("Personal","Personal Information","personal","personal",
                             "Dr. Lipson\'s hobbies, interests,\nlinks and other BORING stuff.",86,23,90,24)
      navItems[4] = new Array("Back Home","Return to Dr. Lipson\\\'s Home Page","home","Welcome",
                             "Back to Dr. Lipson\' home page.",106,22,111,20)
      status1="'How to Contact Dr. Lipson'"
      status2="'Class schedule for Dr. Lipson'"
    }
  function handleMouse(loc,src,status)
    {
       window.status=status;
       if(swapable=='true')
         {
    //       alert("*** "+loc) 
           document[loc].src = phd+"barImages/"+src;
         }   
    }
  function handleMaterialClick(course)
    {
       if(course==" ")alert("Please choose a course\nbelow or to the right.")
       else return;
    }  
  function getMaterials(course)
    {
       if(course==" ") alert("You must first indicate\nthe course you want.");
       else if(course=="not yet") alert("Sorry,\nmaterial for this course in not yet available.\n\nPlease check back closer to the start of the semester.");
       else if(course=="cancel") alert("Sorry,\nthis section has been cancelled.\n\nPlease consult an advisor.")
       else if(course=="done") alert("Sorry,\nmaterial for this course is no longer available.\n\nPlease check with Dr. Lipson if you need further\ninformation.");
       else location=phd+course;
    }
  brwsr = navigator.appName;
  ver = parseFloat(navigator.appVersion);
  swapable = 'false';
  if (brwsr == "Netscape" && ver >= 3.0)
    {
      swapable = 'true';
    }
  else if (brwsr == "Microsoft Internet Explorer" && ver >= 4.0)
    {
      swapable = 'true';
    }
function checkItem(i)
 {
  if(i != 2) {return "window.location='"+phd+navItems[i][3]+".html'"}
  else {return "handleMaterialClick(course.title.options[course.title.selectedIndex].value)" }
 } 
   
function barItem(i)
 {
  document.write('<TR><TD vAlign=center align=right><font face="arial, Arial, Helvetica">')
  document.write('    <A href="#"')
  document.write('       onMouseOver="handleMouse(\''+navItems[i][2]+'\',enhanced['+i+'],\''+navItems[i][1]+'\'); return true" ')
  document.write('       onMouseOut="handleMouse(\''+navItems[i][2]+'\',normal['+i+'],\' \'); return true" ')
  document.write('onClick="'+checkItem(i)+';return true">')
  document.write('      <img src="'+phd+'barImages/'+navItems[i][2]+'.jpg" name=\''+navItems[i][2]+'\' border=0')
  document.write('           alt=\"'+navItems[i][4]+'\"></a>')
  document.write('      </font></td></tr>')
 }
function buildBar()
 {
  document.write('')
  document.write('  <TABLE height="70%" width="100%" border=0>')
  barItem(0)
  barItem(1)
  barItem(2)
  document.write('  <tr><td align="right"><FORM name="course">')
  document.write('    <SELECT name="title" onChange="getMaterials(this.options[this.selectedIndex].value,this.options[this.selectedIndex])">')
  document.write('      <OPTION VALUE="">&nbsp;&nbsp;&nbsp;Spring 2006')
  document.write('      <OPTION VALUE="done"> CPS 2231 (01)')
  document.write('      <OPTION VALUE="done"> CPS 2232 (02)')
  document.write('      <OPTION VALUE="done"> CPS 3740 (01)')
  document.write('      <OPTION VALUE="">&nbsp;&nbsp;&nbsp;Fall 2005')
  document.write('      <OPTION VALUE="done"> CPS 2231 (02)')
  document.write('      <OPTION VALUE="done"> CPS 2232 (01)')
  document.write('      <OPTION VALUE="done"> CPS 2232 (02)')
  document.write('      <OPTION VALUE=" " SELECTED> <em>pick one</em>')
  document.write('    </SELECT>')
  document.write('<br><em><font color="#AACCFF">Which course</font>?  </em>')
  document.write('  </FORM> ')
  document.write('  </font></td></tr>')
  barItem(3)
  barItem(4)
  document.write('</table>')
  } 
 

