//	CCCdr.js  -  scripts for Colorado Basin Drought
//	includes CCCGlobal.js and drCache()

//	CCCGlobal.js  -  scripts for all pages (makeNewWindow, goBack, twoClicks)
//	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
}

//	function goBack()
function goBack() { window.history.back(); }

//	function twoClicks() - opens explanatory window for goBack()
var tcWindow = null;
function twoClicks() {
  if (tcWindow && !tcWindow.closed)
     { tcWindow.close(); }
  tcWindow = window.open('/TwoClicks.php','tcWindow','width=535,height=176'); 
    tcWindow.focus();
}
//	Colorado Basin Drought
function drCache() {
var drPix = new Array() ;
  drPix[0] = new Image(350,456) ;
  drPix[0].src = "/Drought/images/colorado_river_basin_cr.jpg" ;
  drPix[1] = new Image(580,195) ;
  drPix[1].src = "/Drought/images/DrainageB.jpg" ;
  drPix[2] = new Image(251,146) ;
  drPix[2].src = "/Drought/images/NASA1_t.jpg" ;
  drPix[3] = new Image(410,146) ;
  drPix[3].src = "/Drought/images/LoneRock-Dam_t.jpg" ;
  drPix[4] = new Image(127,146) ;
  drPix[4].src = "/Drought/images/FaceCanyon_t.jpg" ;
  drPix[5] = new Image(142,146) ;
  drPix[5].src = "/Drought/images/CathedralCanyon_t.jpg" ;
  drPix[6] = new Image(208,141) ;
  drPix[6].src = "/Drought/images/Kayaking_t.jpg" ;
  drPix[7] = new Image(260,141) ;
  drPix[7].src = "/Drought/images/Anasazi_t.jpg" ;
  drPix[8] = new Image(461,141) ;
  drPix[8].src = "/Drought/images/Hite_dr-cr.jpg" ;
  drPix[9] = new Image(117,152) ;
  drPix[9].src = "/Drought/images/mead_1993-2003_rt_t.jpg" ;
  drPix[10] = new Image(149,152) ;
  drPix[10].src = "/Drought/images/Intake_t.jpg" ;
  drPix[11] = new Image(259,152) ;
  drPix[11].src = "/Drought/images/Boat_t.jpg" ;
  drPix[12] = new Image(204,152) ;
  drPix[12].src = "/Drought/images/Lake_mead_t.jpg" ;
  drPix[13] = new Image(179,152) ;
  drPix[13].src = "/Drought/images/meade_landsat_03_t.jpg" ;
  drPix[14] = new Image(179,135) ;
  drPix[14].src = "/Drought/images/mead_2003_t.jpg" ;
}
