// JavaScript Document


NumberOfFellows = 3;


// function to write flash obj passing query string vars
function writeFlash() {
	
	// appearance vars, these can be customized to your liking
	var width = '732'
	var height = '453'
	var src = 'home_fellows.swf'
	var rannumber = (Math.floor(Math.random()*10000)+1);
	//alert(rannumber);
	// queries -- type in the variables you want to send to flash here
	//var queries = '?text='+QueryString('year')+'&month='+QueryString('month')+'';
	var queries = '?NumberOfFellows='+NumberOfFellows+'&rand='+rannumber+''
	
	// write all lines
	document.write('<object id="FlashID" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="'+width+'" height="'+height+'">');
  document.write('<param name="movie" value="'+src+queries+'" />');
  document.write('<param name="quality" value="high" />');
  document.write('<param name="wmode" value="opaque" />');
  document.write('<param name="swfversion" value="6.0.65.0" />');
  document.write('<!-- This param tag prompts users with Flash Player 6.0 r65 and higher to download the latest version of Flash Player. Delete it if you don’t want users to see the prompt. -->');
  document.write('<param name="expressinstall" value="Scripts/expressInstall.swf" />');
  document.write('<!-- Next object tag is for non-IE browsers. So hide it from IE using IECC. -->');
  document.write('<!--[if !IE]>-->');
  document.write('<object type="application/x-shockwave-flash" data="'+src+queries+'" width="'+width+'" height="'+height+'">');
    document.write('<!--<![endif]-->');
    document.write('<param name="quality" value="high" />');
    document.write('<param name="wmode" value="opaque" />');
    document.write('<param name="swfversion" value="6.0.65.0" />');
    document.write('<param name="expressinstall" value="Scripts/expressInstall.swf" />');
    document.write('<!-- The browser displays the following alternative content for users with Flash Player 6.0 and older. -->');
    document.write('<div>');
     document.write(' <h4>Content on this page requires a newer version of Adobe Flash Player.</h4>');
      document.write('<p><a href="http://www.adobe.com/go/getflashplayer"><img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" width="112" height="33" /></a></p>');
    document.write('</div>');
    document.write('<!--[if !IE]>-->');
  document.write('</object>');
  document.write('<!--<![endif]-->');
document.write('</object>');

}




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_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];}
}


 var currentdiv = null;
var timerID = null;
ns4 = (document.layers)? true:false;
ie4 = (document.all)? true:false;
W3C = document.getElementById ? 1 : 0;

function hideAll(){
 timerID = setTimeout('hideAll2()',3000)
} 

function hideAll4(){
 timerID = setTimeout('hideAll2()',10)
} 

function clearAll(){
 clearTimeout(timerID)
} 

function hideAll2(){
	 if (ns4) {
		eval("document."+currentdiv+".visibility = 'hide'");
	} else if (ie4) {
		eval("document.all."+currentdiv+".style.visibility = 'hidden'");
	} else if (W3C) {
		eval("document.getElementById('"+currentdiv+"').style.visibility = 'hidden'");
	}
} 

function hideAll3(){
clearTimeout(timerID);
  if (currentdiv != null){
	 if (ns4) {
		eval("document."+currentdiv+".visibility = 'hide'");
	} else if (ie4) {
		eval("document.all."+currentdiv+".style.visibility = 'hidden'");
	} else if (W3C) {
		eval("document.getElementById('"+currentdiv+"').style.visibility = 'hidden'");
	}
  }
} 

function showObject(div) {
clearTimeout(timerID);
	 if (ns4) {
		eval("document."+div+".visibility = 'show'");
	} else if (ie4) {
		eval("document.all."+div+".style.visibility = 'visible'");
	} else if (W3C) {
		eval("document.getElementById('"+div+"').style.visibility = 'visible'");
	}
currentdiv = div;
}