
var gHiLight = 0;
var gKeyIndex = 1;
var gFullNameIndex = 2;
var gLastNameFirstIndex = 3;
var gPhoneIndex = 4;
var gPhoneAltIndex = 5;
var gFaxIndex = 6;
var gEmailIndex = 7;
var gProgramIndex = 8;
var gDeptIndex = 9;

// 0=homepage hilite, 1=key, 2=fullname, 3=lastnamefirst, 4=phone, 5=phonealt, 6=fax, 7=email, 8=program, 9=deptwebpage
var ContactsList = new Array(
["n", "kimmons",     "Amanda Kimmons",        "Kimmons, Amanda",    "850-983-5216 x100",                  "",                  "",              "akimmons@ufl.edu",         "",                        ""],
["n", "adkison",    "Chris Adkison",          "Adkison, Chris",     "",                  "",                  "",              "cadkison@ufl.edu",        "",                        ""],
["n", "baxley",     "Tim Baxley",             "Baxley, Tim",        "",                  "",                  "",              "tbaxley@ufl.edu",         "",                        ""],
["y", "bohn",       "Dr. Kimberly Bohn",      "Bohn, Kimberly",     "850-983-5216 x107", "",                  "850-983-5774",  "kkbohn@ufl.edu",          "forest_ecology",          "www.sfrc.ufl.edu"],
["y", "brecke",     "Dr. Barry Brecke",       "Brecke, Barry",      "850-983-5216 x108", "850-995-3720 x106", "850-983-5774",  "bjbe@ufl.edu",            "weed_science",            "agronomy.ifas.ufl.edu"],
["n", "campbell",   "Kat Campbell",           "Campbell, Kat",      "850-983-5216 x109", "",                  "850-983-5774",  "kcampbell@ufl.edu",       "",                        ""],
["n", "claypool",   "Shawn Claypool",         "Claypool, Shawn",    "",                  "",                  "",              "wolfbc@ufl.edu",          "",                        ""],
["n", "davis",      "Sherry Davis",           "Davis, Sherry",      "850-983-5216 x121", "",                  "",              "sdavis02@ufl.edu",        "",                        ""],
["n", "dozier",     "Michael Dozier",         "Dozier, Thomas",     "850-995-3720 x132",                  "",                  "",              "mdozier@ufl.edu",         "",                        ""],
["n", "eisinger",   "Lisa Eisinger",          "Eisinger, Lisa",     "",                  "",                  "",              "leisinger@ufl.edu",       "",                        ""],
["n", "hatfield",   "Doug Hatfield",          "Hatfield, Doug",     "850-995-3722",      "",                  "850-995-3723",  "hdha@ufl.edu",            "",                        ""],
["n", "groninger",  "Jude Groninger",         "Groninger, Jude",    "",                  "",                  "",              "judegron@ifas.ufl.edu",   "",                        ""],
["n", "johnson",    "Merniece Johnson",       "Johnson, Merniece",  "850-983-5216 x115", "",                  "850-983-5774",  "merniece@ufl.edu",        "",                        ""],
["n", "lawson",     "Rex Lawson",             "Lawson, Rex",        "",                  "",                  "",              "rxlawson@ufl.edu",        "",                        ""],
["y", "marinescu",  "Dr. Marian Marinescu",   "Marinescu, Marian",  "850-983-5216 x114", "",                  "",              "marinescu@ufl.edu",       "forest_utilization",      "www.sfrc.ufl.edu"],
["n", "mckeithen",  "Justin McKeithen",       "McKeithen, Justin",  "",                  "",                  "",              "justmck@ufl.edu",         "",                        ""],
["y", "miller",     "Dr. Debbie Miller",      "Miller, Debbie",     "850-983-5216 x104", "",                  "850-983-5774",  "dlmi@ufl.edu",            "community_ecology",       "www.wec.ufl.edu"],
["n", "mitchell",   "Katie Mitchell",         "Mitchell, Katie",    "850-983-5216 x100", "",                  "850-983-5774",  "katiemitchell@ufl.edu",   "",                        ""],
["n", "moon",       "Phil Moon",              "Moon, Phil",         "",                  "",                  "",              "pmoon@ufl.edu",           "",                        ""],
["y", "mullahey",   "Dr. Jeff Mullahey",      "Mullahey, Jeff",     "850-983-5216 x101", "",                  "850-983-5774",  "wfgator@.ufl.edu",        "http://tsa.ifas.ufl.edu", ""],
["y", "padhye",     "Dr. Sonali Padhye",      "Padhye, Sonali",     "850-983-5216 x103", "",                  "850-983-5774",  "padhye@ufl.edu",          "",                        ""],
["n", "salter",     "Thomas Salter, III",     "Salter, Thomas",     "850-995-3720 x132",                  "",                  "",              "tsalter@ufl.edu",         "",                        ""],
["n", "shepherd",   "Benjamin Shepherd",      "Shepherd, Benjamin", "",                  "",                  "",              "bshep@ufl.edu",           "",                        ""],
["n", "smith",      "Nick Smith",             "Smith, Nick",        "850-983-5213 x120", "",                  "",              "nsmith90@ufl.edu",              "",                        "",                        ""],
["n", "tedder",     "Vernon Tedder",          "Tedder, Vernon",     "",                  "",                  "",              "vtedder@ufl.edu",         "",                        ""],
["n", "telenko",    "Dr. Darcy Telenko",      "Telenko, Darcy",     "850-983-5216",      "",                  "",              "deptelenko@ufl.edu",      "",                        ""],
["y", "thetford",   "Dr. Mack Thetford",      "Thetford, Mack",     "850-983-5216 x122", "",                  "850-983-5774",  "thetford@ufl.edu",        "landscape_horticulture",  "hort.ifas.ufl.edu"],
["y", "unruh",      "Dr. J. Bryan Unruh",     "Unruh, J. Bryan",    "850-983-5216 x114", "850-995-3720 x108", "850-995-3723",  "jbu@ufl.edu",             "turf_science",            "hort.ifas.ufl.edu"],
["n", "vickers",    "Robin Vickers",          "Vickers, Robin",     "850-983-5216 x113", "",                  "",              "rvickers@ufl.edu",        "",                        ""],
["n", "wendt",      "William Wendt",          "Wendt, William",     "850-995-3720 x104", "",                  "",              "wwendt@ufl.edu",          "alternative_crops",       ""],
["n", "williams",   "Dr. Rick Williams",      "Williams, Rick",     "850-983-5216 x102", "",                  "850-983-5774",  "rickw@ufl.edu",           "forest_management",       ""],
["n", "template", "fullname", "lastnamefirst", "phone", "phonealt", "fax", "email", "program", "deptwebpage"],
["n", "lastitem", "1", "2", "3", "4", "5", "6", "7", "8"]
);

