/// Showcase Main page slideshow
var initloop = true;
var eltSlideShow;
var eltCaptions;
var eltAds0;
var eltContent;
//var eltTest99;
var maxdivs = 7;
var is = new Is();
var intLeftAlley = 780+ 'px;'
var intWideCell = 580 + 'px;';
var intNarrowCell = 200 + 'px;';
var imgHeight = 500
var adImageWidth= 360+'px;'
var adImageHeight= 100+'px;'
var slideShowTop = '265px;'
var captionTopLine = imgHeight+265 + 'px;'
var adToggle=0;

//User defined variables - change these variables to alter the behaviour of the script
var ImageFolder = "/Images/Ads/"; //Folder name containing the images
var ImageFileNames = new Array('Capstone1L.jpg', 'SportsSpectrumL.jpg'); //List of images to use
var ImageURLs = new Array('http://www.amazon.com/exec/obidos/redirect?tag=brettbcom&path=subst/home/home.html', 'http://www.iplus.zetnet.co.uk/', 'http://www.amazon.com/exec/obidos/redirect?tag=brettbcom&path=subst/home/home.html', 'http://www.iplus.zetnet.co.uk/'); //List of hyperlinks associated with the list of images
var DefaultURL = 'http://www.hspn.net/default.asp'; //Default hyperlink for the Banner Ad
var DisplayInterval = 12; //Number of seconds to wait before the next image is displayed
var TargetFrame = ""; //Name of the frame to open the hyperlink into
//Internal variables (do not change these unless you know what you are doing)

// Defaults: --------
var ctrlMainLooping = 1;
var offsetMainSlideShow = 0;
var MainSlideshowImageNum = 0
var startMainSlideshowImageNum = 0;
var selectedCaptionNum = 0;
var refreshMainSlideShowImage = true;
// ------------------

var IsValidBrowser = false;
var BannerAdCode = 0;
var ciInitIndex = 0;
var Adcounter = 0;
/// -------------------------------
var maxAds = 4;
/// -------------------------------
var maxMainSlideshowImageNum = 4;
/// -------------------------------
var firstTimeIn = true;
var startAd = 0;

var oLayer = eval('eltAds0');
var oSlideShow = eval('eltSlideShow');
var oCaptions = eval('eltCaptions');

DisplayInterval = DisplayInterval * 1000;
//var NumberOfImages = ImageFileNames.length;
var NumberOfImagesa = 2;
var CountofDivs = 27;

var userImageSelected;
var lastuserImageSelected = maxMainSlideshowImageNum;
var blnInitialShowcase = true;
//Add a trailing forward slash to the ImageFolder variable if it does not already have one
//if (ImageFolder.substr(ImageFolder.length - 1, ImageFolder.length) != "/" && ImageFolder != "") { ImageFolder += "/";}
//if (TargetFrame == '')
//{
//	var FramesObject = null;
//}	
//else
//{
//	var FramesObject = eval('parent.' + TargetFrame);
//}

function Is ()
{   // convert all characters to lowercase to simplify testing
    var agt=navigator.userAgent.toLowerCase()

    // --- BROWSER VERSION ---
    this.major = parseInt(navigator.appVersion)
    this.minor = parseFloat(navigator.appVersion)

    this.nav  = ((agt.indexOf('mozilla')!=-1) && ((agt.indexOf('spoofer')==-1)
                && (agt.indexOf('compatible') == -1)))
    this.nav2 = (this.nav && (this.major == 2))
    this.nav3 = (this.nav && (this.major == 3))
    this.nav4 = (this.nav && (this.major >= 4))
		
    this.ie   = (agt.indexOf("msie") != -1)
    this.ie3  = (this.ie && (this.major == 2))
    this.ie4  = (this.ie && (this.major == 4))

    this.opera = (agt.indexOf("opera") != -1)
     
    this.nav4up = this.nav && (this.major >= 4)
    this.nav5up = this.nav4up && (navigator.userAgent.indexOf("Firefox")!=-1)

    this.ie4up  = this.ie  && (this.major >= 4)
}
function init_vars()
{
		eltSlideShow = getElt("Slideshow");
		eltAds0 = getElt("AdBanner1");
		eltCaptions = getElt("MainCaptions");
		eltContent = getElt("Content");
		//eltWaitBox = getElt("WaitBox");
		//showContent();
}

