/******************************************
--  This site was designed and implemented by Miller Systems.
--  (c) Copyright 2002.  All rights reserved.
--  http://www.millersystems.com
--  Miller Systems, Inc. Boston MA 02116
******************************************/

var arPreloadedImages = new Array();
var initialized = false;

///////////////////////
// init()
//////////////////////
function init() {

about_off = new Image();
about_off.src = '/images/secondary/btn_about.gif';
about_on = new Image();
about_on.src = '/images/secondary/btn_about_hl.gif';
our_off = new Image();
our_off.src = '/images/secondary/btn_our.gif';
our_on = new Image();
our_on.src = '/images/secondary/btn_our_hl.gif';
oncology_off = new Image();
oncology_off.src = '/images/secondary/btn_oncology.gif';
oncology_on = new Image();
oncology_on.src = '/images/secondary/btn_oncology_hl.gif';
eirb_off = new Image();
eirb_off.src = '/images/secondary/btn_eirb.gif';
eirb_on = new Image();
eirb_on.src = '/images/secondary/btn_eirb_hl.gif';
hippa_off = new Image();
hippa_off.src = '/images/secondary/btn_hippa.gif';
hippa_on = new Image();
hippa_on.src = '/images/secondary/btn_hippa_hl.gif';
forms_off = new Image();
forms_off.src = '/images/secondary/btn_forms.gif';
forms_on = new Image();
forms_on.src = '/images/secondary/btn_forms_hl.gif';
contact_off = new Image();
contact_off.src = '/images/secondary/btn_contact.gif';
contact_on = new Image();
contact_on.src = '/images/secondary/btn_contact_hl.gif';

}

window.onload = init;

///////////////////////
// preloadImage()
//////////////////////
function preloadImage(label,source) {
	arPreloadedImages[label] = new Image;
	arPreloadedImages[label].src = source;
	
	//arPreloadedImages['btn_forms'].src
	
}

///////////////////////
// swapImage()
// - used to swap a named image's src attribute for another
// - arguments - unlimited number of image name/source pairs
// - example - swapImage("foo","/images/foo.gif")
///////////////////////
function swapImage(imgName,imgSource) {
	if (document.images) {
		document.images[imgName].src = imgSource;
	}
}

// * - fixes an issue with Netscape 4.x browsers
//   - when a user resized the browser, absolute positioning would be lost
// * - document information will be lost if not saved

if (document.layers) {
	origWinWidth = window.innerWidth;
	origWinHeight = window.innerHeight;
	
	window.onresize = function() {
		currWinWidth = window.innerWidth;
		currWinHeight = window.innerHeight;
		if((origWinWidth != currWinWidth) || (origWinHeight != currWinHeight)) location.reload();
	}
}