// - - - - - - - - - INDEX.HTML FEATURED ITEM RANDOMIZER - - - - - - - - - - - - - - - - >>

/*

Instructions for script:
1. Change "totalImgs" value if needed, to reflect actual number of active members in db. 
2. Only single quotes allowed in text.

*/



var totalImgsA = 6;		// INDEX event feature images
var totalImgsB = 7;
var totalImgsC = 11;
var imgPath = "/conference-images/"; 

function randomizeIt(totI) {
	var p = Math.round(Math.random()*totI);
	if (p == 0) { p = 1; }
	return p;
}

function randomizeTrips(totI) {
	var p = Math.round(Math.random()*totI);
	return p;
}

// This is the randomizer for feature photos
var ra = randomizeIt(totalImgsA);
var rb = randomizeIt(totalImgsB);
var rc = randomizeIt(totalImgsC); 


// - - - - - - - - - BEGIN EDITABLE AREA (please only make changes here) - - - - - - - - - - - - - - - - >>

imagesA = new Array;
imagesA[1] = new Image();
imagesA[1].loc = "doe_seal.jpg";
imagesA[1].cap = "Arctic Foundations, Inc.";
imagesA[1].url = "http://www.doe.gov/";
imagesA[1].lev = "Organizational/Gold Sponsors";

imagesA[2] = new Image();
imagesA[2].loc = "NETL_Logo.jpg";
imagesA[2].cap = "Alyeska Pipeline Service Company";
imagesA[2].url = "http://www.netl.doe.gov/";
imagesA[2].lev = "Organizational/Gold Sponsors";

imagesA[3] = new Image();
imagesA[3].loc = "blm.jpg";
imagesA[3].cap = "Alyeska Pipeline Service Company";
imagesA[3].url = "http://www.blm.gov/ak/";
imagesA[3].lev = "Organizational Sponsors";

imagesA[4] = new Image();
imagesA[4].loc = "dnrlogo-col-1sm.jpg";
imagesA[4].cap = "Alyeska Pipeline Service Company";
imagesA[4].url = "http://dnr.alaska.gov/";
imagesA[4].lev = "Organizational Sponsors";

imagesA[5] = new Image();
imagesA[5].loc = "its_small.jpg";
imagesA[5].cap = "Alyeska Pipeline Service Company";
imagesA[5].url = "http://www.itsalaska.org/";
imagesA[5].lev = "Organizational Sponsors";

imagesA[6] = new Image();
imagesA[6].loc = "afc_logo.jpg";
imagesA[6].cap = "Alyeska Pipeline Service Company";
imagesA[6].url = "http://www.akfrontier.com/";
imagesA[6].lev = "Gold Sponsors";


// - - - - - - - - - IMAGES B - - - - - - - - - - - - - - - - >>

imagesB = new Array;
imagesB[1] = new Image();
imagesB[1].loc = "Crowley-Signature.jpg";
imagesB[1].cap = "EBA Engineering Consultants Ltd.";
imagesB[1].url = "http://www.crowley.com/";
imagesB[1].lev = "Bronze Sponsors";

imagesB[2] = new Image();
imagesB[2].loc = "beaded_stream.jpg";
imagesB[2].cap = "Shannon & Wilson Inc. Geotechnical and Environmental Consultants";
imagesB[2].url = "http://www.beadedstream.com/";
imagesB[2].lev = "Brass Sponsors";

imagesB[3] = new Image();
imagesB[3].loc = "Peak_Logo.jpg";
imagesB[3].cap = "Shannon & Wilson Inc. Geotechnical and Environmental Consultants";
imagesB[3].url = "http://www.peakalaska.com/";
imagesB[3].lev = "Brass Sponsors";

imagesB[4] = new Image();
imagesB[4].loc = "gws.jpg";
imagesB[4].cap = "Shannon & Wilson Inc. Geotechnical and Environmental Consultants";
imagesB[4].url = "http://www.gwscientific.com/";
imagesB[4].lev = "Contributing Sponsors";

imagesB[5] = new Image();
imagesB[5].loc = "logo_granite.jpg";
imagesB[5].cap = "Shannon & Wilson Inc. Geotechnical and Environmental Consultants";
imagesB[5].url = "#";
imagesB[5].lev = "Contributing Sponsors";

imagesB[6] = new Image();
imagesB[6].loc = "abr.jpg";
imagesB[6].cap = "Shannon & Wilson Inc. Geotechnical and Environmental Consultants";
imagesB[6].url = "http://www.itsalaska.org/abrinc.com";
imagesB[6].lev = "Contributing Sponsors";

imagesB[7] = new Image();
imagesB[7].loc = "baker.jpg";
imagesB[7].cap = "Shannon & Wilson Inc. Geotechnical and Environmental Consultants";
imagesB[7].url = "http://www.mbakercorp.com/";
imagesB[7].lev = "Contributing Sponsors";


// - - - - - - - - - IMAGES C - - - - - - - - - - - - - - - - >>