function getElt () 
{
	if (is.nav5up)
		{
			var currentLayer = document.getElementById([getElt.arguments[0]]);
			return currentLayer;
		} 
	else if (is.ie4up ) 
		{
			var elt = eval('document.all.' + getElt.arguments[getElt.arguments.length-1]);
			return(elt);
		}
  else if (is.nav4up)
	 {
			//showit(document.layers[0]);
			var currentLayer = document.layers[getElt.arguments[0]];

	    for (var i=1; i<getElt.arguments.length && currentLayer; i++)
				{
					 currentLayer = currentLayer.document.layers[getElt.arguments[i]];
				}
		    return currentLayer;
    }
}

function clearWait() {
	document.all.WaitBox.style.display = 'none';
  document.all.Content.style.visibility = 'visible';
}

function showMe(d) {
	var oLayer = eval('eltAds' + d);
	if (is.nav4up)
		{
		oLayer.visibility = "visible";
		}
	else
		{
		oLayer.style.visibility = "visible";
		}
}

var scURL = new Array;
scURL[0] ='<a href="http://www.christianfreedom.org/">';
scURL[1] ='<a href="http://mycourt.oncourtonline.com/">';
scURL[2] ='<a href="http://www.renewanation.org/">';
scURL[3] ='<a href="https://www.npfunds.com/">';
scURL[4] ='<a href="http://www.mysportsdreams.com/">';


var uURL = new Array;
uURL[0] ='www.christianfreedom.org';
uURL[1] ='<a href="http://mycourt.oncourtonline.com/">';
uURL[2] ='<a href="http://www.renewanation.org/">';
uURL[3] ='<a href="https://www.npfunds.com/">';
uURL[4] ='<a href="http://www.mysportsdreams.com/">';


var imgURLBanner = new Array;
imgURLBanner[0] ='<IMG src="http://www.hspn.net/Images/theShowCase/LindenfogProductions/christianfreedominternational.JPG"  alt="" title="" width="260" height="99" align=left border=0></A><b></b>';
imgURLBanner[1] ='<IMG src="http://www.hspn.net/Images/theShowCase/LindenfogProductions/OnCourtPlayerDevelopment.JPG"  alt="" title="" width="260" height="99" align=left border=0></A><b></b>';
imgURLBanner[2] ='<IMG src="http://www.hspn.net/Images/theShowCase/LindenfogProductions/renewanation.JPG"  alt="" title="" width="260" height="99" align=left border=0></A><b></b>';
imgURLBanner[3] ='<IMG src="http://www.hspn.net/Images/theShowCase/LindenfogProductions/here4youbanner2.JPG"  alt="" title="" width="260" height="99" align=left border=0></A><b></b>';
imgURLBanner[4] ='<IMG src="http://www.hspn.net/Images/theShowCase/LindenfogProductions/MySportsDreamBanner.JPG"  alt="" title="" width="260" height="99" align=left border=0></A><br><b>My Sports Dream</b>';


