//
function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);

function copyright() {
  var now = new Date();
  var year = now.getFullYear();
  document.write("&copy; " + year);
}

function dropdown(){ 
 if(navigator.appVersion.indexOf("MSIE")==-1){return;}
 var i,k,g,lg,r=/\s*actfnd/,nn='',c,cs='actfnd',bv='dropmenu';
 for(i=0;i<10;i++){g=document.getElementById(bv+nn);if(g){
 lg=g.getElementsByTagName("LI");if(lg){for(k=0;k<lg.length;k++){
 lg[k].onmouseover=function(){c=this.className;cl=(c)?c+' '+cs:cs;
 this.className=cl;};lg[k].onmouseout=function(){c=this.className;
 this.className=(c)?c.replace(r,''):'';};}}}nn=i+1;}
}

// Random Home Images
function homeimage() {
myImages = new Array('for_teachers.jpg','for_consumers.jpg','for_actuaries.jpg');
var myArray = myImages[Math.floor(Math.random()*myImages.length)];
document.write('<img src="http://www.actuarialfoundation.org/staging/images/'+ myArray +'" border="0" width="560" height="349" name="homeimage">');
}

function homeOver(imgName){ 
	document["homeimage"].src = eval(imgName + ".src"); 
}

function displayDate() {
  var now = new Date();
  var today = now.getDate();
  var month = now.getMonth();
    var monthName = new Array(12)
      monthName[0]="January ";
      monthName[1]="February ";
      monthName[2]="March ";
      monthName[3]="April ";
      monthName[4]="May ";
      monthName[5]="June ";
      monthName[6]="July ";
      monthName[7]="August ";
      monthName[8]="September ";
      monthName[9]="October ";
      monthName[10]="November ";
      monthName[11]="December ";
  var year = now.getFullYear();

  document.write("<p><strong>" + monthName[month]+today+ ", "+year + "</strong></p>");
}

function printPage() {
  if (window.print)
    window.print()
  else
    alert("Sorry, your browser doesn't support this feature. To print this page, press CTRL+P (PC users) or CMD+P (Mac users).");
}

// Rollovers
function imgOver(imgName){ 
	document[imgName].src = eval(imgName + "_over.src"); 
}

function imgOff(imgName){ 
	document[imgName].src = eval(imgName + "_off.src"); 
}


teachers = new Image();
teachers.src = "http://www.actuarialfoundation.org/staging/images/for_teachers.jpg";

consumers = new Image();
consumers.src = "http://www.actuarialfoundation.org/staging/images/for_consumers.jpg";

actuaries = new Image();
actuaries.src = "http://www.actuarialfoundation.org/staging/images/for_actuaries.jpg";


forteachers_off = new Image();
forteachers_off.src = "http://www.actuarialfoundation.org/staging/images/for_teachers.gif";

forteachers_over = new Image();
forteachers_over.src = "http://www.actuarialfoundation.org/staging/images/for_teachers_f2.gif";

forconsumers_off = new Image();
forconsumers_off.src = "http://www.actuarialfoundation.org/staging/images/for_consumers.gif";

forconsumers_over = new Image();
forconsumers_over.src = "http://www.actuarialfoundation.org/staging/images/for_consumers_f2.gif";

foractuaries_off = new Image();
foractuaries_off.src = "http://www.actuarialfoundation.org/staging/images/for_actuaries.gif";

foractuaries_over = new Image();
foractuaries_over.src = "http://www.actuarialfoundation.org/staging/images/for_actuaries_f2.gif";


about_off = new Image();
about_off.src = "http://www.actuarialfoundation.org/staging/images/nav_who_we_are.jpg";

about_over = new Image();
about_over.src = "http://www.actuarialfoundation.org/staging/images/nav_who_we_are_f2.jpg";

programs_off = new Image();
programs_off.src = "http://www.actuarialfoundation.org/staging/images/nav_programs.jpg";

programs_over = new Image();
programs_over.src = "http://www.actuarialfoundation.org/staging/images/nav_programs_f2.jpg";

involved_off = new Image();
involved_off.src = "http://www.actuarialfoundation.org/staging/images/nav_get_involved.jpg";

involved_over = new Image();
involved_over.src = "http://www.actuarialfoundation.org/staging/images/nav_get_involved_f2.jpg";

publications_off = new Image();
publications_off.src = "http://www.actuarialfoundation.org/staging/images/nav_publications.jpg";

publications_over = new Image();
publications_over.src = "http://www.actuarialfoundation.org/staging/images/nav_publications_f2.jpg";

sponsorships_off = new Image();
sponsorships_off.src = "http://www.actuarialfoundation.org/staging/images/nav_sponsorships.jpg";

sponsorships_over = new Image();
sponsorships_over.src = "http://www.actuarialfoundation.org/staging/images/nav_sponsorships_f2.jpg";

events_off = new Image();
events_off.src = "http://www.actuarialfoundation.org/staging/images/nav_events.jpg";

events_over = new Image();
events_over.src = "http://www.actuarialfoundation.org/staging/images/nav_events_f2.jpg";

donate_off = new Image();
donate_off.src = "http://www.actuarialfoundation.org/staging/images/nav_donate.jpg";

donate_over = new Image();
donate_over.src = "http://www.actuarialfoundation.org/staging/images/nav_donate_f2.jpg";

contact_off = new Image();
contact_off.src = "http://www.actuarialfoundation.org/staging/images/nav_contact.gif";

contact_over = new Image();
contact_over.src = "http://www.actuarialfoundation.org/staging/images/nav_contact_f2.gif";

faqs_off = new Image();
faqs_off.src = "http://www.actuarialfoundation.org/staging/images/nav_faqs.gif";

faqs_over = new Image();
faqs_over.src = "http://www.actuarialfoundation.org/staging/images/nav_faqs_f2.gif";

news_off = new Image();
news_off.src = "http://www.actuarialfoundation.org/staging/images/nav_news.gif";

news_over = new Image();
news_over.src = "http://www.actuarialfoundation.org/staging/images/nav_news_f2.gif";
