//	CCClp.js	Lake Powell Drought scripts
//			includes makeNewWindow();, openIt-closeIt();, and lpCache()

//	function makeNewWindow();
var newWindow = null;                           // initialize newWindow variable
function makeNewWindow(loc,name,size) {
//      Since we have varying sizes and shapes of windows, we need to
//      close it first, if it exists, so newWindow will open correctly.
  if (newWindow && !newWindow.closed)           // check for an open window
     { newWindow.close(); }                     // and close it if it exists
  newWindow = window.open(loc,name,size);       // then create the newWindow
    return false;                               // override the href #, and
    newWindow.focus();                          // be certain it is on top
}

//	openIt-closeIt(); opens/closes popup text boxes
function  openIt(elId) { document.getElementById (elId).style.visibility = "visible"; }
function closeIt(elId) { document.getElementById (elId).style.visibility = "hidden";  }

//	lpCache();
function lpCache() {
var lpPix = new Array() ;
  lpPix[0] = new Image(110,34) ;
  lpPix[0].src = "/Drought/images/PWG_b.jpg" ;
  lpPix[1] = new Image(720,480) ;
  lpPix[1].src = "/Drought/images/NASA_19990325.jpg" ;
  lpPix[2] = new Image(720,480) ;
  lpPix[2].src = "/Drought/images/NASA_20000420.jpg" ;
  lpPix[3] = new Image(720,480) ;
  lpPix[3].src = "/Drought/images/NASA_20010423.jpg" ;
  lpPix[4] = new Image(720,480) ;
  lpPix[4].src = "/Drought/images/NASA_20020512.jpg" ;
  lpPix[5] = new Image(720,480) ;
  lpPix[5].src = "/Drought/images/NASA_20030413.jpg" ;
  lpPix[6] = new Image(720,480) ;
  lpPix[6].src = "/Drought/images/NASA_20040501.jpg" ;
  lpPix[7] = new Image(720,480) ;
  lpPix[7].src = "/Drought/images/NASA_20050402.jpg" ;
  lpPix[8] = new Image(720,480) ;
  lpPix[8].src = "/Drought/images/NASA_20060426.jpg" ;
  lpPix[9] = new Image(720,480) ;
  lpPix[9].src = "/Drought/images/NASA_20070517.jpg" ;
  lpPix[10] = new Image(720,480) ;
  lpPix[10].src = "/Drought/images/NASA_20080426.jpg" ;
  lpPix[11] = new Image(720,480) ;
  lpPix[11].src = "/Drought/images/NASA_20090413.jpg" ;
  lpPix[12] = new Image(720,480) ;
  lpPix[12].src = "/Drought/images/NASA_20100407.jpg" ;
  lpPix[13] = new Image(800,600) ;
  lpPix[13].src = "/Drought/images/LoneRock.jpg" ;
  lpPix[14] = new Image(720,405) ;
  lpPix[14].src = "/Drought/images/lakepowell07.jpg" ;
  lpPix[15] = new Image(577,357) ;
  lpPix[15].src = "/Drought/images/FaceCanyon.jpg" ;
  lpPix[16] = new Image(920,630) ;
  lpPix[16].src = "/Drought/images/CathedralCanyon.jpg" ;
  lpPix[17] = new Image(930,630) ;
  lpPix[17].src = "/Drought/images/Anasazi.jpg" ;
  lpPix[18] = new Image(930,630) ;
  lpPix[18].src = "/Drought/images/Kayaking.jpg" ;
  lpPix[19] = new Image(506,272) ;
  lpPix[19].src = "/Navajo/images/Hitecrossing571-270.jpg" ;
  lpPix[20] =new Image(422,272) ;
  lpPix[20].src = "/Drought/images/Hite1-dr.jpg" ;
  lpPix[21] = new Image(250,242) ;
  lpPix[21].src = "/Drought/images/Hite1-2dr.jpg" ;
  lpPix[22] = new Image(252,242) ;
  lpPix[22].src = "/Navajo/images/Hite5-dr.jpg" ;
}

