
smallSizes = new Array(110,66);
mediumSizes = new Array(210,126);
pageName = 'colors.htm';
scriptName = 'colors.js';
countX = 15;
countY = 4;

// sections: name, small images path, medium images path, big images path
// images: name, src, big width, big height
var arImages = new Array(
  new Array('CLASSIC','images/colors/small/','images/colors/medium/','images/colors/big/',
    new Array(
      new Array('Autumn Brown','AutumnBrown.jpg',660,396),
      new Array('Burnt Oak','BurntOak.jpg',660,396),
      new Array('Charley Brown','CharleyBrown.jpg',660,396),
      new Array('Driftwood Bark','Driftwood.jpg',660,396),
      new Array('Mohave Bark','MohaveBark.jpg',660,396),
      new Array('Saturn Flash','SaturnFlash.jpg',660,396),
      new Array('Saturn Red','SaturnRed.jpg',660,396),
      new Array('Sedona Bark','Sedona.jpg',660,396),
      new Array('Toast Bark','Toast.jpg',660,396)
    )
  ),

  new Array('ANTIQUE','images/colors/small/','images/colors/medium/','images/colors/big/',
    new Array(
      new Array('Antique','Antique_1.jpg',700,365),
//      new Array('Antque','Antque2x8.jpg',700,346)
//      new Array('Landmark','Landmark.jpg',700,347),
      new Array('Landmark','Landmark_1.jpg',700,368),
//      new Array('Monument','Monument.jpg',700,347)
      new Array('Monument','Monument_1.jpg',700,367)
    )
  ),

  new Array('ESTATE','images/colors/small/','images/colors/medium/','images/colors/big/',
    new Array(
      new Array('Autumn Harvest','AutumnHarvest.jpg',660,396),
//      new Array('Autumn Mist','AutumnMist.jpg',660,396),
      new Array('Autumn Mist','Autumn Mist.jpg',700,363),
      new Array('Brookstone','Brookstone.jpg',700,377),
//      new Array('Brookstone','Stonybrook.jpg',660,396),
      new Array('Buckskin','Buckskin_1.jpg',700,370),
//      new Array('Buckskin','Buckskin.jpg',660,396),
      new Array('Cajun Spice','CajunSpice.jpg',660,396),
      new Array('California Used','California Used.jpg',700,374),
//      new Array('California Used','CaliforniaUsed.jpg',660,396),
      new Array('Claret Blaze','Claret Blaze.jpg',700,354),
//      new Array('Delaware','Delaware.jpg',660,396),
      new Array('Delaware','Delaware_1.jpg',700,378),
      new Array('Disney Dunes','Disney Dunes.jpg',677,400),
      new Array('Disney Sands','Disney Sands.jpg',700,359),
//      new Array('Ironwood','Ironwood.jpg',660,396),
      new Array('Ironwood','Ironwood_1.jpg',700,372),
//      new Array('Old English','OldEnglish.jpg',660,396),
      new Array('Old English','Old English.jpg',700,377),
//      new Array('Old Hampton','OldHampton.jpg',660,396),
      new Array('Old Hampton','Old Hampton.jpg',700,371),
//      new Array('Old Hampton Bronze','OldHamptonBronze.jpg',660,396),
      new Array('Old Hampton Bronze','Old Hampton Bronze.jpg',700,376),
//      new Array('Old Hampton Red','OldHamptonRed.jpg',660,396),
      new Array('Old Hampton Red','Old Hampton Red.jpg',700,370),
//      new Array('Old Redding','OldRedding.jpg',660,396),
      new Array('Old Redding','Old Redding.jpg',700,369),
//      new Array('Old Town','OldTown.jpg',660,396),
      new Array('Old Town','Old Town.jpg',700,366),
      new Array('Sagewood','Sagewood.jpg',700,378),
//      new Array('Sandhurst','Sandhurst.jpg',674,400),
      new Array('Sandhurst','Sandhurst_1.jpg',700,373),
//      new Array('Savannah','Savannah.jpg',660,396),
      new Array('Savannah','Savannah_1.jpg',700,375),
//      new Array('Shasta','Shasta.jpg',660,396),
      new Array('Shasta','Shasta_1.jpg',700,368),
//      new Array('Silver Springs','SilverSprings.jpg',660,396),
      new Array('Silver Springs','Silver Springs.jpg',700,366),
      new Array('Thomasville','Georgetown.jpg',660,396),
//      new Array('Wrightwood','Wrightwood.jpg',660,396)
      new Array('Wrightwood','Wrightwood_1.jpg',700,365)
    )
  ),

  new Array('EVERGREEN','images/colors/small/','images/colors/medium/','images/colors/big/',
    new Array(
      new Array('Aiden','Aiden Web.jpg',678,400),
      new Array('Crestline','Crestline Web.jpg',678,400),
      new Array('Cumberland','Cumberland.jpg',678,400),
      new Array('Glacier Bay','glacier_bay.jpg',678,400),
      new Array('Haystack','Haystack.jpg',700,366),
      new Array('Macon','Macon Web.jpg',678,400),
      new Array('Moraga','Moraga Web.jpg',678,400),
      new Array('Rocklin','Rocklin.jpg',678,400),
      new Array('Seneca','Seneca.jpg',678,400),
      new Array('Somerset','Somerset.jpg',678,400,'images/Somerset1_big.jpg',400,400),
      new Array('Spruce','Spruce.jpg',678,400),
      new Array('Storm Cloud','storm_cloud.jpg',678,400,'images/Storm-Cloud-big.jpg',400,400),
      new Array('Sundance','Sundance Web.jpg',678,400),
      new Array('Windamere','Windamere Web.jpg',678,400),
      new Array('Yellowstone','Yellowstone_1.jpg',700,372)
    )
  ),

  new Array('SHORELINE','images/colors/small/','images/colors/medium/','images/colors/big/',
    new Array(
      new Array('Avalon','Avalon_1.jpg',700,364),
//      new Array('Avalon','Avalon.jpg',700,388),
      new Array('Balboa','Balboa.jpg',700,344),
      new Array('Cabrillo','Cabrillo_2.jpg',700,361),
//      new Array('Cabrillo','Cabrillo_1.jpg',700,323),
      new Array('Catalina','Catalina_2.jpg',700,363),
//      new Array('Catalina','Catalina_1.jpg',700,322),
//      new Array('Westlake','Westlake_1.jpg',700,332)
      new Array('Westlake','Westlake_2.jpg',700,359)
    )
  ),

  new Array('RAILROAD','images/colors/small/','images/colors/medium/','images/colors/big/',
    new Array(
      new Array('Arlington','Arlington.jpg',640,382),
      new Array('Bronze Age','Bronze Age.jpg',640,379),
      new Array('Fort Mason','Fort Mason.jpg',640,372),
      new Array('Iron Mountain','Iron Mountain.jpg',640,376),
      new Array('Railyard','Railyard.jpg',640,388)
    )
  )

)
 
