var FilePath;

function SetFilePath(deptFilePath) {
  FilePath = deptFilePath;		
}
function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}
function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}


function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

function changeSty(classpassed){
	document.getElementById('quiz').className=classpassed;
}

function RunPopup(FlashFileName) {
var FlashFileName;
   document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" id="' + FlashFileName + '" width="311" height="389" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0">\n');
   document.write('<param name="movie" value="flash/' + FlashFileName + '.swf" />\n');
   document.write('<param name="quality" value="high" />\n');
   document.write('<param name="play" value="true" />\n');
   document.write('<param name="loop" value="true" />\n');
   document.write('<param name ="base" value="flash/" />\n');
   document.write('<param name="bgcolor" value="#ffffff" />\n');
   document.write('<embed src="flash/' + FlashFileName + '.swf" width="311" height="389" bgcolor="#ffffff" base="flash/" quality="high" loop="true" type="application/x-shockwave-flash" pluginspace="http://www.macromedia.com/go/getflashplayer" />\n');
   document.write('<noembed>\n');
   document.write('Flash image containing quiz answer.\n');
   document.write('</noembed>\n');
   document.write('</object>\n');
}

function RunBanner(FlashFileName) {
var FlashFileName;
   document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" id="' + FlashFileName + '" width="139" height="77" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0">\n');
   document.write('<param name="movie" value="' + FilePath + 'images/headers/' + FlashFileName + '.swf" />\n');
   document.write('<param name="quality" value="high" />\n');
   document.write('<param name="play" value="true" />\n');
   document.write('<param name="loop" value="false" />\n');
   document.write('<param name ="base" value="' + FilePath + 'images/headers/" />\n');
   document.write('<param name="bgcolor" value="#ffffff" />\n');
   document.write('<embed src="' + FilePath + 'images/headers/' + FlashFileName + '.swf" width="139" height="77" bgcolor="#ffffff" base="flash/" quality="high" loop="false" type="application/x-shockwave-flash" pluginspace="http://www.macromedia.com/go/getflashplayer" />\n');
   document.write('<noembed>\n');
   document.write('Agricultural Science and Education\n');
   document.write('</noembed>\n');
   document.write('</object>\n');
}

function RunSlideShow(FlashFileName) {
var FlashFileName;
   document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" id="' + FlashFileName + '" width="306" height="452" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0">\n');
   document.write('<param name="movie" value="flash/' + FlashFileName + '.swf" />\n');
   document.write('<param name="quality" value="high" />\n');
   document.write('<param name="wmode" value="transparent" />\n');
   document.write('<param name="play" value="true" />\n');
   document.write('<param name="loop" value="true" />\n');
   document.write('<param name ="base" value="flash/" />\n');
   document.write('<param name="bgcolor" value="#ffffff" />\n');
   document.write('<embed src="flash/' + FlashFileName + '.swf" width="306" height="452" bgcolor="#ffffff" base="flash/" quality="high" loop="true" wmode="transparent" type="application/x-shockwave-flash" pluginspace="http://www.macromedia.com/go/getflashplayer" />\n');
   document.write('<noembed>\n');
   document.write('Cure animals or design them:\n');
   document.write('		<ul>\n');
   document.write('		    <li><a href="animal_health.html">Animal Health Science</a></li>\n');
   document.write('		    <li><a href="animal_vet.html">Animal Science</a></li>\n');
   document.write('		</ul>\n');
   document.write('Experiment:\n');
   document.write('		<ul>\n');
   document.write('		    <li><a href="foods_nutrition.html">Foods & Nutrition</a></li>\n');
   document.write('		    <li><a href="food_science.html">Food Science &amp; Technology</a></li>\n');
   document.write('		</ul>\n');
   document.write('Be a natural executive:\n');
   document.write('		<ul>\n');
   document.write('		    <li><a href="food_mktng.html">Food Marketing &amp; Agribusiness Management</a></li>\n');
   document.write('		</ul>\n');
   document.write('Make a fashion statement:\n');
   document.write('		<ul>\n');
   document.write('		    <li><a href="apparel.html">Apparel Merchandising &amp; Management</a></li>\n');
   document.write('		</ul>\n');
   document.write('Create sustainable ecosystems:\n');
   document.write('		<ul>\n');
   document.write('		    <li><a href="plant_science.html">Plant Science</a></li>\n');
   document.write('		</ul>\n');
   document.write('Try everything.  And teach it:\n');
   document.write('		<ul>\n');
   document.write('			    <li><a href="agriscience_edu.html">Agricultural Science (Ag Education)</a></li>\n');
   document.write('		</ul>\n');
   document.write('</noembed>\n');
   document.write('</object>\n');
}