var imgWebsite = new Array;
imgWebsite[0] ='<IMG src="http://www.hspn.net/Images/theShowCase/LindenfogProductions/christianfreedominternational.JPG"  alt="" title="" width="' + intLeftAlley + '" height="' + imgHeight + '" align=top border=0></A><b></b>';
imgWebsite[1] ='<IMG src="http://www.hspn.net/Images/theShowCase/LindenfogProductions/OnCourtPlayerDevelopment.JPG"  alt="" title="" width="' + intLeftAlley + '" height="' + imgHeight + '" align=top border=0></A><b></b>';
imgWebsite[2] ='<IMG src="http://www.hspn.net/Images/theShowCase/LindenfogProductions/renewanation.JPG"  alt="" title="" width="' + intLeftAlley + '" height="' + imgHeight + '" align=top border=0></A><b></b>';
imgWebsite[3] ='<IMG src="http://www.hspn.net/Images/theShowCase/LindenfogProductions/here4you.JPG"  alt="" title="" width="' + intLeftAlley + '" height="' + imgHeight + '" align=top border=0></A><b></b>';
imgWebsite[4] ='<IMG src="http://www.hspn.net/Images/theShowCase/LindenfogProductions/MySportsDream.JPG"  alt="" title="" alt="" title="" width="' + intLeftAlley + '" height="' + imgHeight + '" align="top" hspace="2"></A><b></b>';

var adsF = new Array;
adsF[0] = scURL[0] + imgURLBanner[0];  
adsF[1] = scURL[1] + imgURLBanner[1];  
adsF[2] = scURL[2] + imgURLBanner[2];  
adsF[3] = scURL[3] + imgURLBanner[3];  
adsF[4] = scURL[4] + imgURLBanner[4];  

var aContent1 = new Array;
aContent1[0] = '<b>Jim Jacobson, President and Founder of Christian Freedom International, has assisted the persecuted church in many restricted countries around the world. He has faced personal danger to deliver Bibles to underground churches in China, care packs to families in the brickyards of Pakistan, and medical aid to refugees in the war zones of Burma. </b>';
aContent1[1] = '<b>On Court Player Development ® is realigning basketball to restore the original intention of sports participation - character building and life lessons, and the fundamentals of the game to players, coaches and basketball communities across the country. </b> ';
aContent1[2] = '<b>Our Mission - <FONT size=3><STRONG>Is to secure a bright future for America and the world by instilling a Christian worldview in the hearts and minds of the children of America and the world. This will be accomplished by offering a high quality, tuition free, Christian education to every child whose parents choose this alternative to secular, naturalistic education ';
aContent1[3] = '<b>Here-4-You Consulting & Grant Writing provides grant writing and funding development to Christian Ministries and Churches around the world. We can work with all types of non-profit organizations, but feel a particular calling and have a unique expertise in serving the Christian Community.</b>';
aContent1[4] = '<b>Welcome to My Sports Dreams, the leader in helping America\'s college and high school teams each raise thousands of dollars quickly, easily and without selling products. If you are tired of tiny profits or even losses from your fundraising efforts, you\'ve come to the right place.<BR></b>';


var aContent2 = new Array;
aContent2[0] = 'Remembering the Persecuted<br />';
aContent2[1] = 'Virtual Trainer<br />';
aContent2[2] = 'Renew a Nation<br />';
aContent2[3] = 'Here-4-You Grant Related Services<br />';
aContent2[4] = 'Raise Thousands for Your Team<br />';

var aContent3 = new Array;
aContent3[0] = ' The work of Christian Freedom International centers around the words of Hebrews 13:3: "Remember those in prison as if you were their fellow prisoners, and those who are mistreated as if you yourselves were suffering."';
aContent3[1] = ' Success on the court means getting an edge over your opponent. Whether you\'re crafting the perfect stroke, handling the ball without flaw or playing championship defense, our complete basketball platform has what you need to win. ';
aContent3[2] = ' A Christian worldview is a comprehensive understanding<BR>of the world that is formed by the authority of the <BR>Bible and the person of Jesus Christ';
aContent3[3] = ' Here-4-You Consulting staffs a team of specialists in researching funding sources and writing grant proposals to help secure funds for your organization. Here-4-You Consulting has clients all over the world and has remained faithful and diligent in serving Christian organizations.';
aContent3[4] = ' Among our 14,000 clients are countless college teams that have won national, regional and conference championships, ranked high school squads and elite travel teams. That\'s why many coaches refer to us as "The Choice of Champions".';