section = getParameter(self.document.location.href, 'section');
if (isNaN(section) || (section=='') || (section<0) || (section>arImages.length))
  section = 0; 

ind = getParameter(self.document.location.href, 'ind');
if (isNaN(ind) || (ind=='') || (ind<0) || (ind>arImages[section][4].length))
  ind = 0; 

var arPreloadImages = new Array();
function preload() {
  if (arImages[section][2]!='') {
    for (i=ind;(i<(Number(ind)+Number(countX*countY))) && (i<arImages[section][4].length);i++) {
      arPreloadImages[i] = new Image(mediumSizes[0],mediumSizes[1]);
      arPreloadImages[i].src = arImages[section][2]+arImages[section][4][i][1];
    }
  }
}
  
function showImageMedium(number) {
  showImage('imagemedium',arImages[section][2]+arImages[section][4][number][1]);
  showMessage('imagemediumname',arImages[section][4][number][0]);
}

function showImageBig(number) {
  width = arImages[section][4][number][2];
  height = arImages[section][4][number][3];
  width = (width>750)?750:width;
  height = (height>500)?500:height;
  width+=130;
  height+=180;
  width = (width<350)?350:width;
  height = (height<200)?200:height;
  win = window.open('big_image_print.htm?script='+scriptName+'&section='+section
	+'&ind='+number,'_blank');
  win.focus();
}

function showImageBigSection(number) {
  width = arImages[section][4][number][2];
  height = arImages[section][4][number][3];
  width = (width>750)?750:width;
  height = (height>500)?500:height;
  width+=130;
  height+=180;
  width = (width<350)?350:width;
  height = (height<200)?200:height;
  win = window.open('big_image_print.htm?script='+scriptName+'&section='+arImages[section][4][number][4]+'&ind='+arImages[section][4][number][5],'_blank');
  win.focus();
}
