﻿var theImages = new Array();

theImages[0] = "MFGImages/alside.jpg";
theImages[1] = "MFGImages/arcoaire.jpg";
theImages[2] = "MFGImages/bluelinx-georgia-pacific.jpg";
theImages[3] = "MFGImages/boise-cascade.jpg";
theImages[4] = "MFGImages/certainteed.jpg";
theImages[5] = "MFGImages/clopay.jpg";
theImages[6] = "MFGImages/coleman.jpg";
theImages[7] = "MFGImages/comfortmaker.jpg";
theImages[8] = "MFGImages/danze.jpg";
theImages[9] = "MFGImages/eaton.jpg";
theImages[10] = "MFGImages/eemax.jpg";
theImages[11] = "MFGImages/emerson.jpg";
theImages[12] = "MFGImages/ge.jpg";
theImages[13] = "MFGImages/gentek.jpg";
theImages[14] = "MFGImages/gerber.jpg";
theImages[15] = "MFGImages/glidden.jpg";
theImages[16] = "MFGImages/heil.jpg";
//theImages[17] = "MFGImages/hometeam-taexx.jpg";
theImages[17] = "MFGImages/climatemaster-estimator.jpg";
theImages[18] = "MFGImages/hylite-usblock.jpg";
theImages[19] = "MFGImages/icp-daynight.jpg";
theImages[20] = "MFGImages/ideal-door.jpg";
//theImages[21] = "MFGImages/kohler-sterling.jpg";
theImages[21] = "MFGImages/frigidaire-estimator.jpg";
theImages[22] = "MFGImages/lennox-hearth.jpg";
theImages[23] = "MFGImages/lennox.jpg";
theImages[24] = "MFGImages/luxaire.jpg";
theImages[25] = "MFGImages/mastic.jpg";
//theImages[26] = "MFGImages/monierlifetile.jpg";
theImages[26] = "MFGImages/boral-estimator.jpg";
theImages[27] = "MFGImages/napco.jpg";
theImages[28] = "MFGImages/pactiv.jpg";
theImages[29] = "MFGImages/pionite.jpg";
theImages[30] = "MFGImages/plygem-stone.jpg";
theImages[31] = "MFGImages/plygem-windows.jpg";
theImages[32] = "MFGImages/revere-building-products.jpg";
theImages[33] = "MFGImages/rheem.jpg";
theImages[34] = "MFGImages/ruud.jpg";
theImages[35] = "MFGImages/shaw.jpg";
//theImages[36] = "MFGImages/sherwin-williams.jpg";
//theImages[36] = "MFGImages/siemens.jpg";
theImages[36] = "MFGImages/tempstar.jpg";
theImages[37] = "MFGImages/thomas.jpg";
theImages[38] = "MFGImages/usp.jpg";
theImages[39] = "MFGImages/variform.jpg";
theImages[40] = "MFGImages/yale.jpg";
theImages[41] = "MFGImages/york.jpg";
theImages[42] = "MFGImages/fmi-products.jpg";
theImages[43] = "MFGImages/decra.jpg";
//theImages[44] = "MFGImages/gladiator-estimator.jpg";
theImages[44] = "MFGImages/knauf-estimator.jpg";
//theImages[45] = "MFGImages/kitchenaid-estimator.jpg";
theImages[45] = "MFGImages/cellwood-estimator.jpg";
//theImages[46] = "MFGImages/maytag-estimator.jpg";
theImages[46] = "MFGImages/gp_estimator.jpg";
//theImages[47] = "MFGImages/whirlpool-estimator.jpg";
theImages[47] = "MFGImages/electrolux-estimator.jpg";
theImages[48] = "MFGImages/esw-estimator.jpg";

var theLinks = new Array();