var aImgContent = new Array;
aImgContent[0] = '<img src="http://www.hspn.net/images/theshowcase/lindenfogproductions/christianfreedominternationalnepal.jpg" width="' + intWideCell + '">';
aImgContent[1] = '<img src="http://www.hspn.net/images/theshowcase/lindenfogproductions/OnCourtPlayerDevelopment1.JPG" width="' + intWideCell + '">' ;
aImgContent[2] = '<img src="http://www.hspn.net/images/theshowcase/lindenfogproductions/RenewaNationBoys.jpg" width="' + intWideCell + '">';
aImgContent[3] = '<img src="http://www.hspn.net/images/theshowcase/lindenfogproductions/Here4YouNewsletter.jpg" width="' + intWideCell + '">';
aImgContent[4] = '<img src="http://www.hspn.net/images/theshowcase/lindenfogproductions/mysportsdreamHowItWorks.jpg" width=300">';

var aContentLast = new Array;
aContentLast[0] = '<p>KATHMANDU, NEPAL (Christian Freedom International) -- Life in the brickyards often seems hopeless for those caught in its miserable trap—long days, grueling work, and minimal pay that doesn\’t afford even the most basic of life\’s necessities.</p>'+
				'<p>Young children work alongside their parents, struggling for years to repay family debts through the exhausting chore of making bricks. In the brickyards of Nepal, there is no access to education, medical care, or even enough food or decent housing for these suffering families.</p>'+
				'<p>But the approaching rainy season will force most laborers to temporarily leave the brickyards and relocate to nearby riverside or slum areas.</p>';
aContentLast[1] = '<p>My name is Neal Ring.  I am the new Men\'s Basketball Coach at Maranatha Baptist Bible College.  I also represent On Court Player Development®.  We have a player development program that has standardized curriculum, coaching certification, officials certification, and parent education.  Our curriculum has three forms:  clinic(one day), camp(four days), and  league (10-week).  All of our training is web based and delivered by our Virtual Trainer.  The Virtual Trainer has hundreds of skills and drills in video form that can be downloaded to an ipod or phone. Players and coaches can get a new workout each day complete with download ready video.</p>'+
				'<p>Our program is based on the study of how European players have experienced success against the best athletes in the world.  They have made a science out of footwork with an emphasis on efficiency and economy of motion.  Respected names in the game including Kevin Cantwell (former NCAA Division 1 Coach at Georgia Tech), Teresa Edwards (four time Olympic Gold Medalist, and Women\'s Basketball Legend), and Mark Price (NBA All-Star and current Atlanta Hawks Shooting Coach) and many others have joined together to make a positive impact on the game. </p>'+
				'<p></p>';
aContentLast[2] = '<p>50 million children a day (K-12) are being indoctrinated in government schools that teach that God does not exist or at best that He is irrelevant to life. We currently have between 6-8 million children (K-12) in Christian schools or home schooling in America. This means that nearly 90% of the children in America are being trained to think from the perspective of a godless worldview. Is it any wonder that America finds herself in such a desperate moral condition? </p>';
aContentLast[3] = '<p>We choose to focus the majority of our efforts towards working with Christian organizations. Our mission is to help these organizations develop in strength, efficiency, longevity, and <EM>“<SPAN>to equip the saints for the work of ministry, for building up the body of Christ</SPAN>” (KJV Ephesians 4:12)</EM>. We firmly believe that our abilities are God given and that we have a responsibility to use these gifts to glorify God and help build His Kingdom. </p>';
aContentLast[4] = '<p> If you are reading this, chances are you are a coach, athletic administrator or captain of your team. That means you are a busy, driven and high achieving person. So, we\'re not going to waste your team with fancy pictures, tons of graphics or nonsense about how exciting fundraising is. We\'re going to give it to you straight.</p>'+
	'<p> The truth is that fundraising is no one\'s idea of fun, BUT for many college and high school teams around the country, it\'s almost a means of survival. The old fundraising methods - selling food or magazines, working concessions, running a car wash - generate a couple of dollars but they can\'t begin to make an impact on a team budget that is thousands of dollars short of real needs.</p>'+
	'<p> We launched My Sports Dreams in 2004 after ten years in the travel baseball business. It was obvious to us back then that fundraising was changing. What was once thought of as a way to generate a little bit of extra money for shirts or a short trip was quickly turning into a vital element in a team\'s regular season operating budget. The economic downturn of the last few years has just made the problem worse.</p>';

