if (document.images) {
	var img = new Array();
	//enter images into the array
	img[0] = 'images/nav_about_0.gif';
	img[1] = 'images/nav_about_1.gif';
	img[2] = 'images/nav_print_0.gif';
	img[3] = 'images/nav_print_1.gif';
	img[4] = 'images/nav_support_0.gif';
	img[5] = 'images/nav_support_1.gif';
	img[6] = 'images/nav_news_0.gif';
	img[7] = 'images/nav_news_1.gif';
	img[8] = 'images/nav_careers_0.gif';
	img[9] = 'images/nav_careers_1.gif';
	
	var im = new Array();
	
	for (var i = 0; i < img.length; i++) {
		im[i] = new Image();
		im[i].src = img[i];	
	}
}

function toggleImg(imageName, num) {
	if (document.images) {
		document.images[imageName].src = im[num].src;
	}
}

function resolution() {
		document.write("<input name='screenresolution' type='hidden' value='" + screen.width + "x" + screen.height + "' />");
	}

function feature(thename, attributes) {
		window.open(thename, "", attributes);
	}
	
function floor(number)
{  return Math.floor(number*Math.pow(10,2))/Math.pow(10,2);}

function dosum()
{
  var mi = document.temps.IR.value / 1200;
  var base = 1;
  var mbase = 1 + mi;
  for (i=0; i<document.temps.YR.value * 12; i++)
  {
    base = base * mbase
  }
  document.temps.PI.value = floor(document.temps.LA.value * mi / ( 1 - (1/base)))
  document.temps.MT.value = floor(document.temps.AT.value / 12)
  document.temps.MI.value = floor(document.temps.AI.value / 12)
  var dasum = document.temps.LA.value * mi / ( 1 - (1/base)) +
        document.temps.AT.value / 12 + 
        document.temps.AI.value / 12;
  document.temps.MP.value = floor(dasum);
}