theLinks[0] = "http://www.alside.com";
theLinks[1] = "http://www.arcoaire.com";
theLinks[2] = "http://www.bluelinxco.com";
theLinks[3] = "http://www.bc.com";
theLinks[4] = "http://www.certainteed.com";
theLinks[5] = "http://www.clopaydoor.com";
theLinks[6] = "http://www.colemanac.com";
theLinks[7] = "http://www.comfortmaker.com";
theLinks[8] = "http://www.danze.com";
theLinks[9] = "http://www.eaton.com";
theLinks[10] = "http://www.eemax.com";
theLinks[11] = "http://www.emersonclimate.com";
theLinks[12] = "http://www.ge.com";
theLinks[13] = "http://www.gentex.com";
theLinks[14] = "http://www.www.gerberonline.com/default.aspx";
theLinks[15] = "http://www.glidden.com";
theLinks[16] = "http://www.heil-hvac.com";
theLinks[17] = "http://www.www.climatemaster.com";
theLinks[18] = "http://www.hy-lite.com";
theLinks[19] = "http://www.icpusa.com";
theLinks[20] = "http://www.idealdoors.com";
theLinks[21] = "http://www.frigidaire.com";
theLinks[22] = "http://www.lennoxhearthproducts.com";
theLinks[23] = "http://www.lennox.com";
theLinks[24] = "http://www.luxaire.com";
theLinks[25] = "http://www.mastic.com";
theLinks[26] = "http://www.boralna.com/rooftiles/rooftiles.asp";
theLinks[27] = "http://www.napcobuildingproducts.com";
theLinks[28] = "http://www.pactiv.com";
theLinks[29] = "http://www.www.panolam.com/pionite/index.php";
theLinks[30] = "http://www.plygemstone.com";
theLinks[31] = "http://www.plygemwindows.com";
theLinks[32] = "http://www.reverebuildingproducts.com";
theLinks[33] = "http://www.rheem.com";
theLinks[34] = "http://www.ruud.com";
theLinks[35] = "http://www.shawfloors.com";
//theLinks[36] = "http://www.sherwin-williams.com";
//theLinks[36] = "http://usa.siemens.com";
theLinks[36] = "http://www.tempstar.com";
theLinks[37] = "http://www.thomaslighting.com";
theLinks[38] = "http://www.uspconnectors.com";
theLinks[39] = "http://www.variform.com";
theLinks[40] = "http://www.yalelock.com";
theLinks[41] = "http://www.york.com";
theLinks[42] = "http://www.fmiproducts.com";
theLinks[43] = "http://www.decra.com";
theLinks[44] = "http://www.knaufinsulation.us";
theLinks[45] = "http://www.cellwood.com";
//theLinks[46] = "http://www.whirlpool.com";
//theLinks[47] = "http://www.whirlpool.com";
theLinks[46] = "http://www.gp.com";
theLinks[47] = "http://www.electroluxusa.com/welcome/";
theLinks[48] = "http://www.estoneworks.com/";

var theMarketplaceImages = new Array();

theMarketplaceImages[0] = "Images/donald-a-gardner-logo.jpg";
theMarketplaceImages[1] = "Images/furniture-brands.png";
theMarketplaceImages[2] = "Images/experian-logo.jpg";
theMarketplaceImages[3] = "Images/constellation-software.jpg";
theMarketplaceImages[4] = "Images/gallagher-logo.jpg";

var j = 0;
var p = theImages.length;
var preBuffer = new Array();
for (i = 0; i < p; i++) {
    preBuffer[i] = new Image();
    preBuffer[i].src = theImages[i];
}

var whichImage = Math.round(Math.random() * (p - 1));

var t = 0;
var n;
var l = theMarketplaceImages.length;
var marketPreBuffer = new Array();
for (n = 0; n < l; n++) {
    marketPreBuffer[n] = new Image();
    marketPreBuffer[n].src = theMarketplaceImages[n];
}

var whichMarketplaceImage = Math.round(Math.random() * (l - 1));

function showImage() {
    document.getElementById("spaMFGImage").innerHTML = "<a href='" + theLinks[whichImage] + "' target='_blank'><img src='" + theImages[whichImage] + "' alt='' border='0' /></a>";
}

function showMarketplaceImage() {
    document.getElementById("spaMarketPlaceImage").innerHTML = "<img src='" + theMarketplaceImages[whichMarketplaceImage] + "' alt='' border='0' /></a>";
}