var aSlideShow = new Array;

 for (var i=0; i < maxMainSlideshowImageNum+1; i++)
	{
		aSlideShow[i] = '<p>' + scURL[i] + imgWebsite[i] + '</p>'+
									   '<p>'+aContent1[i]+' Visit their web-site at ' + scURL[i] + uURL[i]+ '</a></p>'+
										 '<table width="' + intLeftAlley + '" border=0 ID="Table6">'+
											'<tr>'+
												'<td valign=top width="' + intNarrowCell + '" cellpadding=0 cellspacing=0> <font face=Bookman Old Style,Arial size=4>'+aContent2[i]+'<p>'+
													'<font face="Garamond" size="3">'+
													aContent3[i]+
													'</font>'+
													'<p>' +
													'	<font face="Garamond" size="2">'+
													'	</font>'+
													'</p>'+
													'<p>'+
													'</p>'+
												'</td>'+
												'<td valign=top width="' + intWideCell + '" rowspan=2>'+
													'<font face=Bookman Old Style,Arial size=1><p>'+aImgContent[i] + '</p>'+
												'</td>'+
											'</tr>'+
												'<td valign=top width="' + intNarrowCell + '">'+
													'<font face=Bookman Old Style,Arial size=4>'+
													'<p>&nbsp;</p>'+
												'</td>'+
											'</tr>'+
										'</table>'+
										'<table width="' + intLeftAlley + '" border=0 cellpadding=0 cellspacing=0 ID="Table7">'+
											'<tr>'+
												'<td valign=top>' + aContentLast[i] +
												'</td>'+
											'</tr>'+
										'</table>'+
									'</DIV>';
		}


//JavaScript Banner Ad Rotator version 2.1 - last modified 16 November 2000
//Obtained from http://www.brettb.com/js_banner_ad_rotator.asp
//Email comments or suggestions using the form at http://www.brettb.com/Contact.asp
//If you want a version of this script that will open links in a new browser window
//then please visit http://www.winnershtriangle.com/w/Products.JavaScriptBannerAdRotator.asp

function InitializeSlideshow(selImg) 
{
	//alert('entering....');
	//Determine the browser name and version
	//The script will only work on Netscape 3+ and Internet Explorer 4+

	var BrowserType = navigator.appName;	
	var BrowserVersion = parseInt(navigator.appVersion);

	if (BrowserType == "Netscape" && (BrowserVersion >= 3)) 
		{
			IsValidBrowser = true;
			//alert(IsValidBrowser);
		}

	if (BrowserType == "Microsoft Internet Explorer" && (BrowserVersion >= 4)) 
		{
			IsValidBrowser = true;
			//alert(IsValidBrowser);
		}
	if (IsValidBrowser) 
		{
			//iNum = parseInt(iNum);
			userImageSelected = selImg;
			if (userImageSelected >= 0)
				{
					//alert('image number');
					//alert(ig);
					//alert(maxMainSlideshowImageNum);
					//alert(startMainSlideshowImageNum);
					//alert(refreshMainSlideShowImage);
					//alert(ig);
					document.TimerObject = setTimeout("ChangeImageN('',maxMainSlideshowImageNum,startMainSlideshowImageNum, refreshMainSlideShowImage, userImageSelected)", 0);
					//document.TimerObject = setTimeout("ChangeImageN('',maxMainSlideshowImageNum,startMainSlideshowImageNum, refreshMainSlideShowImage,1)", 0);
					document.TimerObject = setTimeout("ChangeImageaN('',maxAds, startAd, userImageSelected)", 0);
				}
			else
				{
					//alert('no image number');
					//alert(iNum);
					document.TimerObject = setTimeout("ChangeImage('',maxMainSlideshowImageNum,startMainSlideshowImageNum, refreshMainSlideShowImage)", 0);
					//document.TimerObject = setTimeout("ChangeImageN('',maxMainSlideshowImageNum,startMainSlideshowImageNum, refreshMainSlideShowImage,1)", 0);
					//document.TimerObject = setTimeout("ChangeImagea('',maxAds, startAd)", 0);
				}
		}
}