var gI = Math.floor(Math.random()*ContactsList.length)

/***********************************************
* Fading Ticker Tape Script- © Dynamic Drive (www.dynamicdrive.com)
* This notice must stay intact for use
* Visit http://www.dynamicdrive.com/ for full source code
***********************************************/
var speed=4000
var fadescheme=0 //set 0 to fade bgcolor from (white to black), 1 for (black to white)
var hex=(fadescheme==0)? 255 : 0
var startcolor=(fadescheme==0)? "rgb(255,255,255)" : "rgb(0,0,0)"
var endcolor=(fadescheme==0)? "rgb(0,0,0)" : "rgb(255,255,255)"
var frame=20;
var ie=document.all
var ns6=document.getElementById
var ns4=document.layers
var preLoad = new Image();

function putContactInfo(key, whatinfo) {
		
  for (i=0; i<ContactsList.length; i++)
    {
    if (key == ContactsList[i][gKeyIndex] )
      {
      	if (whatinfo == "fullname" && ContactsList[i][gFullNameIndex] != "")
					{document.write(ContactsList[i][gFullNameIndex]);}
				
      	else if (whatinfo == "fullnamebio" && ContactsList[i][gFullNameIndex] != "")
  				{document.write('<a href="/main/Faculty/' + ContactsList[i][gKeyIndex] + '.htm">' + ContactsList[i][gFullNameIndex] + '</a>');}
				
      	else if (whatinfo == "lastnamefirst" && ContactsList[i][gLastNameFirstIndex] != "")
					{document.write(ContactsList[i][gLastNameFirstIndex]);}
				
      	else if (whatinfo == "lastnamefirstbio" && ContactsList[i][gLastNameFirstIndex] != "")
  				{document.write('<a href="/main/Faculty/' + ContactsList[i][gKeyIndex] + '.htm">' + ContactsList[i][gLastNameFirstIndex] + '</a>');}
				
				else if (whatinfo == "email" && ContactsList[i][gEmailIndex] != "")
  				{document.write('<a href="mailto:' + ContactsList[i][gEmailIndex] + '">' + ContactsList[i][gEmailIndex] + '</a>');}
				
				else if (whatinfo == "emailname" && ContactsList[i][gEmailIndex] != "")
  				{document.write('<a href="mailto:' + ContactsList[i][gEmailIndex] + '">' + ContactsList[i][gFullNameIndex] + '</a>');}
  			
  			else if (whatinfo == "biowebpage" && ContactsList[i][gKeyIndex] != "")
  				{document.write('<a href="/main/Faculty/' + ContactsList[i][gKeyIndex] + '.htm">Biography</a>');}
  			
  			else if (whatinfo == "teachwebpage" && ContactsList[i][gProgramIndex] != "")
  				{document.write('<a href="/main/Faculty/Courses/' + ContactsList[i][gKeyIndex] + '.htm">Courses</a>');}
  			
  			else if (whatinfo == "reswebpage" && ContactsList[i][gProgramIndex] != "")
  				{
  				if (ContactsList[i][gProgramIndex].substr(0,4) == "http")
  					{document.write('<a href="' + ContactsList[i][gProgramIndex] + '">Research</a>');}
  				else
  					{document.write('<a href="/main/Programs/' + ContactsList[i][gProgramIndex] + '/research.htm">Research</a>');}
  				}
  				
  			else if (whatinfo == "extwebpage" && ContactsList[i][gProgramIndex] != "")
  				{document.write('<a href="/main/Programs/' + ContactsList[i][gProgramIndex] + '/extension.htm">Extension</a>');}
  			
  			else if (whatinfo == "deptwebpage" && ContactsList[i][gDeptIndex] != "")
  				{document.write('<a href="http://' + ContactsList[i][gDeptIndex] + '">Department</a>');}
				
				else if (whatinfo == "phone" && ContactsList[i][gPhoneIndex] != "")
  				{document.write(ContactsList[i][gPhoneIndex]);}
  				
				else if (whatinfo == "phonealt" && ContactsList[i][gPhoneAltIndex] != "")
  				{document.write(ContactsList[i][gPhoneAltIndex]);}
  				
				else if (whatinfo == "fax" && ContactsList[i][gFaxIndex] != "")
  				{document.write(ContactsList[i][gFaxIndex]);}
  				
        break;
      }
    }
}

