
var menus = new Array(22);
var i = 0;

for(i = 0; i < menus.length; i++){

   menus[i] = new Image();

}

menus[0].src = "images/about_off.jpg";
menus[1].src = "images/about_on.jpg";
menus[2].src = "images/undergrad_off.jpg";
menus[3].src = "images/undergrad_on.jpg";
menus[4].src = "images/grad_off.jpg";
menus[5].src = "images/grad_on.jpg";
menus[6].src = "images/research_off.jpg";
menus[7].src = "images/research_on.jpg";
menus[8].src = "images/faculty_off.jpg";
menus[9].src = "images/faculty_on.jpg";
menus[10].src = "images/job_off.jpg";
menus[11].src = "images/job_on.jpg";
menus[12].src = "images/news_off.jpg";
menus[13].src = "images/news_on.jpg";
menus[14].src = "images/contact_off.jpg";
menus[15].src = "images/contact_on.jpg";
menus[16].src = "images/soe_off.jpg";
menus[17].src = "images/soe_on.jpg";
menus[18].src = "images/uconn_off.jpg";
menus[19].src = "images/uconn_on.jpg";
menus[20].src = "images/site_off.jpg";
menus[21].src = "images/site_on.jpg";


function swapOn(imgObj, index){

   if(document.images){

      imgObj.src = menus[index].src;

   }
	
   return;

}

function swapOff(imgObj, index){

   if(document.images){

      imgObj.src = menus[index].src;

   }

   return;

}

function verifyForm(frmObject){

   var student = new Student(frmObject);
	
   // return student.isOK();
	
   return false;
	
}

function flashWin(){

   window.open("cse_flash-ite.htm", "_flshWin", "height=500,width=450,top=100,left=115,resizable=yes,scrollbars=yes,menubar=no,toolbar=yes,status=no,location=no");

}

function openWin(mylink){

   var href;
   if (!window.focus)
      {
	 return true;
      }
   if (typeof(mylink) == 'string')
      {
	 href=mylink;
      } 
   else 
      {
	 href=mylink.href;
	 window.open(href, "_prWin", 'height=400,width=753,top=100,left=115,resizable=yes,scrollbars=yes,menubar=no,toolbar=yes,status=no,location=no');
      }

}

function Student(frmObject){


   /*
     this.name = frmObject.txtFullName.value;
     this.pID = frmObject.txtPID.value;
     this.semester = frmObject..value;
     this.email = frmObject..value;
     this.course = frmObject..value;
     this.preference = frmObject..value;
     this.section = frmObject..value;
     this.circumstances = frmObject..value;
   */
}

//
// objective of this function is to display a random image upon each reload
// this is each and every page except the index.html - the main page
//

function displayImage(){

   var txtData = "";
   var i = Math.floor(Math.random() * 4);

   txtData = "<img src = \"images/header" + i + ".jpg\" height = \"136\" width = \"752\" alt = \"CSE Website\" border = \"0\" vspace = \"0\" hspace = \"0\">";

   document.write(txtData);

   return;
	
}

//
// objective of this function is to display a random flash upon each reload
// this is for index.html - the main page
//

function displayFlash(){

   var txtData = "<object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0' WIDTH=752 HEIGHT=136>\n";
   var i = Math.floor(Math.random() * 4);
	
   txtData = txtData + "		<param NAME=movie VALUE='flash/cse51_" + i + ".swf'>\n";
   txtData = txtData + "		<param NAME=loop VALUE=false>\n";
   txtData = txtData + "		<param NAME=quality VALUE=high>\n";
   txtData = txtData + "		<param NAME=bgcolor VALUE=#FFFFFF>\n";
   txtData = txtData + "		<embed src='flash/cse51_" + i + ".swf' loop=false quality=high bgcolor=#FFFFFF  WIDTH=752 HEIGHT=136 TYPE='application/x-shockwave-flash' PLUGINSPAGE='http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash'>\n";
   txtData = txtData + "		</embed>\n";
   txtData = txtData + "</object>\n";

   document.writeln(txtData);
}

function displayQuote(){

   var txtData = new Array(21);
   var i = Math.round(Math.random() * 20);

   txtData[0] = "The laws of probability, so true in general, so fallacious in particular.<br><br>Edward Gibbon";
   txtData[1] = "Mathematicians don't crack jokes, they crack codes.<br><br>Tony Follari";	
   txtData[2] = "The man who has no imagination has no wings.<br><br>Muhammad Ali";	
   txtData[3] = "If it's green, it's biology, If it stinks, it's chemistry, If it has numbers it's math, If it doesn't work, it's technology.<br><br>Unknown";	
   txtData[4] = "The good news: Computers allow us to work 100% faster. The bad news: They generate 300% more work.<br><br>Unknown";	
   txtData[5] = "It has become appallingly obvious that our technology has exceeded our humanity<br><br>Albert Einstein";	
   txtData[6] = "Experience is the worst teacher, it gives the test before the lesson.<br><br>Vernon Law";	
   txtData[7] = "Logic is the beginning of wisdom; not the end.<br><br>Spock";	
   txtData[8] = "Teachers open the door, but you must enter by yourself.<br><br>Chinese Proverb";	
   txtData[9] = "Example isn't another way to teach, it is the only way to teach.<br><br>Albert Einstein";	
   txtData[10] = "The mediocre teacher tells. The good teacher explains. The superior teacher demonstrates. The great teacher inspires.<br><br>William Arthur Ward";	
   txtData[11] = "Never interrupt your enemy when he is making a mistake.<br><br>Napoleon Bonaparte";	
   txtData[12] = "Example isn't another way to teach, it is the only way to teach.<br><br>Albert Einstein";	
   txtData[13] = "The value of a man resides in what he gives and not in what he is capable receiving.<br><br>Albert Einstein";	
   txtData[14] = "He who dares to teach must never cease to learn.<br><br>Richard Henry Dann";	
   txtData[15] = "The man who views the world at 50 the same as he did at 20 has wasted 30 years of his life.<br><br>Muhammad Ali";	
   txtData[16] = "My wife and I were happy for twenty years. Then we met.<br><br>Rodney Dangerfield";	
   txtData[17] = "There is no substitute for hard work.<br><br>Thomas Edison";	
   txtData[18] = "Education is not the filling of a pail, but the lighting of a fire.<br><br>William Butler Yeats";	
   txtData[19] = "Education is when you read the fine print. Experience is what you get if you don't.<br><br>Pete Seeger";	
   txtData[20] = "The needs of the many, outweigh the needs of the few or the one.<br><br>Spock";	
	
   document.write(txtData[i]);

   return;

}