function ChangeImage(preF, maxImageNum, startImageNum, refresh)
{
	//setMainSlideshow();
	
	if (IsValidBrowser)
		{
			// ----------- call to change slide show image ----
			//alert(MainSlideshowImageNum+','+ctrlMainLooping+','+imageWithinSlideShowPanelCounter+','+selectedCaptionNum);
			showFlash(MainSlideshowImageNum , selectedCaptionNum, refreshMainSlideShowImage, lastuserImageSelected);
			lastuserImageSelected = MainSlideshowImageNum;

			selectedCaptionNum++;
			MainSlideshowImageNum++;			
			 if (MainSlideshowImageNum > maxMainSlideshowImageNum)	
				{
					MainSlideshowImageNum = 0;
					selectedCaptionNum = 0;
				}
			//if (adToggle > 0)
			//	{
				document.TimerObject = setTimeout("ChangeImagea('',maxAds, startAd)", 0);
			//	adToggle = 0;
			//	}
			//else
			//	{
		//		adToggle = 1;
		//		}
			document.TimerObject = setTimeout("ChangeImage('', maxMainSlideshowImageNum, startMainSlideshowImageNum)", DisplayInterval);
		}
}

function ChangeImageN(preF, maxImageNum, startImageNum, refresh, igN)
{
	//setMainSlideshow();
	//alert('here initially');
	if (IsValidBrowser)
		{
			// ----------- call to change slide show image ----
			//alert(MainSlideshowImageNum+','+ctrlMainLooping+','+imageWithinSlideShowPanelCounter+','+selectedCaptionNum);
			//iNum = parseInt(iNum);
			//alert(iNum);
			MainSlideshowImageNum = igN;
			showFlash(MainSlideshowImageNum , selectedCaptionNum, refreshMainSlideShowImage, lastuserImageSelected);
			lastuserImageSelected = MainSlideshowImageNum;
			//selectedCaptionNum++;
			MainSlideshowImageNum++;			
			if (MainSlideshowImageNum > maxMainSlideshowImageNum)	
				{
					MainSlideshowImageNum = 0;
					selectedCaptionNum = 0;
				}
			//if (adToggle > 0)
			//	{
					document.TimerObject = setTimeout("ChangeImageaN('',maxAds, startAd, MainSlideshowImageNum)", DisplayInterval);
					adToggle = 0;
			//	}
			//else
			//	{
		//		adToggle = 1;
		//		}
			document.TimerObject = setTimeout("ChangeImageN('', maxMainSlideshowImageNum, startMainSlideshowImageNum, true,MainSlideshowImageNum)", DisplayInterval);
		}
	else
		{	
			//alert('bad browser');	
			var BrowserType2 = navigator.appName;	
			var BrowserVersion2 = parseInt(navigator.appVersion);
	
			if (BrowserType2 == "Netscape")
				{
					init_vars();
					InitializeSlideshow(igN); 
				}
				//IsValidBrowser = true;
		}
}

function ChangeImagea(preF, maxI, initIndex) {
		showAda(Adcounter);

		Adcounter = Adcounter + 1;

		if (Adcounter > maxI)
		{
			Adcounter = initIndex;
		}
}

