﻿    var stat_index = 0;
    stat_list = new Array();
    stat_list[stat_index++] = new textItem("87.5%", "of Ai Atlanta graduates were working in a field related to their program of study within six months of graduation.");
    stat_list[stat_index++] = new textItem("87.1%", "of Ai C - Hollywood graduates were working in a field related to their program of study within six months of graduation.");
    stat_list[stat_index++] = new textItem("83.2%", "of Ai C - Los Angeles graduates were working in a field related to their program of study within six months of graduation.");
    stat_list[stat_index++] = new textItem("90.3%", "of Ai C - Orange County graduates were working in a field related to their program of study within six months of graduation.");
    stat_list[stat_index++] = new textItem("82.3%", "of Ai C - San Diego graduates were working in a field related to their program of study within six months of graduation.");
    stat_list[stat_index++] = new textItem("89.2%", "of Ai C - San Francisco graduates were working in a field related to their program of study within six months of graduation.");
    stat_list[stat_index++] = new textItem("88.3%", "of Ai Charlotte graduates were working in a field related to their program of study within six months of graduation.");
    stat_list[stat_index++] = new textItem("88%", "of Ai Colorado graduates were working in a field related to their program of study within six months of graduation.");
    stat_list[stat_index++] = new textItem("92.2%", "of Ai Dallas graduates were working in a field related to their program of study within six months of graduation.");
    stat_list[stat_index++] = new textItem("88%", "of Ai Ft. Lauderdale graduates were working in a field related to their program of study within six months of graduation.");
    stat_list[stat_index++] = new textItem("91.1%", "of Ai Houston graduates were working in a field related to their program of study within six months of graduation.");
    stat_list[stat_index++] = new textItem("89.2%", "of Ai Las Vegas graduates were working in a field related to their program of study within six months of graduation.");
    stat_list[stat_index++] = new textItem("84.8%", "of Ai New York City graduates were working in a field related to their program of study within six months of graduation.");
    stat_list[stat_index++] = new textItem("85.5%", "of Ai Cincinnati graduates were working in a field related to their program of study within six months of graduation.");
    stat_list[stat_index++] = new textItem("84.7%", "of The Art Institute of Philadelphia graduates were working in a field related to their program of study within six months of graduation.");
    stat_list[stat_index++] = new textItem("87.9%", "of Ai Phoenix graduates were working in a field related to their program of study within six months of graduation.");
    stat_list[stat_index++] = new textItem("87.5%", "of The Art Institute of Pittsburgh graduates were working in a field related to their program of study within six months of graduation.");
    stat_list[stat_index++] = new textItem("88.6%", "of Ai Portland graduates were working in a field related to their program of study within six months of graduation.");
    stat_list[stat_index++] = new textItem("85.5%", "of Ai Seattle graduates were working in a field related to their program of study within six months of graduation.");
    stat_list[stat_index++] = new textItem("87.6%", "of Ai Tampa graduates were working in a field related to their program of study within six months of graduation.");	

	    
    stat_list[stat_index++] = new textItem("70.4%", "of Ai Vancouver graduates were working in a field related to their program of study within six months of graduation.");
    stat_list[stat_index++] = new textItem("85.1%", "of The Art Institute of York-Pennsylvania graduates were working in a field related to their program of study within six months of graduation.");
    stat_list[stat_index++] = new textItem("89.6%", "of Ai Minnesota graduates were working in a field related to their program of study within six months of graduation.");
    stat_list[stat_index++] = new textItem("85.2%", "of ILIA - Chicago graduates were working in a field related to their program of study within six months of graduation.");
    stat_list[stat_index++] = new textItem("88.1%", "of ILIA - Schaumburg graduates were working in a field related to their program of study within six months of graduation.");
    stat_list[stat_index++] = new textItem("90.6%", "of Ai Miami graduates were working in a field related to their program of study within six months of graduation.");
    stat_list[stat_index++] = new textItem("89.9%", "of NEIA Boston graduates were working in a field related to their program of study within six months of graduation.");
var number_of_stats = stat_list.length;
    var emp_index = 0;
    emp_list = new Array();
    emp_list[emp_index++] = new imageItem("images/right-text-content1.gif");
    emp_list[emp_index++] = new imageItem("images/right-text-content2.gif");
    emp_list[emp_index++] = new imageItem("images/right-text-content3.gif");
    emp_list[emp_index++] = new imageItem("images/right-text-content4.gif");
    emp_list[emp_index++] = new imageItem("images/right-text-content5.gif");
    
    var number_of_emps = emp_list.length;
    
    function imageItem(image_location) 
    {
        this.image_item = new Image();
        this.image_item.src = image_location;
    }

    function textItem(stat, desc) 
    {
        this.stat = stat;
        this.desc = desc;
    }


    function get_ImageItemLocation(imageObj) 
    {
        return(imageObj.image_item.src);
    }

    function generate(x, y) 
    {
        var range = y - x + 1;
        return Math.floor(Math.random() * range) + x;
    }

    function getNextImage(place) 
    {
        emp_index = (emp_index + 1) % number_of_emps;

        var new_image = get_ImageItemLocation(emp_list[emp_index]);

        return(new_image);
    }
        
    function rotateText()
    {
      stat_index = (stat_index+1) % number_of_stats;
      stattext.innerHTML = stat_list[stat_index].stat;
      statdesc.innerHTML = stat_list[stat_index].desc;
      
      
    }
    
    function rotateImage(place) 
    {
        var new_image = getNextImage(place);
        document[place].src = new_image;
        
        
        
    }
        
