
/***********************************************
* Carousel Slideshow script- © Ger Versluis 2003
* Permission granted to DynamicDrive.com to feature script
* This notice must stay intact for legal use
* Visit http://www.dynamicdrive.com/ for full source code
***********************************************/


// 7 variables to control behavior
	var Car_Image_Width=110;
	var Car_Image_Height=130;
	var Car_Border=true;		// true or false
	var Car_Border_Color="transparent";
	var Car_Speed=1;
	var Car_Direction=true;		// true or false
	var Car_NoOfSides=8;		// must be 4, 6, 8 or 12

/* array to specify images and optional links. 
	For 4 sided carousel specify at least 2 images
	For 6 sided carousel specify at least 3
	For 8 sided carousel specify at least 4
	For 12 sided carousel specify at least 6
 If Link is not needed keep it ""
*/
	Car_Image_Sources=new Array(
		"images/albums/chosenrotator.png",'<h3><strong>Bishop Kenneth Robinson and Chosen</strong></h3><h4><ul><li><div class="product-title">Turnaround</div></li></ul></h4><ol class="tracks"><li>Gospel Medley</li><li>Its Going To Be Alright</li><li>What A Mighty God</li><li>Stranger</li><li>Just A Talk</li><li>So Many Tears</li><li>Turn Around</li><li>The Journey</li><li>Grace And Mercy</li><li>Great Day</li><li>More Of Thee</li><li>Search Me Lord</li></ol><img src="images/close.jpg" id="close" onclick="hidecursor2();C_Rstrt()" /><object type="application/x-shockwave-flash" data="player.swf" id="audioplayer1" height="20" width=150"><param name="movie" value="player.swf"><param name="FlashVars" value="playerID=1&amp;bg=0xBA912E&amp;leftbg=0x000000&amp;lefticon=0xBA912E&amp;rightbg=0xBAAB88&amp;rightbghover=0xBA9A4B&amp;righticon=0x600202&amp;righticonhover=0xBAAB88&amp;text=0xBA912E&amp;slider=0x666666&amp;track=0xFFFFFF&amp;border=0x666666&amp;loader=0x58524B&amp;loop=no&amp;autostart=true&amp;soundFile=gospelmedley.mp3"><param name="quality" value="high"><param name="menu" value="false"><param name="wmode" value="transparent"></object><table><tr class="product"><td><img class="product-image" src="images/albums/chosen.jpg"/></td><td class="data-cell"><div class="product-title">Turnaround</div><div class="product-price">Price: $11.99</div><div class="product-shipping">Shipping: $0.00</div><br/><div class="googlecart-add-button"></div></td></tr></table>',
		"images/albums/walterrotator.png",'<img src="images/close.jpg" id="close" onclick="hidecursor2();C_Rstrt()" /><object type="application/x-shockwave-flash" data="player.swf" id="audioplayer1" height="20" width=150"><param name="movie" value="player.swf"><param name="FlashVars" value="playerID=1&amp;bg=0xBA912E&amp;leftbg=0x000000&amp;lefticon=0xBA912E&amp;rightbg=0xBAAB88&amp;rightbghover=0xBA9A4B&amp;righticon=0x600202&amp;righticonhover=0xBAAB88&amp;text=0xBA912E&amp;slider=0x666666&amp;track=0xFFFFFF&amp;border=0x666666&amp;loader=0x58524B&amp;loop=no&amp;autostart=true&amp;soundFile=youdiditagain.mp3"><param name="quality" value="high"><param name="menu" value="false"><param name="wmode" value="transparent"></object><table><tr class="product"><td><img class="product-image" src="images/albums/walter.jpg"/></td><td class="data-cell"><div class="product-title">Coming Soon</div><div class="product-price">Price: $11.99</div><div class="product-shipping">Shipping: $0.00</div><br/><div class="googlecart-add-button"></div></td></tr></table>',
		"images/albums/antiochrotator.png",'<h3><strong>Antioch</strong></h3><h4><ul><li><div class="product-title">The Antioch Experience</div></li></ul></h4><ol class="tracks"><li>Great Things</li><li>Come On In The Room</li><li>I Know Who Jesus Is</li><li>Magnify Him</li><li>Be Careful</li><li>Old Time Church Medley</li><li>Higher Place Of Praise</li><li>Receiving Our Offering</li><li>Blessed</li><li>Send It On Down</li><li>They That Wait</li><li>Nobody But Jesus</li></ol><img src="images/close.jpg" id="close" onclick="hidecursor2();C_Rstrt()" /><object type="application/x-shockwave-flash" data="player.swf" id="audioplayer1" height="20" width=150"><param name="movie" value="player.swf"><param name="FlashVars" value="playerID=1&amp;bg=0xBA912E&amp;leftbg=0x000000&amp;lefticon=0xBA912E&amp;rightbg=0xBAAB88&amp;rightbghover=0xBA9A4B&amp;righticon=0x600202&amp;righticonhover=0xBAAB88&amp;text=0xBA912E&amp;slider=0x666666&amp;track=0xFFFFFF&amp;border=0x666666&amp;loader=0x58524B&amp;loop=no&amp;autostart=false&amp;soundFile=theythatwait.mp3"><param name="quality" value="high"><param name="menu" value="false"><param name="wmode" value="transparent"></object><table><tr class="product"><td><img class="product-image" src="images/albums/antioch.jpg"/></td><td class="data-cell"><div class="product-title">The Antioch Experience</div><div class="product-price">Price: $11.99</div><div class="product-shipping">Shipping: $0.00</div><br/><div class="googlecart-add-button"></div></td></tr></table>',
		"images/albums/maryrotator.png",'<h3><strong>Mary Witherspoon</strong></h3><h4><ul><li><div class="product-title">I Need You Jesus</div></li></ul></h4><ol class="tracks"><li>God Will Make It Alright</li><li>Too Close</li><li>Got No Time</li><li>I Need You Jesus</li><li>He Is Working It Out</li><li>Keep On Fighting</li><li>Grandmas Song</li><li>Determined</li><li>May The Work Ive Done</li></ol><img src="images/close.jpg" id="close" onclick="hidecursor2();C_Rstrt()" /><object type="application/x-shockwave-flash" data="player.swf" id="audioplayer1" height="20" width=150"><param name="movie" value="player.swf"><param name="FlashVars" value="playerID=1&amp;bg=0xBA912E&amp;leftbg=0x000000&amp;lefticon=0xBA912E&amp;rightbg=0xBAAB88&amp;rightbghover=0xBA9A4B&amp;righticon=0x600202&amp;righticonhover=0xBAAB88&amp;text=0xBA912E&amp;slider=0x666666&amp;track=0xFFFFFF&amp;border=0x666666&amp;loader=0x58524B&amp;loop=no&amp;autostart=false&amp;soundFile=Godwillmakeitalright.mp3"><param name="quality" value="high"><param name="menu" value="false"><param name="wmode" value="transparent"></object><table><tr class="product"><td><img class="product-image" src="images/albums/mary.jpg"/></td><td class="data-cell"><div class="product-title">I Need You Jesus</div><div class="product-price">Price: $11.99</div><div class="product-shipping">Shipping: $0.00</div><br/><div class="googlecart-add-button"></div></td></tr></table>',
		"images/albums/barnesrotator.png",'<h3><strong>Barnes Brothers</strong></h3><h4><ul><li><div class="product-title">Not Afraid</div></li></ul></h4><ol class="tracks"><li>Trust Jesus</li><li>I Will Make It Home Part 1</li><li>I Will Make It Home Part 2</li><li>God Somewhere</li><li>Holy Ghost</li><li>Just Like The Bible Says</li><li>A Little Love</li><li>Do Right</li><li>Bless Me Jesus</li><li>Everybody Worship Part 1</li><li>Everybody Worship Part 2</li><li>Great Day</li></ol><img src="images/close.jpg" id="close" onclick="hidecursor2();C_Rstrt()" /><object type="application/x-shockwave-flash" data="player.swf" id="audioplayer1" height="20" width=150"><param name="movie" value="player.swf"><param name="FlashVars" value="playerID=1&amp;bg=0xBA912E&amp;leftbg=0x000000&amp;lefticon=0xBA912E&amp;rightbg=0xBAAB88&amp;rightbghover=0xBA9A4B&amp;righticon=0x600202&amp;righticonhover=0xBAAB88&amp;text=0xBA912E&amp;slider=0x666666&amp;track=0xFFFFFF&amp;border=0x666666&amp;loader=0x58524B&amp;loop=no&amp;autostart=false&amp;soundFile=barnesbros.mp3"><param name="quality" value="high"><param name="menu" value="false"><param name="wmode" value="transparent"></object><table><tr class="product"><td><img class="product-image" src="images/albums/barnes.jpg"/></td><td class="data-cell"><div class="product-title">Not Afraid</div><div class="product-price">Price: $11.99</div><div class="product-shipping">Shipping: $0.00</div><br/><div class="googlecart-add-button"></div></td></tr></table>',
		"images/albums/jordanrotator.png",'<h3><strong>Rev. A.J. Jordan</strong></h3><h4><ul><li><div class="product-title">Precious Lord Take My Hand</div></li></ul></h4><ol class="tracks"><li>Come Here</li><li>Weep Not For Me</li><li>Let It Be Real</li><li>One Step At A Time</li><li>Precious Lord</li><li>No More Than You Can Bear</li><li>Someone To Care</li><li>Bye and Bye</li><li>Going Home To Jesus</li><li>Where Shall I Be</li><li>Dont Mind People</li></ol><img src="images/close.jpg" id="close" onclick="hidecursor2();C_Rstrt()" /><object type="application/x-shockwave-flash" data="player.swf" id="audioplayer1" height="20" width=150"><param name="movie" value="player.swf"><param name="FlashVars" value="playerID=1&amp;bg=0xBA912E&amp;leftbg=0x000000&amp;lefticon=0xBA912E&amp;rightbg=0xBAAB88&amp;rightbghover=0xBA9A4B&amp;righticon=0x600202&amp;righticonhover=0xBAAB88&amp;text=0xBA912E&amp;slider=0x666666&amp;track=0xFFFFFF&amp;border=0x666666&amp;loader=0x58524B&amp;loop=no&amp;autostart=false&amp;soundFile=comehere.mp3"><param name="quality" value="high"><param name="menu" value="false"><param name="wmode" value="transparent"></object><table><tr class="product"><td><img class="product-image" src="images/albums/jordan.jpg"/></td><td class="data-cell"><div class="product-title">Precious Lord Take My Hand</div><div class="product-price">Price: $11.99</div><div class="product-shipping">Shipping: $0.00</div><br/><div class="googlecart-add-button"></div></td></tr></table>' // NOTE No comma after last line
		);


	CW_I=new Array(Car_NoOfSides/2+1);C_ClcW=new Array(Car_NoOfSides/2);
	C_Coef=new Array(
		3*Math.PI/2,0,3*Math.PI/2,11*Math.PI/6,Math.PI/6,3*Math.PI/2,7*Math.PI/4,	0,
		Math.PI/4,3*Math.PI/2,5*Math.PI/3,11*Math.PI/6,0,Math.PI/6,Math.PI/3);
	var C_CoefOf=Car_NoOfSides==4?0:Car_NoOfSides==6?2:Car_NoOfSides==8?5:9;
	C_Pre_Img=new Array(Car_Image_Sources.length);
	var C_Angle=Car_Direction?Math.PI/(Car_NoOfSides/2):0,C_CrImg=Car_NoOfSides,C_MaxW,C_TotalW,
	C_Stppd=false,i,C_LeftOffset,C_HalfNo=Car_NoOfSides/2;

	function Carousel(){
		if(document.getElementById){
			for(i=0;i<Car_Image_Sources.length;i+=2){
				C_Pre_Img[i]=new Image();C_Pre_Img[i].src=Car_Image_Sources[i]}
			C_MaxW=Car_Image_Width/Math.sin(Math.PI/Car_NoOfSides)+C_HalfNo+1;
			Car_Div=document.getElementById("Carousel");
			for(i=0;i<C_HalfNo;i++){
				CW_I[i]=document.createElement("img");Car_Div.appendChild(CW_I[i]);	
				CW_I[i].style.position="absolute";
				CW_I[i].style.top=10+"px";
				CW_I[i].style.height=Car_Image_Height+"px";
				if(Car_Border){
					CW_I[i].style.borderStyle="solid";
					CW_I[i].style.borderWidth=1+"px";
					CW_I[i].style.borderColor=Car_Border_Color}
				CW_I[i].src=Car_Image_Sources[2*i];
				CW_I[i].lnk=Car_Image_Sources[2*i+1];
				CW_I[i].onclick=C_Stp;}
			CarImages()}}
			
			
			

	function CarImages(){
		if(!C_Stppd){
			C_TotalW=0;
			for(i=0;i<C_HalfNo;i++){
				C_ClcW[i]=Math.round(Math.cos(Math.abs(C_Coef[C_CoefOf+i]+C_Angle))*Car_Image_Width);
				C_TotalW+=C_ClcW[i]}
			C_LeftOffset=(C_MaxW-C_TotalW)/2;
			for(i=0;i<C_HalfNo;i++){
				CW_I[i].style.left=C_LeftOffset+"px";
				CW_I[i].style.width=C_ClcW[i]+"px";
				C_LeftOffset+=C_ClcW[i]}
			C_Angle+=Car_Speed/720*Math.PI*(Car_Direction?-1:1);
			if((Car_Direction&&C_Angle<=0)||(!Car_Direction&&C_Angle>=Math.PI/C_HalfNo)){
				if(C_CrImg==Car_Image_Sources.length)C_CrImg=0;
				if(Car_Direction){
					CW_I[C_HalfNo]=CW_I[0];
					for(i=0;i<C_HalfNo;i++)CW_I[i]=CW_I[i+1];
					CW_I[C_HalfNo-1].src=Car_Image_Sources[C_CrImg];
					CW_I[C_HalfNo-1].lnk=Car_Image_Sources[C_CrImg+1]}
				else{	for(i=C_HalfNo;i>0;i--)CW_I[i]=CW_I[i-1];
					CW_I[0]=CW_I[C_HalfNo];
					CW_I[0].src=Car_Image_Sources[C_CrImg];
					CW_I[0].lnk=Car_Image_Sources[C_CrImg+1]}
				C_Angle=Car_Direction?Math.PI/C_HalfNo:0;C_CrImg+=2}}
		setTimeout("CarImages()",50)}
		

	function C_LdLnk(){if(this.lnk)window.location.href=this.lnk}
	function C_Stp(){this.style.cursor="pointer";C_Stppd=true;document.getElementById("showproduct").innerHTML=this.lnk;document.getElementById("showproduct").style.visibility="visible";
document.getElementById("trail1").style.visibility="visible";document.getElementById("wrap").style.overflow="hidden";}
	function C_Rstrt(){C_Stppd=false}
var j=0;
var intHide;
var speed=3;
function showmenu()
{
clearInterval(intHide);
intShow=setInterval("show()",10);
}
function hidemenu()
{
clearInterval(intShow);
intHide=setInterval("hide()",10);
}

function cursor(image)
{
document.getElementById("trail").innerHTML=image + '<img src="images/close.jpg" id="close" onclick="hidecursor()" />';
document.getElementById("trail").style.visibility="visible";
}

function hidecursor()
{
document.getElementById("trail").style.visibility="hidden";
} 

function hidecursor2()
{
document.getElementById("trail1").style.visibility="hidden";
document.getElementById("showproduct").style.visibility="hidden";
document.getElementById("wrap").style.overflow="";
} 

function show()
{
if (j<1.0)
	{
	j=j+.05;
	document.getElementById('trail').style.opacity=j;
	}
}
function hide()
{
if (j>0)
	{
	j=j-.08;
	document.getElementById('trail').style.opacity=j;
left.style.zindex="103";
	}
}

	
	