function putItem(menuitem) {
	// note: this is called from the menubar code when the form loads, 
	// and it builds the popout menu at that time,
	// so if any of these files change, the user must close their 
	// browser window (not refresh) to see the updates.
  var showurl = '';
  if (menuitem == "students") showurl='/main/00SubMenus/Students.htm';
  if (menuitem == "academic") showurl='/main/00SubMenus/Academic.htm';
  if (menuitem == "research") showurl='/main/00SubMenus/Research.htm';
  if (menuitem == "extension") showurl='/main/00SubMenus/Extension.htm';
  if (menuitem == "people") showurl='/main/00SubMenus/People.htm';
  if (menuitem == "administration") showurl='/main/00SubMenus/Administration.htm';
  if (showurl != "")	loadMenuItem(showurl); 
}

function loadMenuItem(url) {
  var xmlhttp = null;
  // code for Mozilla, etc.
  if (window.XMLHttpRequest)
    {
    xmlhttp=new XMLHttpRequest();
    }
  // code for IE
  else if (window.ActiveXObject)
    {
    xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
    }
  if (xmlhttp!=null)
    {
    xmlhttp.open('GET',url,false);
    xmlhttp.send(null);
    document.write(xmlhttp.responseText);
    }
  else
    {
    document.write("Your browser does not support viewing the popout menu items.");
    }
}


function updatecontent(){
  var speakeritem = '';
  while (ContactsList[gI][gHiLight] == 'n')
    {
    gI++;
    if (gI>ContactsList.length-2)
      {
      gI=0
      }
    }
  speakeritem = '<img src="/main/Faculty/images/' + ContactsList[gI][gKeyIndex]  + '_gallery.jpg" height="90" style="padding-left:3px; margin-left:3px; margin-top:4px; margin-right:8px; padding-right:8px" align="left" >';

  if (ns4){
    tickerobject.subtickertape.document.write(speakeritem)
    tickerobject.subtickertape.document.close()
  }
  else 
    tickerobject.innerHTML= speakeritem 
  setTimeout("updatecontent()",speed)

  gI++;
  while (ContactsList[gI][gHiLight] == 'n')
    {
    gI++;
    if (gI>ContactsList.length-2)
      {
      gI=0
      }
    }
  //preload next image so it will display faster ('i' has already been incremented)
  preLoad.src = '/main/Faculty/images/' + ContactsList[gI][gKeyIndex] + '_gallery.jpg';
}

function regenerate(){
  window.location.reload()
}
function regenerate2(){

  if (document.layers)
    setTimeout("window.onresize=regenerate",450)
}