function ChangeImageaN(preF, maxI, initIndex,adImageNum) {

		Adcounter = adImageNum;

		showAda(Adcounter);
		Adcounter = Adcounter + 1;
	
		if (Adcounter > maxI)
		{
			Adcounter = initIndex;
		}
}
function showAda(d)
{
oLayer = eval('eltAds0');
if (IsValidBrowser)
{
		oLayer.innerHTML = adsF[d];
		oLayer.style.visibility = "visible";
}
}

function showFlash(d,o,refresh,l)
{

	//alert(d +','+o+','+refresh);
	document.getElementById("MainCaptions").style.visibility="hidden";
	document.getElementById("MainCaptions").style.backgroundColor="transparent";
	document.getElementById("MainCaptions").style.left="5px";
	document.getElementById("MainCaptions").style.top="485px";
	document.getElementById("MainCaptions").style.width="280px";
	document.getElementById("MainCaptions").style.position="absolute";

	//document.getElementById("Slideshow").style.visibility="hidden";
	//document.getElementById("Slideshow").style.backgroundColor="transparent";
	//document.getElementById("Slideshow").style.left="15px";
	//document.getElementById("Slideshow").style.top= "285px";
	//document.getElementById("Slideshow").style.width="280px";
	//document.getElementById("Slideshow").style.position="absolute";

	document.getElementById("Slideshow").style.visibility="hidden";
	document.getElementById("Slideshow").style.backgroundColor="transparent";
	document.getElementById("Slideshow").style.left="235px";
	document.getElementById("Slideshow").style.top= "162px";
	document.getElementById("Slideshow").style.width="780px";
	document.getElementById("Slideshow").style.position="absolute";

	oSlideShow = eval('eltSlideShow');
	oCaptions = eval('eltCaptions');

	if (blnInitialShowcase)
		{
			l = lastuserImageSelected;

		  var olastShowcaseEntry = document.getElementById("showcase"+l);
		 // var olastShowcaseEntry = document.getElementById("Showcase2");
	    var lastInner = olastShowcaseEntry.innerHTML;
		     //alert(olastShowcaseEntry.innerHTML);
			var lastshowcaseText = lastInner;
			blnInitialShowcase = false;
		}
	else
		{

			var olastShowcaseEntry = document.getElementById("showcase"+l);
			var lastInner = olastShowcaseEntry.innerHTML;
						//alert(olastShowcaseEntry.innerHTML);
			var lastshowcaseText = lastInner.substring(4);
		}	

	var oShowcaseEntry = document.getElementById("showcase"+d);
  var showcaseText = oShowcaseEntry.innerHTML;
  showcaseText = '<b>&dagger;'+showcaseText + '</b>';
	
	if (IsValidBrowser)
	{
		//setMainSlideshow();
		//oCaptions.style.visibility = "visible";
		//oCaptions.innerHTML = '<p>Photo<br><br>is<br><br>Loading.....</p>';

		if (refresh)
		{
			//oSlideShow.innerHTML = '<p>Photo<br><br>is<br><br>Loading.....</p>';
			oSlideShow.style.visibility = "visible";
			oSlideShow.innerHTML = aSlideShow[d];
			oSlideShow.style.visibility = "visible";
			olastShowcaseEntry.innerHTML = lastshowcaseText;
			oShowcaseEntry.innerHTML = showcaseText;

		}
		//oCaptions.style.visibility = "visible";
		//oCaptions.innerHTML = aCaptions[o];
    //document.getElementById("MainCaptions").style.visibility="visible";
	}
}


function setMainSlideshow() {
 if (MainSlideshowImageNum = maxMainSlideshowImageNum)	
	{
		MainSlideshowImageNum = 0;
		selectedCaptionNum = 0;
	}
}
function setSlideShowDefaults(val)
{
	ctrlMainLooping = val;
	ctrlMainPanelLooping =0;
	offsetMainSlideShow = 0;
	imageWithinSlideShowPanelCounter =0;
	MainSlideshowImageNum = 40+(6*(val-1));
	startMainSlideshowImageNum = MainSlideshowImageNum;
	selectedCaptionNum = 6*(val-1);
	refreshMainSlideShowImage = true;

}

