var navReady = false;  // flag to prevent errors before images have been loaded

//function loadImages() {
  var state = new Array("","off","on");
  for(var i=1;i<7;i++) {
    for(var j=1;j<3;j++) {
      // nav numbers and highlights
      eval('nav0'+ i + state[j] + ' = new Image()');
      eval('nav0'+ i + state[j] + '.src = \"images/nav-0' + i + '-' +  state[j] + '.gif\"');
    }
  }
  navReady = true;
//} // end loadImages

// rollover code uses imgRef above
function RollOn(myImage) {
	if (navReady) {
		eval(myImage + ".src = " + myImage + "on.src");
	}
}

function RollOff(myImage) {
	if (navReady) {
		eval(myImage + ".src = " + myImage + "off.src");
	}
}




function openWin(url, popWidth, popHeight, popScroll, popStatus) {

		// popStatus is a new parameter; it is optional so that old calls will not cause an error
		var statusBar = (popStatus == null) ? popScroll : popStatus; 
		if (popStatus != null && popStatus == "yes") { 

			// 'fix' for Mac IE's problem when including a status bar in the pop up window
			// - the browser chops off the bottom 18 pixels of the window to accomodate for the
			//   the status bar, and so we add 18 pixels to the height
			isMac = (navigator.appVersion.indexOf("Mac") == -1) ? false : true;
			if (!ns && isMac) { popHeight = String(Number(popHeight) + 18); }
		}

		if(win) {
			win.close();
			setTimeout('openWin(url, popWidth, popHeight, popScroll, popStatus)',1000);
			return;
		}
		var win=window.open(url,'popup','width=' + popWidth + ',height=' + popHeight + ',screenX=0,screenY=0,left=0,top=0,scrollbars=' + popScroll + ',resize=no,status=' + statusBar + '');
		// win.resizeTo(popWidth, popHeight);
		if (win.opener == null) win.opener = self;
		win.focus();
}

