///////////////////////////////////////////////////////////////////////////////
//                              Rotating Photos                              //
///////////////////////////////////////////////////////////////////////////////

// put images to preload in this array
   var imgAr = new Array();
   imgAr[0]="/news/090831/topnews1.jpg"
   imgAr[1]="/news/081208/topnews1.jpg"
   imgAr[2]="/news/090621/topnews1.jpg"
   imgAr[3]="/news/081215/topnews1.jpg"
   imgAr[4]="/news/090714/topnews1.jpg"
   imgAr[5]="/news/090824/topnews1.jpg"


if (document.images) {
   var pic = new Array();
   for (var i=0; i<imgAr.length; i++) {
      pic[i] = new Image(320,247); // width, height
      pic[i].src =  imgAr[i];
   }
}

   var intId;
   var num = 0;            // global to track current image, and get its url

function rotateImg() {
   if (num < pic.length-1)
      num++;
   else
 num =0;
   //document.pict.src = pic[num].src;

			switch (num){


  			case 0 :
  				document.pict.src = pic[num].src;
				document.getElementById('myText').innerHTML='<b>Electrical and Computer Engineering Students Recieve National Scholarships</b><br>' +
				'The University of Wyoming College of Engineering and Applied Science is pleased to recognize Jennifer Beman and Rob Streeter as recipients of a grant from the National Consortium for Measurement and Signature Intelligence Research (NCMR) Scholars Program. <a href="/news/090831">[more]</a>';
    			  	break;

   			case 1 :
    				document.pict.src = pic[num].src;
				document.getElementById('myText').innerHTML='<b>Robots Navigate Maze</b><br>' +
				'15 students in Dr. Steve Barretts "Real Time Embedded Systems" course competed against one another and the clock. The competition was to build a robot to navigate the maze in minimum time using infrared sensors to sense the walls within the maze. <a href="/news/081208/"> [More]</a>';
     				break;

   			case 2 :
  				document.pict.src = pic[num].src;
				document.getElementById('myText').innerHTML='<b>Mortar Board Service Award</b><br>' +
				'UW College of Engineering and Applied Science, Department of Electrical and Computer Engineering Professor Dave Whitman, received the UW Mortar Boards Service and Dedication Award at the 2009 Torchlight Laurels ceremony last Friday. <a href="/news/090621"> [More]</a>';
				break;
				
			case 3 :
  				document.pict.src = pic[num].src;
				document.getElementById('myText').innerHTML='<b>Networking Equipment</b><br>' +
				'Brocade, the industry leader in data center networking solutions and services, has provided over $165,000 in research equipment to support research projects in computer networks. <a href="/news/081215/"> [More]</a>';
				break;
				
			case 4 :
  				document.pict.src = pic[num].src;
				document.getElementById('myText').innerHTML='<b>Mark Balas Appointed J.G. Nicholson Professor of Electrical Engineering</b><br>' +
				'Professor and Head of the University of Wyoming Electrical and Computer Engineering Department, Mark Balas was appointed as the George J.G. Nicholson Professor of Electrical Engineering by Rob Ettema.<a href="/news/090714/"> [More]</a>';
				break;

			case 5 :
				document.pict.src = pic[num].src;
				document.getElementById('myText').innerHTML='<b>Electrical Engineering Undergraduate Recipient of Internationalization Award</b><br />' +
			'The UW International Board of Advisors presented its Excellence in Student Achievement in Internationalization Undergraduate Student Award to electrical engineering student Chepchumba Limo of Kenya. <a href="/news/090824/">[More]</a>';
				break;
			}

   intId = setTimeout('rotateImg()', 5500);
}
		
///////////////////////////////////////////////////////////////////////////////
//                              Random Rotating Photos on Load               //
///////////////////////////////////////////////////////////////////////////////

var names=new Array()
names[0]= -1
names[1]= 0
names[2]= 1
names[3]= 2
names[4]= 3
names[5]= 4

num=names[Math.floor(Math.random()*names.length)]
//use=names[4]

