// JScript source code
function swapPic() 
 { 
  if(document.getElementById) 
   { 
   var thePicture=document.getElementById("header"); 

   var PicNum=rnd(11);
   var picPath="backgrounds/pic"+ PicNum +".jpg"; 
   
   thePicture.style.background="url("+picPath+")"; 
  
   PhotoText(PicNum);
   } 
 } 
  
function rnd(n) 
 { 
   return Math.floor(Math.random() * n) + 1; 
 } 
 
 function PhotoText(x)
    {
    var Photographer = new Array(11)
        Photographer[0]="Photo by: Jenifer Jordan Reynolds"; 
        Photographer[1]="Photo by: Bridget Robinson"; 
        Photographer[2]="Graphics by: Jenifer Jordan Reynolds"; 
        Photographer[3]="Photo by: Bridget Robinson"; 
        Photographer[4]="Photo by: Bridget Robinson"; 
        Photographer[5]="Photo by: Bridget Robinson";
        Photographer[6]="Photo by: Jenifer Jordan Reynolds";  
        Photographer[7]="Photo by: Jenifer Jordan Reynolds";
        Photographer[8]="Photo by: Steve T. Hoyle";    
        Photographer[9]="Photo by: Utku Avci";    
        Photographer[10]="Photo by:  Utku Avci";    


        
    var Date = new Array(11)
        Date[0]="Fall Semester, 2005"; 
        Date[1]="August 24, 2005"; 
        Date[2]="Winter 2006"; 
        Date[3]="September 17, 2005"; 
        Date[4]="September 6, 2005"; 
        Date[5]="September 6, 2005";     
        Date[6]="March 23, 2005"; 
        Date[7]="October 12, 2005";  
        Date[8]="1999"; 
        Date[9]="2006";  
        Date[10]="2006";   
                        
    
    var Detail= new Array(11) 
        Detail[0]="The NCSU Turfgrass Program offers students hands-on experience in its state-of-the-art greenhouse facilities. Learning the difference between grass species, students from CS 021 visit NCSU's greenhouses to experience grass classification in person.";       
        Detail[1]="A cotton fruit begins as a small flower bud or 'square' that flowers about 21 days after it reaches the size of a pinhead (just visible to the naked eye). The new bloom is white the first day (pollination occurs on the first day) and turns red by the second day. Cotton normally will flower for up to 8 weeks in North Carolina."; 
        Detail[2]="Cellulose molecules are the building blocks of plants. The NCSU Crop Science program knows that an important step to developing improved crop varieties for the field begins in the lab. NCSU Crop Science researchers have access to premier lab facilities for developing new methods of crop improvement at the cellular level."; 
        Detail[3]="Corn planted at the NCSU Upper Coastal Plain Research Station in Rocky Mount, North Carolina. Breeding efforts are underway to improve drought tolerance by improving rooting mass. These experimental fields are one example of the Crop Science Department's commitment to improving food production while better utilizing available water resources."; 
        Detail[4]="North Carolina State University (with grant funding from the Z. Smith Reynolds Foundation) began a project in 2004 concentrating on organic grain production in North Carolina. This project is focused on equipping farmers in North Carolina with the skills and agronomic support needed to produce and market organic grain crops. Harvesting and storing organic grain is a critical step in producing a high quality crop for sale.";       
        Detail[5]="Soybeans are an important commodity in North Carolina. The NCSU Crop Science Department holds the annual NC Soybean Yield Contest each year to help growers identify opportunities for maximizing their production processes. Working directly with extension, the Crop Science Department identifies the winner based on farming practices up to and during the harvest.";         
        Detail[6]="Mums are grown to deter insect interest in vegetable and flower gardens. The NCSU Crop Science class CS213 grew these mums as part of a class project. Understanding basic gardening skills is the first step to learn about the importance of IPM practices, water requirements, and nitrogen applications.";         
        Detail[7]="TurfFiles Research highlights current turfgrass research projects at N.C. State University funded through the CENTERE and the North Carolina Turfgrass Foundation. Crop Science reseach updates and final reports outline advanced turfgrass management strategies investigated in North Carolina.";
        Detail[8]="This is Spirogyra, a filamentous green algae with bright, florescent-green filaments. Individual filaments can easily be identified by the spiral arrangement of the chloroplast inside the cell wall. This species is found throughout North Carolina.  North Carolina State University scientists work to develop economically and environmentally sustainable management programs for this and other 'weed' species.";
        Detail[9]="Cross section from Arabidopsis root tip showing root cap cells (outer cells) and epidermal cells (inner cells). Microwave-assisted chemical fixation was used and captured by JEOL 100S transmission electron microscope. Bar = 1.5 micrometer.  Scientists in the Crop Science investigate Arabidopsis as a model plant to achieve a better understanding of fundamental processes in plant biology for future production of value-added crops";
        Detail[10]="Cross section of Arabidopsis root from differentiation zone. Image shows a differentiating tracheary element with cell structures of two vacuole in the middle and a mitochondria. Microwave-assisted chemical fixation was used and captured by JEOL 100S transmission electron microscope. Bar = 0.5 micrometer.  Scientists in the Crop Science investigate Arabidopsis as a model plant to achieve a better understanding of fundamental processes in plant biology for future production of value-added crops";
       
       
    var thePhotagrapher=document.getElementById("PhotographerDetails");  
    var theDate=document.getElementById("PhotoDate");   
    var theDetails=document.getElementById("PhotoDetails");
    var Counter=x-1;
    
    thePhotagrapher.innerText = eval("Photographer["+ Counter +"]");
    theDate.innerText = eval("Date["+ Counter +"]");
    theDetails.innerText = eval("Detail["+ Counter +"]");
 
    }
