/* ________________________________________________________________________________
   
                       slideshows-main.js ~ rev. 2012.02.07
                 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 rotationNo1=new fadeSlideShow({
	wrapperid: "rotation1", //ID of blank DIV on page to house Slideshow
	dimensions: [300, 138], //width/height of gallery in pixels. Should reflect dimensions of largest image
	imagearray: Rotation(0), // 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 rotationNo2=new fadeSlideShow({
	wrapperid: "rotation2",
	dimensions: [300, 138],
	imagearray: Rotation(10), // 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 Rotation(offset) {
	var imgNames = ImgNames();
	var pageURLs = PageURLs();
	var total = imgNames.length;
	var rotation = new Array(total);

	for (var i = offset; i < total + offset; ++i)
		rotation[i - offset] = new Array(
			"images/rotations/" + imgNames[i % total] + ".jpg",
			"http://www." + pageURLs[i % total], "_new",
			"Click here to access the website"
		);
	return rotation;
}


// 21 items:
function ImgNames() {
	return new Array(
		"america", "baker2", "becker-kaye", "cwclub", "ellismartin", "friday3", "healthline", "hood", "investtalk", "kfsd", "longlive", 
		"military", "miracles2", "mortgage411", "nac", "pwstreet", "rchs", "resilience3", "trading", "water760", "wisdom"
	);
}


// 21 items:
function PageURLs() {
	return new Array(
		// Begin rotation 1 here:
		"stahl4congress.com/",
		"rickbakershow.com/",
		"lordoflending.com/",
		"commonwealthclub.org/",
		"ellismartinreport.com/",
		"raymondjames.com/cavanaughfinancial/",
		"healthline.cc/default.htm",
		"hoodfinancial.com/",
		"investtalk.com/",
		"thesparadio.com/",
		"longliveamerica.com/",

		// Begin rotation 2 here:
		"defensetracker.com/web/",
		"jeannejennay.com/",
		"goaom.com/",
		"newvitality.com/shop/super-beta-prostate.aspx?utm_source=Media_Buying&amp;utm_medium=Banner&amp;utm_term=EC-http%3A%2F%2Fwww.kceoradio.com%2F&amp;utm_content=EC&amp;utm_campaign=Beta_Prostate",
		"pwstreet.com/",
		"rchumanesociety.org/",
		"freestoresavailable.com/",
		"powertradingradio.com/",
		"water760.com",
		"gabrielwisdom.com/"
	);
}


// Code to embed Yahoo Finance widget and Ustream player:

function YahooFinanceWidget() {
	document.write("<iframe allowtransparency='true' marginwidth='0' marginheight='0' hspace='0' vspace='0' frameborder='0' scrolling='no' src='http://api.finance.yahoo.com/instrument/1.0/%5EGSPC,QCOM/badge;chart=1d;news=3;quote/HTML?AppID=621Cyu1HanICn3wQp86ZQBapmPQ-&sig=k6eHGKeblr22iVerhwBQSDt.YCU-&amp;t=1194924036209'><a href='http://finance.yahoo.com'>Yahoo! Finance</a><br/><a href='http://finance.yahoo.com/q?s=^GSPC'>Quote for ^GSPC</a></iframe>");
}


function UstreamPlayer() {
	document.write("<embed flashvars='autoplay=false&amp;brand=embed' width='300' height='240' allowfullscreen='true' src='http://www.ustream.tv/flash/live/1948' type='application/x-shockwave-flash' />");
}



