var ads = new Array();
var selAds = new Array(4);

var txtSigD = "Signature Design";
var txtSP = "Screen-Printed";
var txtDST = "Digital/Sub Transfer";
var txtTF = "Thermo-FILMŪ";

var digitalsubtransfers = "images/apparel/digitalsubtransfers/";
var screenprinted = "images/apparel/screenprinted/";
var thermofilm = "images/apparel/thermofilm/";

//ads[ads.length] = new ad("Original Design", ".jpg", "", screenprinted);
ads[ads.length] = new ad(txtSP, "autozoneshow.jpg", "10th Annual Autozone Car Show", screenprinted);
ads[ads.length] = new ad(txtSigD, "bedandbreakfast.jpg", "'Cocke County Bed and Breakfast'", screenprinted);
ads[ads.length] = new ad(txtDST, "brandonjames.jpg", "Brandon James Racing", digitalsubtransfers);
ads[ads.length] = new ad(txtSigD, "ccfbi.jpg", "'Cocke County FBI'", screenprinted);
ads[ads.length] = new ad(txtTF, "ccfc1.jpg", "CCHS Fighting Cocks (Design A)", thermofilm);
ads[ads.length] = new ad(txtTF, "ccfc2.jpg", "CCHS Fighting Cocks (Design B)", thermofilm);
ads[ads.length] = new ad(txtTF, "ccfc3.jpg", "CCHS Fighting Cocks (Design C)", thermofilm);
ads[ads.length] = new ad(txtDST, "ccfc4.jpg", "CCHS Fighting Cocks (Design D)", digitalsubtransfers);
ads[ads.length] = new ad(txtTF, "ccfc5.jpg", "CCHS Fighting Cocks (Design E)", thermofilm);
ads[ads.length] = new ad(txtDST, "ccfc6.jpg", "CCHS Fighting Cocks (Design F)", digitalsubtransfers);
ads[ads.length] = new ad(txtSP, "ccfc7.jpg", "CCHS Fighting Cocks (Design G)", screenprinted);
ads[ads.length] = new ad(txtSP, "ccfc8.jpg", "CCHS Fighting Cocks (Design H)", digitalsubtransfers);
ads[ads.length] = new ad(txtDST, "ccfc9.jpg", "CCHS Fighting Cocks (Design I)", digitalsubtransfers);
ads[ads.length] = new ad(txtSP, "ccleadership06.jpg", "CCHS Leadership Club 2006-2007", screenprinted);
ads[ads.length] = new ad(txtSP, "ccleadership07.jpg", "CCHS Leadership Club 2007-2008", screenprinted);
ads[ads.length] = new ad(txtSigD, "ccsurvivor.jpg", "'Cocke County Survivor'", digitalsubtransfers);
ads[ads.length] = new ad(txtSP, "chsclass2008.jpg", "Cosby High School Class of 2008", screenprinted);
ads[ads.length] = new ad(txtSP, "chsclass2009.jpg", "Cosby High School Class of 2009", screenprinted);
ads[ads.length] = new ad(txtSP, "chsclass2010.jpg", "Cosby High School Class of 2010", screenprinted);
ads[ads.length] = new ad(txtSigD, "cockevegas.jpg", "'Cocke Vegas'", digitalsubtransfers);
ads[ads.length] = new ad(txtDST, "cocknfire.jpg", "Cocke 'n Fire @ the Cockpit", digitalsubtransfers);
ads[ads.length] = new ad(txtDST, "cosbyeagles1.jpg", "Cosby Eagles (Design A)", digitalsubtransfers);
ads[ads.length] = new ad(txtTF, "cosbyeagles2.jpg", "Cosby Eagles (Design B)", thermofilm);
ads[ads.length] = new ad(txtSP, "cosbyeagles4.jpg", "Cosby Eagles (Design D)", screenprinted);
ads[ads.length] = new ad(txtTF, "cosbyeagles5.jpg", "Cosby Eagles (Design E)", thermofilm);
ads[ads.length] = new ad(txtTF, "cosbyeagles6.jpg", "Cosby Eagles (Design F)", thermofilm);
ads[ads.length] = new ad(txtSP, "flockofcocks.jpg", "Flock of Cocks", screenprinted);
ads[ads.length] = new ad(txtSP, "gethsemanevbs07.jpg", "Gethsemane Church VBS 2007", screenprinted);
ads[ads.length] = new ad(txtSigD, "livingincockecounty.jpg", "'Living in Cocke County'", screenprinted);
ads[ads.length] = new ad(txtSP, "msrodrun06.jpg", "24th Annual Moonshine Rod Run", screenprinted);
ads[ads.length] = new ad(txtSP, "msrodrun07.jpg", "25th Annual Moonshine Rod Run", screenprinted);
ads[ads.length] = new ad(txtSigD, "operationrosethorn.jpg", "'Operation Rose Thorn'", digitalsubtransfers);
ads[ads.length] = new ad(txtSP, "thatchevyshow.jpg", "All Chevy/GMC '07 (Alt Design)", screenprinted);
ads[ads.length] = new ad(txtDST, "tinytitans.jpg", "Tiny Titans 07/08 Basketball", digitalsubtransfers);
ads[ads.length] = new ad(txtSigD, "whosnext.jpg", "'Who's Next?'", screenprinted);
ads[ads.length] = new ad(txtDST, "wnpc.jpg", "92.9 WNPC Newport", digitalsubtransfers);


function ad(Header, ImageUrl, Text, Url) {
    this.Header = Header;
    this.ImageUrl = "images/rightcolumn/" + ImageUrl;
    this.Text = Text;
    this.Url = Url + ImageUrl;
}

selAds[0] = Math.floor(Math.random() * (ads.length));

do{
    selAds[1] = Math.floor(Math.random() * (ads.length));
} while(selAds[1] == selAds[0]);

do{
    selAds[2] = Math.floor(Math.random() * (ads.length));
} while((selAds[2] == selAds[0]) || (selAds[2] == selAds[1]));

do{
    selAds[3] = Math.floor(Math.random() * (ads.length));
} while((selAds[3] == selAds[0]) || (selAds[3] == selAds[1]) || (selAds[3] == selAds[2]));