startList = function() {
if (document.all&&document.getElementById) {
navRoot = document.getElementById("navtopdrop");
for (i=0; i<navRoot.childNodes.length; i++) {
node = navRoot.childNodes[i];
if (node.nodeName=="LI") {
node.onmouseover=function() {
this.className+=" over";
  }
  node.onmouseout=function() {
  this.className=this.className.replace(" over", "");
   }
   }
  }
 }
}
window.onload=startList; MM_preloadImages('images/agriscience/agri_science_edu_r16_c7_f2.gif','images/agriscience/agri_science_edu_r18_c7_f2.gif','images/agriscience/agri_science_edu_r9_c2_f2.gif','images/apparel/gallery_on.gif','images/apparel/high_fashion_f2.gif','images/animal/animal_industry_on.jpg','images/animal/animal_industry_on.gif','images/food_mktng/business_leader_on.gif','images/food_science/fairtrade_on.gif','images/home/agriculture_r8_c5_f2.gif','images/home/agriculture_r9_c5_f2.jpg','images/home/majors_menu_r2_c2_f2.jpg','images/home/majors_menu_r2_c4_f2.jpg','images/home/majors_menu_r4_c2_f2.jpg','images/home/majors_menu_r4_c4_f2.jpg','images/home/majors_menu_r6_c2_f2.jpg','images/home/majors_menu_r6_c4_f2.jpg','images/home/majors_menu_r8_c2_f2.jpg','images/home/majors_menu_r8_c4_f2.jpg','images/home/whats_up_r1_c1_f2.gif','images/home/whats_up_r1_c2_f2.gif','images/home/whats_up_r2_c2_f2.jpg','images/home/agriculture_r14_c1_f2.jpg','images/home/agriculture_r14_c6_f2.jpg','images/agriscience/agri_science_edu_r16_c7_f2.gif','images/agriscience/agri_science_edu_r18_c7_f2.gif','images/agriscience/agri_science_edu_r9_c2_f2.gif','images/animal_vet/animal_industry_on.gif','images/animal/animal_industry_on.jpg','images/animal/animal_industry_on.gif','images/animal_health/onthefarm_on.gif','images/apparel/gallery_on.gif','images/apparel/high_fashion_f2.gif','images/food_mktng/business_leader_on.gif','images/food_science/fairtrade_on.gif','images/food_mktng/business_leader_on.gif','images/foods_nutrition/healthy_cells_on.gif','images/plant_sciences/shape_landscape_on.gif','images/plant_sciences/shape_landscape_on.gif','images/general/questions_banner_f2.jpg');


//v1.0 AC_RunActiveContent.js
//Copyright 2006 Adobe Systems, Inc. All rights reserved.
function AC_AddExtension(src, ext)
{
  if (src.indexOf('?') != -1)
    return src.replace(/\?/, ext+'?'); 
  else
    return src + ext;
}

function AC_Generateobj(objAttrs, params, embedAttrs) 
{ 
  var str = '<object ';
  for (var i in objAttrs)
    str += i + '="' + objAttrs[i] + '" ';
  str += '>';
  for (var i in params)
    str += '<param name="' + i + '" value="' + params[i] + '" /> ';
  str += '<embed ';
  for (var i in embedAttrs)
    str += i + '="' + embedAttrs[i] + '" ';
  str += ' ></embed></object>';

  document.write(str);
}

function AC_FL_RunContent(){
  var ret = 
    AC_GetArgs
    (  arguments, ".swf", "movie", "clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"
     , "application/x-shockwave-flash"
    );
  AC_Generateobj(ret.objAttrs, ret.params, ret.embedAttrs);
}

function AC_SW_RunContent(){
  var ret = 
    AC_GetArgs
    (  arguments, ".dcr", "src", "clsid:166B1BCA-3F9C-11CF-8075-444553540000"
     , null
    );
  AC_Generateobj(ret.objAttrs, ret.params, ret.embedAttrs);
}

function AC_GetArgs(args, ext, srcParamName, classid, mimeType){
  var ret = new Object();
  ret.embedAttrs = new Object();
  ret.params = new Object();
  ret.objAttrs = new Object();
  for (var i=0; i < args.length; i=i+2){
    var currArg = args[i].toLowerCase();    

    switch (currArg){	
      case "classid":
        break;
      case "pluginspage":
        ret.embedAttrs[args[i]] = args[i+1];
        break;
      case "src":
      case "movie":	
        args[i+1] = AC_AddExtension(args[i+1], ext);
        ret.embedAttrs["src"] = args[i+1];
        ret.params[srcParamName] = args[i+1];
        break;
      case "onafterupdate":
      case "onbeforeupdate":
      case "onblur":
      case "oncellchange":
      case "onclick":
      case "ondblClick":
      case "ondrag":
      case "ondragend":
      case "ondragenter":
      case "ondragleave":
      case "ondragover":
      case "ondrop":
      case "onfinish":
      case "onfocus":
      case "onhelp":
      case "onmousedown":
      case "onmouseup":
      case "onmouseover":
      case "onmousemove":
      case "onmouseout":
      case "onkeypress":
      case "onkeydown":
      case "onkeyup":
      case "onload":
      case "onlosecapture":
      case "onpropertychange":
      case "onreadystatechange":
      case "onrowsdelete":
      case "onrowenter":
      case "onrowexit":
      case "onrowsinserted":
      case "onstart":
      case "onscroll":
      case "onbeforeeditfocus":
      case "onactivate":
      case "onbeforedeactivate":
      case "ondeactivate":
      case "type":
      case "codebase":
        ret.objAttrs[args[i]] = args[i+1];
        break;
      case "width":
      case "height":
      case "align":
      case "vspace": 
      case "hspace":
      case "class":
      case "title":
      case "accesskey":
      case "name":
      case "id":
      case "tabindex":
        ret.embedAttrs[args[i]] = ret.objAttrs[args[i]] = args[i+1];
        break;
      default:
        ret.embedAttrs[args[i]] = ret.params[args[i]] = args[i+1];
    }
  }
  ret.objAttrs["classid"] = classid;
  if (mimeType) ret.embedAttrs["type"] = mimeType;
  return ret;
}