switch (num){
	
  case -1 :
  
  document.write(
'<img name="pict" src="/news/090714/topnews1.jpg" alt="Mark Balas"  width="320" height="247" align="left" style="padding: 5px 5px 5px 5px;"/> ' +
'<fieldset class="darkTop_field">' +
'<legend class="darkTop_field_legend">' +
'News' +
'</legend>' +
'<p id="myText"><b>Mark Balas Appointed J.G. Nicholson Professor of Electrical Engineering</b><br>Professor and Head of the University of Wyoming Electrical and Computer Engineering Department, Mark Balas was appointed as the George J.G. Nicholson Professor of Electrical Engineering by Rob Ettema.<a href="/news/090714/"> [More]</a></p>' +
'</fieldset>');
      break;
	  
  case 0 :
 
 document.write(
'<img name="pict" src="/news/081215/topnews1.jpg" alt="Brocade Donates State-of-the-Art Networking Equipment"  width="320" height="247" align="left" style="padding: 5px 5px 5px 5px;"/> ' +
'<fieldset class="darkTop_field">' +
'<legend class="darkTop_field_legend">' +
'News' +
'</legend>' +
'<p id="myText"><b>Networking Equipment</b><br>Brocade, the industry leader in data center networking solutions and services, has provided over $165,000 in research equipment to support research projects in computer networks. <a href="/news/081215/"> [More]</a></p>' +
'</fieldset>');
      break;

   case 1 :

  document.write(
'<img name="pict" src="/news/090831/topnews1.jpg" alt="Jennifer Beman and Rob Streeter"  width="320" height="247" align="left" style="padding: 5px 5px 5px 5px;"/> ' +
'<fieldset class="darkTop_field">' +
'<legend class="darkTop_field_legend">' +
'News' +
'</legend>' +
'<p id="myText"><b>Electrical and Computer Engineering Students Receive National Scholarships</b><br />The University of Wyoming College of Engineering and Applied Science is pleased to recognize Jennifer Beman and Rob Streeter as recipients of a grant from the National Consortium for Measurement and Signature Intelligence Research (NCMR) Scholars Program.<a href="/news/090831">[More]</a></p>' +
'</fieldset>');
      break;


   case 2 :

  document.write(
'<img name="pict" src="/news/081208/topnews1.jpg" alt="Student Programmed Robots Navigate Maze"  width="320" height="247" align="left" style="padding: 5px 5px 5px 5px;"/> ' +
'<fieldset class="darkTop_field">' +
'<legend class="darkTop_field_legend">' +
'News' +
'</legend>' +
'<p id="myText"><b>Robots Navigate Maze</b><br>15 students in Dr. Steve Barretts "Real Time Embedded Systems" course competed against one another and the clock. The competition was to build a robot to navigate the maze in minimum time using infrared sensors to sense the walls within the maze. <a href="/news/081208/"> [More]</a></p>' +
'</fieldset>');
      break;

   case 3 :

  document.write(
'<img name="pict" src="/news/090621/topnews1.jpg" alt="Electrical and Computer Engineering Professor Receives Mortar Board Service Award"  width="320" height="247" align="left" style="padding: 5px 5px 5px 5px;"/> ' +
'<fieldset class="darkTop_field">' +
'<legend class="darkTop_field_legend">' +
'News' +
'</legend>' +
'<p id="myText"><b>Mortar Board Service Award</b><br>UW College of Engineering and Applied Science, Department of Electrical and Computer Engineering Professor Dave Whitman, received the UW Mortar Boards Service and Dedication Award at the 2009 Torchlight Laurels ceremony last Friday. <a href="/news/090621/index1.html"> [More]</a></p>' +
'</fieldset>');
      break;
	  
	  
  case 4 :

  document.write(
'<img name="pict" src="/news/090824/topnews1.jpg" alt="Chepchumba Limo" width="320" height="247" align="left" style="padding: 5px 5px 5px 5px;"/> ' +
'<fieldset class="darkTop_field">' +
'<legend class="darkTop_field_legend">' +
'News' +
'</legend>' +'<p id="myText"><b>Electrical Engineering Undergraduate Recipient of Internationalization Award</b><br />The UW International Board of Advisors presented its Excellence in Student Achievement in Internationalization Undergraduate Student Award to electrical engineering student Chepchumba Limo of Kenya.<a href="/news/090824/"> [More]</a></p>' +
'</fieldset>');
      break;

 

}

////// Did You Know Section//////
function die(max) {
   return Math.ceil(Math.random() * max) ;
}

function aRandom( a ) {
   cat = a[ die(a.length)-1 ];
   return cat;
}

   var QuoteLine = new Array() ;
QuoteLine[0] = "Electrical and Computer Engineering students at the University of Wyoming are exposed to a multitude of high tech areas including biomedical, wireless communications and network design. " ;
QuoteLine[1] = "Jerry Hamann, Electrical and Computer Engineering professor, was Awarded the 2005 Regional ASEE Outstanding Teacher Award (UW has won four of the last six)" ;
QuoteLine[2] = "Steve Barrett, Electrical and Computer Engineering professor, is the Council for Advancement & Support of Education (CASE) & Carnegie Foundation Wyoming Professor of the Year." ;
