<!--  
//===============================================
//    Project: Women's Studies Website Scripts
//    Author:  Johnny Loi
//===============================================


//===============================================
//    scripts to check which browser: IE or NET
//===============================================

      var brw = navigator.appName;
      var ver = navigator.appVersion;
      var isIE = false;
      var isClicked = false;
 
      if(brw.indexOf('Microsoft') >= 0 && parseInt(ver) >= 4) {
         isIE = true;
      }
  
      
//===============================================
//    scripts for navigation buttons on homepage
//===============================================

      acad = new Image();
      acad.src = "images/acad.gif";
      acadLit = new Image();
      acadLit.src = "images/acadLit.gif";
      faculty = new Image();
      faculty.src = "images/faculty.gif";
      facultyLit = new Image();
      facultyLit.src = "images/facultyLit.gif";
      news = new Image();
      news.src = "images/news.gif";
      newsLit = new Image();
      newsLit.src = "images/newsLit.gif";
      resrc = new Image();
      resrc.src = "images/resrc.gif";
      resrcLit = new Image();
      resrcLit.src = "images/resrcLit.gif";
      about = new Image();
      about.src = "images/about.gif";
      aboutLit = new Image();
      aboutLit.src = "images/aboutLit.gif";
      search = new Image();
      search.src = "images/search.gif";
      searchLit = new Image();
      searchLit.src = "images/searchLit.gif";
     
      function rollOn(imgName) {
        document[imgName].src = eval(imgName + "Lit.src");
      }

      function rollOff(imgName) {
        document[imgName].src = eval(imgName + ".src");
      }

      function chkIsClicked(imgName) {
        if(!isClicked) {
           rollOff(imgName);
        } else {
           isClicked = false;
	}
      }

//===============================================
//    scripts for date
//===============================================

      day = new Array("Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday");
      month = new Array("January", "February", "March", "April", "May", "June", "July", "August",
                        "September", "October", "November", "December");
      date = new Date();

      var theDate = day[date.getDay()] + ", " + month[date.getMonth()] + " " + date.getDate() + ", ";

      if(!isIE) {
	 theDate += (date.getYear() + 1900);
      } else {
	 theDate += date.getYear();
      }

//===============================================
//    scripts for menu
//===============================================

       function showMenu(name) {
	 if(isIE) {
	     isClicked = true;
             switch(name) {
               case "ad":         showAcad();
				  break;
               case "ft":         showFac();
			          break;
               case "nw":	  showNews();
				  break;
	       case "re":	  showRes();
				  break;
	    }
         } else { 
            openWin(name);
	 }
      }

      function openWin(name) {
         window.open(name + ".html", "links",    	 	 	          'toolbar=0,menubar=0,scrollbars=1,resizable=0,status=0,width=300,height=150');
      }
       
      function showAcad() {
           acadprg.style.top = 215;
           acadprg.style.left = 190;
           acadprg.style.visibility = "visible";
	   hideMe('facu', 'faculty');
           hideMe('nws', 'news');
           hideMe('res', 'resrc');
      }

      function showFac() {
           facu.style.top = 267;
           facu.style.left = 190;
           facu.style.visibility = "visible";
           hideMe('acadprg', 'acad');
	   hideMe('nws', 'news');
           hideMe('res', 'resrc');
           
      }

      function showNews() {
           nws.style.top = 319;
           nws.style.left = 190;
           nws.style.visibility = "visible";
           hideMe('acadprg', 'acad');
	   hideMe('facu', 'faculty');
           hideMe('res', 'resrc');
      }	    
	  

      function showRes() {
           res.style.top = 370;
           res.style.left = 190;
           res.style.visibility = "visible";
	   hideMe('acadprg', 'acad');
	   hideMe('nws', 'news');
           hideMe('facu', 'faculty');
      }	

      function hideMe(name, imgName) {
           document.all[name].style.visibility = "hidden";
           rollOff(imgName);
      }


//===============================================
//    scripts for hi-liting and de-liting
//===============================================

      function hiLite(name) {
	  document.all[name].style.background = "#778899";
      }

      function deLite(name) {
	  document.all[name].style.background = "#0000FF";
      }


