﻿/////////////////////////////////////////////////////////////////////////////////////////
// GLOBALS
var currentImageNumber = 1
//var imgDir = 'images/'
var imgDir = '/_images/success_stories/pics/'

// SUNOPTIC IMAGES

/////////////////////////////////////////////////////////////////////////////////////////
// INDUSTRIAL - Coke
var imgCoc_1 = 'coke-exterior'
var imgCoc_2 = 'coke-interior01'
var imgCoc_3 = 'coke-interior02'
var imgCoc_4 = 'coke-interior03'
var imgCoc_max = 4

// INDUSTRIAL - Gymboree
var imgGym_1 = 'gymboree-exterior'         // sample
var imgGym_2 = 'gymboree-interior01'
var imgGym_3 = 'gymboree-interior02'
var imgGym_max = 3

// INDUSTRIAL - Amermod
var imgAme_1 = 'amermod-exterior'
var imgAme_2 = 'amermod-interiorconst'
var imgAme_3 = 'amermod-interior01'
var imgAme_4 = 'amermod-interior02'
var imgAme_5 = 'amermod-interior03'
var imgAme_max = 5

// INDUSTRIAL - Balteau
var imgBau_1 = 'balteau-exterior'
var imgBau_2 = 'balteau-interior01'
var imgBau_3 = 'balteau-interior02'
var imgBau_max = 3

// INDUSTRIAL - Siemens
var imgSie_1 = 'siemens-exterior'
var imgSie_2 = 'siemens-interior01'
var imgSie_3 = 'siemens-interior02'
var imgSie_max = 3

/////////////////////////////////////////////////////////////////////////////////////////
// RETAIL - Lowes
var imgLowes_1 = 'lowes-exterior'
var imgLowes_2 = 'lowes-interior-1'
var imgLowes_3 = 'lowes-interior-2'
var imgLowes_4 = 'lowes-interior-3'
var imgLowes_5 = 'lowes-interior-4'
var imgLowes_6 = 'lowes-interior-5'
var imgLowes_max = 6

// RETAIL - Walmart
var imgWal_1 = 'walmart-exterior'
var imgWal_2 = 'walmart-roof'
var imgWal_3 = 'walmart-const-dirt'
var imgWal_4 = 'walmart-const-dirt-pile'
var imgWal_5 = 'walmart-const-interior'
var imgWal_6 = 'walmart-interior-pharmacy'
var imgWal_7 = 'walmart-interior-food'
var imgWal_8 = 'walmart-interior-checkout'
var imgWal_9 = 'walmart-us-map'
var imgWal_max = 9

// RETAIL - Office Depot
var imgOffDep_1 = 'office-depot-exterior'
var imgOffDep_2 = 'office-depot-interior-ceiling'
var imgOffDep_3 = 'office-depot-interior-ink'
var imgOffDep_4 = 'office-depot-interior-boxes'
var imgOffDep_5 = 'office-depot-interior-yellow'
var imgOffDep_max = 5

// RETAIL - WinCo Foods
var imgWinCo_1 = 'winco-exterior'
var imgWinCo_2 = 'winco-roof'
var imgWinCo_3 = 'winco-scissors-lift'
var imgWinCo_4 = 'winco-racks-const'
var imgWinCo_5 = 'winco-checkout-const'
var imgWinCo_6 = 'winco-checkout-complete'
var imgWinCo_7 = 'winco-interior1'
var imgWinCo_max = 7

// RETAIL - Food 4 Less Foods
var imgFood4less_1 = 'food4less-exterior'
var imgFood4less_2 = 'food4less-const'
var imgFood4less_3 = 'food4less-interior-const'
var imgFood4less_4 = 'food4less-interior-frozen'
var imgFood4less_5 = 'food4less-interior-drinks'
var imgFood4less_6 = 'food4less-interior-spice'
var imgFood4less_max = 6

// RETAIL - Best Buy
var imgBestBuy_1 = 'bestbuy-exterior'
var imgBestBuy_2 = 'bestbuy-roof'
var imgBestBuy_3 = 'bestbuy-interior'
var imgBestBuy_4 = 'bestbuy-warehouse'
var imgBestBuy_max = 4

// RETAIL - Sams Club
var imgSamsClub_1 = 'samsclub-exterior'
var imgSamsClub_2 = 'samsclub-playhouse'
var imgSamsClub_3 = 'samsclub-wine'
var imgSamsClub_max = 3



/////////////////////////////////////////////////////////////////////////////////////////
// COMMERCIAL - Vacaville
var imgVac_1 = 'vaca-police-front'
var imgVac_2 = 'vaca-police-side'
var imgVac_3 = 'vaca-police-off-const'
var imgVac_4 = 'vaca-police-2nd-office-const'
var imgVac_5 = 'vaca-police-off-finished'
var imgVac_6 = 'vaca-police-stairs-finished'
var imgVac_max = 6

