///////////////////////////////////////////////////////////////////////////////
//                              Rotating Photos                              //
///////////////////////////////////////////////////////////////////////////////

// put images and links to preload in these arrays
        var imgAr = new Array("/chemical/frontpage/080415/splashnews.jpg","/chemical/images/chem_define.jpg","/chemical/images/petro_define.jpg","/news/100216/splashnews.jpg","/news/090622/splashnews.jpg","/news/080910/splashnews.jpg");
        var linkAr = new Array("/chemical/frontpage/080415/","/chemical/frontpage/chemical/chemical.html","/chemical/frontpage/petroleum/petrol.html","/news/100216/","/news/090622/","/news/080910/");

if (document.images) {
   var pic = new Array();
   for (var i=0; i<imgAr.length; i++) {
      pic[i] = new Image(593,255); // 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;   
   switch (num){

  			case 0 :
  				document.getElementById('pict').src = pic[num].src;
   				document.getElementById('pict_link').href = linkAr[num];
    			  	break;

   			case 1 :
    			document.getElementById('pict').src = pic[num].src;
   				document.getElementById('pict_link').href = linkAr[num];
     				break;

   			case 2 :
  				document.getElementById('pict').src = pic[num].src;
   				document.getElementById('pict_link').href = linkAr[num];
				break;
				
			case 3 :
  				document.getElementById('pict').src = pic[num].src;
   				document.getElementById('pict_link').href = linkAr[num];
				break;
				
			case 4 :
  				document.getElementById('pict').src = pic[num].src;
   				document.getElementById('pict_link').href = linkAr[num];
				break;
			
			case 5 :
  				document.getElementById('pict').src = pic[num].src;
   				document.getElementById('pict_link').href = linkAr[num];
				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

//use the last picture in the rotating photos array as case -1 here, make the original -1 case the last case, increase all other case numbers accordingly

num=names[Math.floor(Math.random()*names.length)]


switch (num){

  case -1 :

 document.write(
'<a id="pict_link" href="/news/080910/"><img id="pict" src="/news/080910/splashnews.jpg" alt="splashnews"  width="593" height="255" align="left" border="0" style="padding: 0px 0px 0px 0px;"/></a> ');
      break;
   
   case 0 :

  document.write(
'<a id="pict_link" href="/chemical/frontpage/080415/"><img id="pict" src="/chemical/frontpage/080415/splashnews.jpg" alt="splashnews"  width="593" height="255" align="left" border="0" style="padding: 0px 0px 0px 0px;"/></a> ');
      break;

   case 1 :

  document.write(
'<a id="pict_link" href="/chemical/frontpage/chemical/chemical.html"><img id="pict" src="/chemical/images/chem_define.jpg" alt="splashnews"  width="593" height="255" align="left"  border="0" style="padding: 0px 0px 0px 0px;"/></a> ');
      break;
	  
	  
   case 2 :
   
 document.write(
'<a id="pict_link" href="/chemical/frontpage/petroleum/petrol.html"><img id="pict" src="/chemical/images/petro_define.jpg" alt="splashnews"  width="593" height="255" align="left" border="0" style="padding: 0px 0px 0px 0px;"/></a> ');
      break;
	  
   case 3 :
   
 document.write(
'<a id="pict_link" href="/news/100216/"><img id="pict" src="/news/100216/splashnews.jpg" alt="splashnews"  width="593" height="255" align="left" border="0" style="padding: 0px 0px 0px 0px;"/></a> ');
      break;
	  
   case 4 :
   
 document.write(
'<a id="pict_link" href="/news/090622/"><img id="pict" src="/news/090622/splashnews.jpg" alt="splashnews"  width="593" height="255" align="left" border="0" style="padding: 0px 0px 0px 0px;"/></a> ');
      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] = "Engineering classes at UW average 25 students. Upper division classes (those for juniors and seniors) average fewer than 22 students.";
QuoteLine[1] = "The Chemical and Petroleum Engineering Department at UW offers options in biochemical and environmental engineering in addition to the traditional chemical and petroleum engineering programs.";
QuoteLine[2] = "The average ACT composite score for entering freshmen in engineering at UW is over 25.";
QuoteLine[3] = "Most engineering programs in the College are accredited by the Engineering Accreditation Commission of ABET.  Petroleum Engineering will be accredited in 2009.";
QuoteLine[4] = "Student members of Tau Beta Pi, the national engineering honorary, provide free tutoring services on a wide variety of engineering topics to all engineering students.";
QuoteLine[5] = "The International Engineering Club along with Engineers without Borders is designed to facilitate those students interested in study abroad, international internships, or international service.";
QuoteLine[6] = "American Institute of Chemical Engineers (AIChe) Student Chapter recently won design competition at regional conference, & finished 9th among 29 entries in the national Chem-E Car competition.";
QuoteLine[7] = "Engineering faculty at the University of Wyoming maintain an open door policy making them extremely accessible to students.";
QuoteLine[8] = "Nearly all of UW undergraduate engineering courses are taught by full time, tenure track faculty or practicing professionals.";
QuoteLine[9] = "The American Institute of Chemical Engineers (AIChE) has named chemical engineering professor Maciej Radosz as one of its eight new fellows.";
QuoteLine[10] = "Norm Morrow, Chemical and Petroleum professor is a member of the National Academy of Engineering.";
QuoteLine[11] = "UW engineering seniors consistently perform far above the national average on the Fundamentals of Engineering Exam. Approximately 80% of UW seniors pass this exam on the first try, compared to about 70% nationally.";
QuoteLine[12] = "Two UW dormitory floors with computing laboratories  house approximately 100 engineering students.";
QuoteLine[13] = "Our students obtain an excellent background in engineering sciences, combined with significant hands-on laboratory and design experiences. The small size of the College and excellent student/faculty ratio (which ranks us 4th among the top public engineering schools in the country) allows excellent opportunity for undergraduate involvement in research.";
QuoteLine[14] = "The College has 300 personal computers and workstations (1 computer for every 5 students) that are accessible to undergraduate students.";
QuoteLine[15] = "Wireless access to the internet is available in all student areas in the Engineering building.";
