/* ------------------------------------------------------------------------------- +

	File:		preload.js
	Author:		Ben Nadel
	Date:		February 08, 2005
	Desc:		This preloads any images that are needed by the current page. 
				Page can be determined through ENV.PP and ENV.SP values.

+ ------------------------------------------------------------------------------- */

// Check to see if we need to make the web root include the westserver.net dealy.
if (false){
	ENV.WebRoot = "https://ssl4.westserver.net/cafecosa/";
}


// Preload the global navigation images
var imgShop_off = new Image();
	imgShop_off.src = (ENV.WebRoot + "resources/images/global/shop.gif");
var imgShop_on = new Image();
	imgShop_on.src = (ENV.WebRoot + "resources/images/global/shop_f2.gif");

var imgCoffeeClub_off = new Image();
	imgCoffeeClub_off.src = (ENV.WebRoot + "resources/images/global/coffee_club.gif");
var imgCoffeeClub_on = new Image();
	imgCoffeeClub_on.src = (ENV.WebRoot + "resources/images/global/coffee_club_f2.gif");

var imgWholesale_off = new Image();
	imgWholesale_off.src = (ENV.WebRoot + "resources/images/global/wholesale.gif");
var imgWholesale_on = new Image();
	imgWholesale_on.src = (ENV.WebRoot + "resources/images/global/wholesale_f2.gif");

var imgFundraising_off = new Image();
	imgFundraising_off.src = (ENV.WebRoot + "resources/images/global/fundraising.gif");
var imgFundraising_on = new Image();
	imgFundraising_on.src = (ENV.WebRoot + "resources/images/global/fundraising_f2.gif");
	
var imgEnEspanol_off = new Image();
	imgEnEspanol_off.src = (ENV.WebRoot + "resources/images/global/en_espanol.gif");
var imgEnEspanol_on = new Image();
	imgEnEspanol_on.src = (ENV.WebRoot + "resources/images/global/en_espanol_f2.gif");
	
var imgAbout_off = new Image();
	imgAbout_off.src = (ENV.WebRoot + "resources/images/global/about.gif");
var imgAbout_on = new Image();
	imgAbout_on.src = (ENV.WebRoot + "resources/images/global/about_f2.gif");
	
var imgContact_off = new Image();
	imgContact_off.src = (ENV.WebRoot + "resources/images/global/contact.gif");
var imgContact_on = new Image();
	imgContact_on.src = (ENV.WebRoot + "resources/images/global/contact_f2.gif");

	
			
// Check the page that we are on
switch (ENV.Section.PrimaryGroup){
	
	case "en_espanol":
	
		var imgQuienesSomos_off = new Image();
			imgQuienesSomos_off.src = (ENV.WebRoot + "resources/images/global/quienes_somos.gif");
		var imgQuienesSomos_on = new Image();
			imgQuienesSomos_on.src = (ENV.WebRoot + "resources/images/global/quienes_somos_f2.gif");
			
		var imgNuestrosProductos_off = new Image();
			imgNuestrosProductos_off.src = (ENV.WebRoot + "resources/images/global/nuestros_productos.gif");
		var imgNuestrosProductos_on = new Image();
			imgNuestrosProductos_on.src = (ENV.WebRoot + "resources/images/global/nuestros_productos_f2.gif");
			
		var imgServicios_off = new Image();
			imgServicios_off.src = (ENV.WebRoot + "resources/images/global/servicios.gif");
		var imgServicios_on = new Image();
			imgServicios_on.src = (ENV.WebRoot + "resources/images/global/servicios_f2.gif");
			
		var imgContactenos_off = new Image();
			imgContactenos_off.src = (ENV.WebRoot + "resources/images/global/contactenos.gif");
		var imgContactenos_on = new Image();
			imgContactenos_on.src = (ENV.WebRoot + "resources/images/global/contactenos_f2.gif");
			
		break;

	case "fundraising":

       
		var imgHowItWorks_off = new Image();
			imgHowItWorks_off.src = (ENV.WebRoot + "resources/images/global/how_it_works.gif");
		var imgHowItWorks_on = new Image();
			imgHowItWorks_on.src = (ENV.WebRoot + "resources/images/global/how_it_works_f2.gif");

		var imgDownloadableResources_off = new Image();
			imgDownloadableResources_off.src = (ENV.WebRoot + "resources/images/global/download.gif");
		var imgDownloadableResources_on = new Image();
			imgDownloadableResources_on.src = (ENV.WebRoot + "resources/images/global/download_f2.gif");

		var imgEarningPotential_off = new Image();
			imgEarningPotential_off.src = (ENV.WebRoot + "resources/images/global/earning_potential.gif");
		var imgEarningPotential_on = new Image();                                                             
			imgEarningPotential_on.src = (ENV.WebRoot + "resources/images/global/earning_potential_f2.gif");
			
		var imgBuildingCommunity_off = new Image();
			imgBuildingCommunity_off.src = (ENV.WebRoot + "resources/images/global/building_community.gif");
		var imgBuildingCommunity_on = new Image();
			imgBuildingCommunity_on.src = (ENV.WebRoot + "resources/images/global/building_community_f2.gif");
			
		var imgFAQs_off = new Image();
			imgFAQs_off.src = (ENV.WebRoot + "resources/images/global/faqs.gif");
		var imgFAQs_on = new Image();
			imgFAQs_on.src = (ENV.WebRoot + "resources/images/global/faqs_f2.gif");
			
		break;
}