// COMMERCIAL - AAA
// 384 x 289
var imgA_1 = 'aaa-exterior'
var imgA_2 = 'aaa-interior01'
var imgA_3 = 'aaa-interior02'
var imgA_max = 3

// COMMERCIAL - Folsomsports
var imgFol_1 = 'folsomsports-exterior'
var imgFol_2 = 'folsomsports-interior01'
var imgFol_3 = 'folsomsports-soccer'
var imgFol_4 = 'folsomsports-basketball'
var imgFol_5 = 'folsomsports-batting'
var imgFol_max = 5

// COMMERCIAL - Placer
var imgPla_1 = 'placer-exterior'
var imgPla_2 = 'placer-main-office-no-desks'
var imgPla_3 = 'placer-main-office-with-desks'
var imgPla_4 = 'placer-double-well-no-desks'
var imgPla_5 = 'placer-double-well-with-desks'
var imgPla_max = 5


/////////////////////////////////////////////////////////////////////////////////////////
// SCHOOLS - Vella Campus
var imgVel_1 = 'vellacampus-front'
var imgVel_2 = 'vellacampus-roof'
var imgVel_3 = 'vellacampus-class960'
var imgVel_4 = 'vellacampus-class1440'
var imgVel_5 = 'vellacampus-class1440lvrclosed'
var imgVel_6 = 'vellacampus-gym'
var imgVel_7 = 'vellacampus-gymlvrclosed'
var imgVel_8 = 'vellacampus-library'
var imgVel_9 = 'vellacampus-woodshop'
var imgVel_max = 9

// SCHOOLS - Dena Boer
var imgDena_1 = 'denaboer-classroom'
var imgDena_2 = 'denaboer-mproom'
var imgDena_max = 2

// SCHOOLS - Sanders
var imgSanders_1 = 'sanders-exterior'
var imgSanders_2 = 'sanders-const'
var imgSanders_3 = 'sanders-classroom'
var imgSanders_4 = 'sanders-library'
var imgSanders_5 = 'sanders-gym'
var imgSanders_max = 5

// SCHOOLS - St Francis
var imgStFrancis_1 = 'stfrancis-exterior1'
var imgStFrancis_2 = 'stfrancis-exterior2'
var imgStFrancis_3 = 'stfrancis-exterior3'
var imgStFrancis_4 = 'stfrancis-roof'
var imgStFrancis_5 = 'stfrancis-louver'
var imgStFrancis_6 = 'stfrancis-art-class'
var imgStFrancis_7 = 'stfrancis-music-class'
var imgStFrancis_8 = 'stfrancis-piano'
var imgStFrancis_9 = 'stfrancis-gym'
var imgStFrancis_10 = 'stfrancis-library'
var imgStFrancis_11 = 'stfrancis-weight-room'
var imgStFrancis_max = 11

// SCHOOLS - Lillis
var imgLillis_1 = 'lillis-exterior'
var imgLillis_2 = 'lillis-lecture'
var imgLillis_3 = 'lillis-ceiling'
var imgLillis_max = 3


/////////////////////////////////////////////////////////////////////////////////////////

// FUNCTIONS
function showImage(imageBase, imageNumber) {
// Reset large image per selected icon/number.
//    sample:  imageBase = "imgA", imageNumber = 2
    
    max = eval(imageBase + "_max")
    currentImageNumber = imageNumber

	// display selected image in image box (eg, "imgWal_2")
	//  alt: document.getElementById(imageBase + "0").src = imgDir + eval(imageBase + "_" + currentImageNumber) + "-preview.jpg"
	imgElem = document.getElementById(imageBase + "0")
	imgName = eval(imageBase + "_" + currentImageNumber) 
	imgElem.src = imgDir + imgName + "-preview.jpg"

    // set link to full size image (eg, lnkimgWal0, for Walmart)
    document.getElementById("lnk" + imageBase + "0").href = "javascript:openFixedWindow('" + imgDir + imgName + "-full.jpg')"

//alert('img 1: ' + imageBase + 'T_' + currentImageNumber)

// white out all thumbnail borders, then colorize selected border (like "imgWalT_2")
	for(ii=1; ii<=max; ii++) { document.getElementById(imageBase + "T_" + ii).className = 'thumbnail1' }

document.getElementById(imageBase + "T_" + currentImageNumber).className = 'thumbnailSel'
}

function setImage(imageBase) {
	// eg, imageBase = "imgVel"
    // set link to full size image (eg, lnkimgWal0, for Walmart)
	imgName = eval(imageBase + "_1")         // get name of first image 
	document.getElementById("lnk" + imageBase + "0" ).href = "javascript:openFixedWindow('" + imgDir + imgName + "-full.jpg')"
}

function say(msg) {                       // (for debug only)
//    document.write(msg + "<br />")
}
