/* Javascript file for Cheryl Di Re */

/* some default constructs */
{

  document.pageloaded = false;

  // determine the month and year
  mydate = new Date();
	year = mydate.getYear();
	if (year < 2000)    
    year = year + 1900; 
	armonth = new Array("January ","February ","March ","April ","May ","June ","July ","August ","September ", "October ","November ","December ")
	var pagemonth = (armonth[mydate.getMonth()]);
  var pageyear = year;
  
}

/* this function is triggered by the onload handler
   on the body tag. it will perform after the page
   has loaded. this is called only from interior pages,
   the splash has its own pageloadedSplash function, below  */
function pageloaded(){
  
  // invoke the "equal column" script to even up the left and right columns
  setTall();

  // these are the nav active states
	preLoadImages('../images/widgets/bullet-email-off.gif','../images/widgets/bullet-email-575-on.gif','../images/widgets/bullet-print-off.gif','../images/widgets/bullet-print-575-on.gif');

  document.pageloaded = true;
}

/* this function is triggered by the onload handler
   on the body tag for only the splash page. it will 
   perform after the pagehas loaded.  */
function pageloadedSplash(){

  // these are the nav active states
  preLoadImages();
  document.pageloaded = true;
}

/* a utility function to dynamically swap out
   one image for another */
function switchImage(image_name,url) {

  if(!document.images) return;
  d=document[image_name];
  if(!d) return;  
  d.src=url;  
}

/* a utility function to preload images */
function preLoadImages()
{
  // preload images: pass in as many as you wish
  var images = new Array();
  for(i = 0; i<preLoadImages.arguments.length;i++)
  {
    images[i] = new Image();
    images[i].src = preLoadImages.arguments[i];
	  //alert(images[i].src);
  }
}
