///////////////////////////////////////////////////////////////////////////////
//                              Rotating Photos                              //
///////////////////////////////////////////////////////////////////////////////

// put images to preload in this array
   var imgAr = new Array("");

if (document.images) {
   var pic = new Array();
   for (var i=0; i<imgAr.length; i++) {
      pic[i] = new Image(273,196); // 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;
   intId = setTimeout('rotateImg()', 4500);
}

function stop() {
   clearTimeout(intId);
}

function restart() {
   clearTimeout(intId);
   num = 0;
   document.pict.src = pic[0].src;
   intId = setTimeout('rotateImg()', 4500);
}
///////////////////////////////////////////////////////////////////////////////
//                          Random College Facts                             //
///////////////////////////////////////////////////////////////////////////////

function die(max) {
   return Math.ceil(Math.random() * max) ;
}

function aRandom( a ) {
   num = a[ die(a.length)-1 ];
   return num;
}

   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] = "About half of entering freshman in the College of Engineering participate in Power Groups.  A power group is a set of 10 students with nearly identical course schedules.  This program fosters collegiality, provides an immediate peer group for participating students, and has a positive effect on student performance and retention." ;
QuoteLine[2] = "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[3] = "Civil Engineering students gain a breadth in all areas, then may focus their efforts in specialty areas of structural, geotechnical, environmental, water resources, and transportation engineering." ;
QuoteLine[4] = "The average ACT composite score for entering freshmen in engineering at UW is over 25. " ;
QuoteLine[5] = "The Computer Science and MIS undergraduate programs are a unique blend of a strong emphasis on fundamentals and exposure to the newest technologies in industry. " ;
QuoteLine[6] = "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[7] = "Mechanical Engineering deals with diverse engineering problems in mechanics of materials, fluid dynamics, energy, combustion, vibration, design and manufacturing, mechatronics, and electromechanical systems, among others. " ;
QuoteLine[8] = "Most engineering programs in the College are accredited by the Engineering Accreditation Commission of ABET.  Petroleum Engineering will be accredited in 2009." ;
QuoteLine[9] = "UW's Computer Science program is accredited by the Computer Accreditation Commission of ABET." ;
QuoteLine[10] = "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[11] = "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[12] = "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[13] = "With more than 190 recognized student organizations on campus, you can certainly find one to fit your interests and needs. " ;
QuoteLine[14] = "Engineering faculty at the University of Wyoming maintain an open door policy making them readily accessible to students. " ;
QuoteLine[15] = "Nearly all of UW undergraduate engineering courses are taught by full time, tenure track faculty or practicing professionals. " ;
QuoteLine[16] = "The UW College of Engineering has many distinguished alumni including W. Edwards Deming, the father of Total Quality Management, and Tom Osborne, the father of the hand-held calculator. " ;
QuoteLine[17] = "The American Institute of Chemical Engineers (AIChE) has named chemical engineering professor Maciej Radosz as one of its eight new fellows. " ;
QuoteLine[18] = "Charles Dolan, Civil and Architectural Engineering Professor, received the Arthur R. Anderson Award from the American Concrete Institute." ;
QuoteLine[19] = "Steve Barrett, associate professor in the University of Wyoming Department of Electrical and Computer Engineering, was recently named by the National Society of Professional Engineers (NSPE) as the recipient of the 2008 Engineering Education Excellence Award. " ;
QuoteLine[20] = "Demitris Kouris, Mechanical Engineering Professor, was awarded the Japanese Society for the Promotion of Science Research Fellowship." ;
QuoteLine[21] = "Norm Morrow, Chemical and Petroleum professor is a member of the National Academy of Engineering." ;
QuoteLine[22] = "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[23] = "Two UW dormitory floors with computing laboratories  house approximately 100 engineering students." ;
QuoteLine[24] = "Compared to the top twenty public engineering programs as reported by U.S. News and World Report, UW's resident tuition is the third lowest. Estimated total cost per year for resident undergraduate tuition, fees, housing, books, travel and incidentals is $14,665. Tuition and fees at UW is only 73% of the national average of 4-year public institutions. The same total non-resident costs are estimated at $21,205. " ;
QuoteLine[25] = "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[26] = "The architectural engineering program at the UW is one of only 16 such accredited programs in the U.S." ;
QuoteLine[27] = "At approximately 11,000 on-campus students, the University of Wyoming is small enough to offer a friendly atmosphere and the personal attention associated with a small college but large enough to offer all of the opportunities of larger institutions. " ;
QuoteLine[28] = "The College of Engineering's $2,500,000 H.T. Person endowment is dedicated to excellence in undergraduate instruction. " ;
QuoteLine[29] = "At an elevation of 7200 ft., UW is the highest engineering college in the U.S. It is surrounded by excellent outdoor recreation opportunities including hiking, skiing, fishing, climbing, biking, and kayaking. " ;
QuoteLine[30] = "The College has 300 personal computers and workstations (1 computer for every 5 students) that are accessible to undergraduate students.";
QuoteLine[31] = "Wireless access to the internet is available in all student areas in the Engineering building." ;
QuoteLine[32] = "The Department of Atmospheric Science is participating in UW's new interdisciplinary degree program in Earth System Science." ;

function createCookie(name,value,days) {
        if (days) {
                var date = new Date(); 
                date.setTime(date.getTime()+(days*24*60*60*1000));
                var expires = "; expires="+date.toGMTString();
        }       
        else var expires = "";
        document.cookie = name+"="+value+expires+"; path=/";
}       
        
function readCookie(name) {
        var nameEQ = name + "=";
        var ca = document.cookie.split(';');
        for(var i=0;i < ca.length;i++) {
                var c = ca[i];
                while (c.charAt(0)==' ') c = c.substring(1,c.length);
                if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);
        }       
        return null;
}       
        
function eraseCookie(name) {
        createCookie(name,"",-1);
}

        function switchit(id, link_id, field_id){
          if(document.getElementById(id).style.display=='none'){
           document.getElementById(id).style.display='block';
	   document.getElementById(field_id).style.paddingBottom='0px';
	   }
          else if(document.getElementById(id).style.display=='block'){
           document.getElementById(id).style.display='none';
	   document.getElementById(field_id).style.paddingBottom='8px';}
          if(document.getElementById(link_id).innerHTML.charAt(0)=='+'){
             document.getElementById(link_id).innerHTML='-'+document.getElementById(link_id).innerHTML.substr(1);}
          else{
             document.getElementById(link_id).innerHTML='+'+document.getElementById(link_id).innerHTML.substr(1);}
        }