//===============================================
//    scripts for creating frames
//===============================================

      function makeFrames(file, anchor) {
         str = "<html>" + '\n';
         str += "<head>" + '\n';
         str += "<title>Women's Studies at Binghamton University</title>" + '\n';
         str += "</head>" + '\n';
         str += "<frameset framespacing=0 frameborder=0 rows=22%,*>" + '\n';
         str += "<frame frameborder=0 name=nav scrolling=auto src=navigate.html>" + '\n';
         str += "<frame frameborder=0 name=content src=" + file + "#" + anchor + ">\n";
         str += "</frameset>" + '\n';
         str += "</html>";

         if(window.opener) {
             if(window.opener.location.toString().indexOf('html') == -1) {
		 window.opener.document.write(str);
             } else {
		 window.opener.location = file;
             }
     	     window.close();
         } else {
	     document.write(str);
         }
     }

   
//===============================================
//    script for printing title to status bar 
//===============================================

      function printStatus(pos) {
          myTitle = document.title;
          if(pos < myTitle.length) {
              str = myTitle.charAt(0);

              if(pos > 0) {
                  for(i = 1; i < pos; i++) {
                       str += myTitle.charAt(i);
                  }
                  str += myTitle.charAt(pos);
              }
              
              pos++;
              n = "printStatus(" + pos + ")";
              window.status = str;

              setTimeout(n, 100);
          } else {
              pos = 0;
              n = "printStatus("+ pos + ")";
	      setTimeout("window.status = \' \'", 10000);
              setTimeout(n, 1000);
          }
      }
//-->

fall = new Array(32);
fall[0] = "WOMN 100A/PHIL 180M/SOC 180E";
fall[1] = "WOMN 113/ SOC 113";
fall[2] = "WOMN 126/ANTH 126";
fall[3] = "WOMN 180B/MUS 180B";
fall[4] = "WOMN 180H";
fall[5] = "WOMN 240/SOC 240/LA&C 240/AFST 240";
fall[6] = "WOMN 245/PE 245";
fall[7] = "WOMN 253/SOC 253";
fall[8] = "WOMN 280A/ANTH 280A";
fall[9] = "WOMN 280E/GERM 241C";
fall[10] = "WOMN 280J/ARTS 333";
fall[11] = "WOMN 280M/GERM 241B";
fall[12] = "WOMN 280P/PHIL 280V";
fall[13] = "WOMN 280S/ARTH 244/MDVL 270M";
fall[14] = "WOMN 280T/ARTH 286F/MDVL 292F";
fall[15] = "WOMN 280U/COLI 280U/PHIL 280U";
fall[16] = "WOMN 300/HDEV 345";
fall[17] = "WOMN 317H/AFST 382C/PHIL 317H/ANTH 308Q/ENG 410A/COLI 380F";
fall[18] = "WOMN 324/SOC 324";
fall[19] = "WOMN 340/SOC 340";
fall[20] = "3WOMN 349/HDEV 349";
fall[21] = "WOMN 380A/CINE 321A/COLI 331H";
fall[22] = "WOMN 380J/ PHIL 317U/AFST 381J";
fall[23] = "WOMN 380K/HIST 351";
fall[24] = "WOMN 380M/ANTH 380M";
fall[25] = "WOMN 380S/COLI 380S";
fall[26] = "WOMN 380Z/GERM 380Z/COLI 380Z";
fall[27] = "WOMN 405/PHIL 456F/PLSC 381J";
fall[28] = "WOMN 432/NURS 332";
fall[29] = "WOMN 480F/ARTH 440G/540I/MDVL 440G";
fall[30] = "WOMN 480N/ARTH 540G";
fall[31] = "WOMN 480Y/PHIL 480F/ PHIL 649C /PIC 645";

summer = new Array(32);
for(i = 0; i < summer.length; i++)
{ summer[i] = "         ";}

function getFallCourse()
{
   document.myForm.Summer.checked=false;
   for(i = 0; i < fall.length; i++) {
	document.myForm.course.options.value = i;
	document.myForm.course.options[i].text = fall[i];
   }
}



function getSummerCourse()
{
   document.myForm.Fall.checked=false;
   for(i = 0; i < summer.length; i++) {
	document.myForm.course.options.value = i;
	
	if(summer[i] == null) {
	   document.myForm.course.options[i].text = " ";
        } else {
	   document.myForm.course.options[i].text = summer[i];
        }
   }
}