imagesC = new Array;
imagesC[1] = new Image();
imagesC[1].loc = "alutiia.jpg";
imagesC[1].cap = "Shannon & Wilson Inc. Geotechnical and Environmental Consultants";
imagesC[1].url = "http://alutiiq.com/";
imagesC[1].lev = "Booth Sponsors";

imagesC[2] = new Image();
imagesC[2].loc = "sensor_soft.jpg";
imagesC[2].cap = "Shannon & Wilson Inc. Geotechnical and Environmental Consultants";
imagesC[2].url = "http://www.sensoft.ca/products/noggin/n_icemap.html";
imagesC[2].lev = "Booth Sponsors";

imagesC[3] = new Image();
imagesC[3].loc = "sensor_soft.jpg";
imagesC[3].cap = "Shannon & Wilson Inc. Geotechnical and Environmental Consultants";
imagesC[3].url = "http://www.sensoft.ca/products/noggin/n_icemap.html";
imagesC[3].lev = "Booth Sponsors";

imagesC[4] = new Image();
imagesC[4].loc = "gina.jpg";
imagesC[4].cap = "Shannon & Wilson Inc. Geotechnical and Environmental Consultants";
imagesC[4].url = "http://www.gina.alaska.edu/";
imagesC[4].lev = "Booth Sponsors";

imagesC[5] = new Image();
imagesC[5].loc = "logo_thermobondsm.jpg";
imagesC[5].cap = "Shannon & Wilson Inc. Geotechnical and Environmental Consultants";
imagesC[5].url = "http://www.thermobond.com/";
imagesC[5].lev = "Booth Sponsors";

imagesC[6] = new Image();
imagesC[6].loc = "csi_canada.jpg";
imagesC[6].cap = "Shannon & Wilson Inc. Geotechnical and Environmental Consultants";
imagesC[6].url = "http://www.campbellsci.ca/";
imagesC[6].lev = "Booth Sponsors";

imagesC[7] = new Image();
imagesC[7].loc = "csi.jpg";
imagesC[7].cap = "Shannon & Wilson Inc. Geotechnical and Environmental Consultants";
imagesC[7].url = "http://www.campbellsci.com/";
imagesC[7].lev = "Booth Sponsors";

imagesC[8] = new Image();
imagesC[8].loc = "alliance_logo_2010_sm.jpg";
imagesC[8].cap = "Shannon & Wilson Inc. Geotechnical and Environmental Consultants";
imagesC[8].url = "http://alaskaalliance.com/";
imagesC[8].lev = "In-Kind Sponsors";

imagesC[9] = new Image();
imagesC[9].loc = "uspa.jpg";
imagesC[9].cap = "Shannon & Wilson Inc. Geotechnical and Environmental Consultants";
imagesC[9].url = "http://www.uspermafrost.org/";
imagesC[9].lev = "In-Kind Sponsors";

imagesC[10] = new Image();
imagesC[10].loc = "awra-ak.jpg";
imagesC[10].cap = "Shannon & Wilson Inc. Geotechnical and Environmental Consultants";
imagesC[10].url = "http://state.awra.org/alaska";
imagesC[10].lev = "In-Kind Sponsors";

imagesC[11] = new Image();
imagesC[11].loc = "atn_project.jpg";
imagesC[11].cap = "Shannon & Wilson Inc. Geotechnical and Environmental Consultants";
imagesC[11].url = "http://www.arctic-transportation.org/";
imagesC[11].lev = "In-Kind Sponsors";



// - - - - - - - - - END OF EDITABLE AREA - - - - - - - - - - - - - - - - >>

var photoUrlA = imgPath + imagesA[ra].loc;
var photoUrlB = imgPath + imagesB[rb].loc;
var photoUrlC = imgPath + imagesC[rc].loc;

var featureImgA = "<a href='" + imagesA[ra].url + "' target='other'><img src='" + imgPath + imagesA[ra].loc + "' alt='ITS-AK Conference Sponsors'  border='0' id='imgA' /></a>";
//var captionA = "<a href='" + imagesA[ra].url + "' class='Sponsors_caption' target='other'>" + imagesA[ra].cap + "</a>";
var levelA = "<span id='label1'>"+imagesA[ra].lev+"</span>";

var featureImgB = "<a href='" + imagesB[rb].url + "' target='other'><img src='" + imgPath + imagesB[rb].loc + "' alt='ITS-AK Conference Sponsors'  border='0' id='imgB' /></a>";
//var captionB = "<a href='" + imagesA[rb].url + "'class='Sponsors_caption' target='other'>" + imagesA[rb].cap + "</a>";
var levelB = "<span id='label2'>"+imagesB[rb].lev+"</span>";

var featureImgC = "<a href='" + imagesC[rc].url + "' target='other'><img src='" + imgPath + imagesC[rc].loc + "' alt='ITS-AK Conference Sponsors'  border='0' id='imgC' /></a>";
//var captionC = "<a href='" + imagesB[rc].url + "'class='Sponsors_caption' target='other'>" + imagesB[rc].cap + "</a>";
var levelC = "<span id='label3'>"+imagesC[rc].lev+"</span>";



// - - - - - - - - - END FEATURE EVENTS - - - - - - - - - - - - - - - - - - - - - - - - - - >>