/* ________________________________________________________________________________
   
                       slideshows-home.js ~ rev. 2012.02.18
                 XGB Web and Software Design ~ www.xgbdesign.com

   This script contains slideshow objects developed by Dynamic Drive DHTML Code
   Library, and accessory functions developed by XGB Web and Software Design.
   Visit Dynamic Drive at http://www.dynamicdrive.com/ for scripts and information.
   ________________________________________________________________________________
*/
	

/* ____________________________________________________________________________________________

   Ultimate Fade In Slideshow v2.0- (c) Dynamic Drive DHTML code library (www.dynamicdrive.com)
   This notice MUST stay intact for legal use
   Visit Dynamic Drive at http://www.dynamicdrive.com/ for this script and 100s more
   ____________________________________________________________________________________________
*/


var artists=new fadeSlideShow({
	wrapperid: "slideshow", //ID of blank DIV on page to house Slideshow
	dimensions: [430, 360], //width/height of gallery in pixels. Should reflect dimensions of largest image
	imagearray: ArtistArray(), // This line modified by XGB Web and Software Design
	displaymode: {type:'auto', pause:5000, cycles:0, wraparound:false},
	persist: false, //remember last viewed slide and recall within same session?
	fadeduration: 800, //transition duration (milliseconds)
	descreveal: "ondemand",
	togglerid: ""
})


var sponsors=new fadeSlideShow({
	wrapperid: "rotation",
	dimensions: [200, 130],
	imagearray: SponsorArray(), // This line modified by XGB Web and Software Design
	displaymode: {type:'auto', pause:5000, cycles:0, wraparound:false},
	persist: false,
	fadeduration: 800,
	descreveal: "ondemand",
	togglerid: ""
})


// Code developed by XGB Web and Software Design: ___________________________________________________________________


function ArtistArray() {
	var total = 27;
	var aArray = new Array(total);
	var rA = RandomArray(total);
	var name = ArtistNames();

	for (var i = 0; i < total; ++i)
		aArray[i] = new Array(
			"images/artists1/" + name[rA[i]] + ".jpg",
			"", "", ""
		);
	return aArray;
}


function RandomArray(total) {
	var rA = new Array(total);
	var taken = new Array(total);

	// Initialize all images to the unselected state:
	for (var i = 0; i < total; ++i)
		taken[i] = false;

	// Make sure no image is selected more than once:
	for (i = 0; i < total; ++i) {
		do
			rA[i] = Math.floor(Math.random() * total);
		while (taken[rA[i]]);
		taken[rA[i]] = true;
	}
	return rA;
}


function ArtistNames() {
	return new Array(
		"alpert-hall", "bacharach", "basie", "bennett", "botti", "brubeck", "buble", 
		"callaway", "cole-n", "connick", "dusk", "feinstein", "kennyg", "krall", 
		"lee", "manilow", "martin", "monheit", "mtransfer", "olstead", "pizzarelli",
		"rich2", "severinsen", "sinatra2", "streisand", "tennille", "tyrell"
	);
}


function SponsorArray() {
	return new Array(
		["images/sponsors/pechanga-winefest.png", "https://www.pechanga.com/tickets/Online/default.asp?doWork::WScontent::loadArticle=Load&BOparam::WScontent::loadArticle::name=WinesFestival2012B&sessionlanguage=", "_new", "Click here for info"],
		["images/sponsors/advertise130.png", "contact.html", "_new", "Click here to inquire"],
		["images/sponsors/pechanga-winefest.png", "https://www.pechanga.com/tickets/Online/default.asp?doWork::WScontent::loadArticle=Load&BOparam::WScontent::loadArticle::name=WinesFestival2012B&sessionlanguage=", "_new", "Click here for info"],
		["images/sponsors/forgotten130.png", "http://www.forgottenhollywood.com/?page_id=11611", "_new", "Click here for info"],
		["images/sponsors/pechanga-winefest.png", "https://www.pechanga.com/tickets/Online/default.asp?doWork::WScontent::loadArticle=Load&BOparam::WScontent::loadArticle::name=WinesFestival2012B&sessionlanguage=", "_new", "Click here for info"],
		["images/sponsors/kceo130.png", "http://www.kceoradio.com/", "_new", "Click here to visit AM 1000 KCEO"]
	);
}



