/*
Interactive Image slideshow with text description
By Christian Carlessi Salvadóocolinks@c.net.gt). Keep this notice intact.
Visit http://www.dynamicdrive.com for script
*/
g_fPlayMode = 0;
g_iimg = -1;
g_imax = 0;
g_ImageTable = new Array();

function ChangeImage(fFwd)
{
	if (fFwd) {
		if (++g_iimg==g_imax)
			g_iimg=0;
	} else {
		if (g_iimg==0)
			g_iimg=g_imax;
		g_iimg--;
	}
	Update();
}

function getobject(obj) {
	if (document.getElementById)
		return document.getElementById(obj)
	else if (document.all)
		return document.all[obj]
}

function Update() {
	getobject("_Ath_Slide").src = g_ImageTable[g_iimg][0];
	getobject("_Ath_FileName").innerHTML = g_ImageTable[g_iimg][1];
	getobject("_Ath_URL").href=g_ImageTable[g_iimg][2];
	getobject("_Ath_Img_X").innerHTML = g_iimg + 1;
	getobject("_Ath_Img_N").innerHTML = g_imax;
}


function Play() {
	g_fPlayMode = !g_fPlayMode;
	if (g_fPlayMode) {
		getobject("btnPrev").disabled = getobject("btnNext").disabled = true;
		getobject("bntPlay").value = "Stop";
		Next();
	} else {
		getobject("btnPrev").disabled = getobject("btnNext").disabled = false;
		getobject("bntPlay").value = "Play";
	}
}

function OnImgLoad() {
	if (g_fPlayMode)
		window.setTimeout("Tick()", g_dwTimeOutSec*1000);
}

function Tick() {
	if (g_fPlayMode)
		Next();
}

function Prev() {
	ChangeImage(false);
}

function Next() {
	ChangeImage(true);
}


////configure below variables/////////////////////////////
//default graphics - "/images/logo/naacp.gif" 

//configure the below images and description to your own. 
g_ImageTable[g_imax++] = new Array (
		"http://www.washingtonpost.com/wp-dyn/content/photo/2010/08/28/PH2010082801751.jpg",
		"Inside Al Sharpton's 'Reclaim the Dream' march",
		"http://voices.washingtonpost.com/44/2010/08/live-coverage-al-sharptons-rec.html"
);
g_ImageTable[g_imax++] = new Array (
		"/images/logo/naacp.gif",
		"Tickets on sale for NAACP's 5th Freedom Fund Banquet",
		"http://www.delmarvanow.com/article/20100830/NEWS01/100830036/1002/TIX--Tickets-on-sale-for-NAACP-s-5th-Freedom-Fund-Banquet"
);

g_ImageTable[g_imax++] = new Array (
		"http://media3.washingtonpost.com/wp-dyn/content/photo/2010/07/21/PH2010072104440.jpg",
		"Sherrod turns down offer to make fresh start at USDA",
		"http://www.washingtonpost.com/wp-dyn/content/article/2010/08/24/AR2010082406531.html"
);

g_ImageTable[g_imax++] = new Array (
		"http://latimesblogs.latimes.com/.a/6a00d8341c630a53ef01348690f653970c-320wi",
		"The Emmys: now with more cultural diversity!",
		"http://latimesblogs.latimes.com/showtracker/2010/08/the-emmys-now-with-more-cultural-diversity.html"
);

g_ImageTable[g_imax++] = new Array (
		"http://latimesblogs.latimes.com/.a/6a00d8341c630a53ef01348690f653970c-320wi",
		"The Emmys: now with more cultural diversity!",
		"http://latimesblogs.latimes.com/showtracker/2010/08/the-emmys-now-with-more-cultural-diversity.html"
);

g_ImageTable[g_imax++] = new Array (
		"http://llnw.image.cbslocal.com/26/2010/08/30/175x131/Philly.jpg",
		"NAACP Announces Plans For October Rally",
		"http://cbs3.com/local/Philadelphia.NAACP.Rally.2.1887203.html"
);

/*
g_ImageTable[g_imax++] = new Array (
		"/images/bereavement/dorsey.jpg",
		"Howard County Times Cousin, Dorsey to get Human Rights Awards",
		"http://www.explorehoward.com/community/15563/cousin-dorsey-get-human-rights-awards/"
);
g_ImageTable[g_imax++] = new Array (
		"/images/news/jealous.jpg",
		"Benjamin Todd Jealous - President and CEO-Elect of NAACP",
		"http://www.naacp.org/about/leadership/executive/jealous/index.htm"
);
g_ImageTable[g_imax++] = new Array (
		"/images/logo/naacp.gif",
		"Kaiser Health Disparities Report: A Weekly Look At Race, Ethnicity And Health",
		"http://www.kaisernetwork.org/daily_reports/rep_index.cfm?DR_ID=51553"
);
g_ImageTable[g_imax++] = new Array (
		"/images/logo/naacp.gif",
		"NAACP seeks probe into sludge spreading in black communities",
		"http://www.examiner.com/a-1343288~NAACP_seeks_probe_into_sludge_spreading_in_black_communities.html"
);
g_ImageTable[g_imax++] = new Array (
		"http://media3.washingtonpost.com/wp-dyn/content/photo/2008/01/23/PH2008012301812.jpg",
		"In King's Spirit, Race Is the Topic",
		"http://www.washingtonpost.com/wp-dyn/content/article/2008/01/23/AR2008012301800.html"
);
g_ImageTable[g_imax++] = new Array (
		"http://graphics8.nytimes.com/images/2007/12/28/us/28bangor.2-190.jpg",
		"Threat in Maine, the Whitest State, Shakes Local N.A.A.C.P.",
		"http://www.nytimes.com/2007/12/28/us/28bangor.html"
);
g_ImageTable[g_imax++] = new Array (
		"http://i.l.cnn.net/cnn/2007/POLITICS/11/16/justice.rally/art.march.crowd.cnn.jpg",
		"Rally urges hate crimes prosecutions, new AG responds",
		"http://www.cnn.com/2007/POLITICS/11/16/justice.rally/index.html?iref=newssearch"
);
*/

//extend the above list as desired
g_dwTimeOutSec=5

////End configuration/////////////////////////////
window.addEventListener ? window.addEventListener("load", Next, false) : window.attachEvent("onload", Next);

//if (document.getElementById||document.all)
	//window.onload=Next

