descr=new Array
w=new Array
h=new Array
ratio=new Array
urls=new Array
var wmax
var hmax
var items
var showbg
var buttonbgcolor
var buttontextcolor
var descriptionbgcolor
var textcolor

//changes area

items=11		//number of items (image, url and description pairs)
tablewidth=325	//width of slide show area
tabheight=325	//height of slide show area        

buttonbgcolor=""		//background color of buttons
buttontextcolor=""      	//text color for buttons
descriptionbgcolor=""   	//background color of description area
textcolor="#666666"             //text color of description area
showbg=""               	//background picture for images and buttons area

//leave blank text color to get black text
//leave blank background color to get transparent background
//leave blank showbg to get descriptionbgcolor for background
//experiment, but make sure you don't delete quotation marks!

img=new Array
for(i=1;i<=items;i++)img[i]=new Image()

//web address for images used in show
//add or delete here rows to match the number of images;
//make sure you update the number in the square brackets:
//the next row should be img[6].src="images/next_image.jpg"
img[1].src="img19.jpg"
img[2].src="img23.jpg"
img[3].src="img24.jpg"
img[4].src="1img13.jpg"
img[5].src="1img11.jpg"
img[6].src="1img03.jpg"
img[7].src="img08.jpg"
img[8].src="img06.jpg"
img[9].src="img09.jpg"
img[10].src="1img02.jpg"
img[11].src="img05.jpg"

//image sizes, make sure you enter correct values
//add or delete here rows to match the number of images;
//make sure you update the number in the square brackets:
w[1]=500
h[1]=337
w[2]=500
h[2]=337
w[3]=500
h[3]=337
w[4]=500
h[4]=337
w[5]=500
h[5]=337
w[6]=500
h[6]=337
w[7]=500
h[7]=337
w[8]=500
h[8]=337
w[9]=330
h[9]=486
w[10]=500
h[10]=337
w[11]=500
h[11]=337

//description for each images
//add or delete here rows to match the number of images;
//make sure you update the number in the square brackets:
descr[1]="Click on Photo to Enlarge"
descr[2]="Click on Photo to Enlarge"
descr[3]="Click on Photo to Enlarge"
descr[4]="Click on Photo to Enlarge"
descr[5]="Click on Photo to Enlarge"
descr[6]="Click on Photo to Enlarge"
descr[7]="Click on Photo to Enlarge"
descr[8]="Click on Photo to Enlarge"
descr[9]="Click on Photo to Enlarge"
descr[10]="Click on Photo to Enlarge"
descr[11]="Click on Photo to Enlarge"


//link urls for each image
//add or delete here rows to match the number of images;
//make sure you update the number in the square brackets:
urls[1]="http://www.srcc.biz/photo1.html"
urls[2]="http://www.srcc.biz/photo2.html"
urls[3]="http://www.srcc.biz/photo3.html"
urls[4]="http://www.srcc.biz/photo4.html"
urls[5]="http://www.srcc.biz/photo5.html"
urls[6]="http://www.srcc.biz/photo6.html"
urls[7]="http://www.srcc.biz/photo7.html"
urls[8]="http://www.srcc.biz/photo8.html"
urls[9]="http://www.srcc.biz/photo9.html"
urls[10]="http://www.srcc.biz/photo10.html"
urls[11]="http://www.srcc.biz/photo11.html"

//end of changes area

for(i=1;i<=items;i++)descr[i]='<font color="' + textcolor + '">' + descr[i] + '</font>'


for(i=1;i<=items;i++)ratio[i]=h[i]/w[i]
maxs()

if(wmax>tablewidth)
{
for(i=1;i<=items;i++)
	{
		if(w[i]>tablewidth)
			{
			 w[i]=tablewidth
			 h[i]=w[i]*ratio[i]
			}
	}
maxs()
}

if(hmax>tabheight)
{
for(i=1;i<=items;i++)
	{
		if(h[i]>tabheight)
		{
		 h[i]=tabheight 
		 w[i]=h[i]/ratio[i]
		}
	}
}
maxs()


function maxs()
{
hmax=h[1]
for(j=1;j<=items;j++)
{
if(h[j]>hmax)hmax=h[j]
}
wmax=h[1]
for(j=1;j<=items;j++)
{
if(w[j]>wmax)wmax=w[j]
}
}

layerLeft = new Array
layerTop = new Array

position_layers()

function position_layers()
{
for(i=1;i<=items;i++)
{
layerLeft[i] = Math.floor((wmax-w[i])/2);
layerTop[i] = Math.floor((hmax-h[i])/2);
}
}

document.write('<STYLE TYPE="text/css">')
document.write('# container {position: relative; z-index: 1; top:0px; left:0px}')
document.write('.buttons { background: ' + buttonbgcolor + '; color: ' + buttontextcolor + '; font-weight: bold; }')
if(document.layers)document.write('# description {position: absolute; z-index: 3; top:0px; left:0px;}')

document.write('#con {position: relative; z-index: 1; top:0px; left:0px}')
for(i=1;i<=items;i++)
{
document.write('#pic'+ i + '{position: absolute; z-index: 1; top:' + layerTop[i] + 'px; left:' + layerLeft[i] + 'px; visibility:hidden}');
}
document.write('</style>')


navtest="KO"
j=0
if (document.layers)
{
navtest="OK"
layerRef="document.layers"
styleDef=""
}

if(document.all)
{
navtest="OK"
layerRef="document.all"
styleDef=".style"
}

function start()
{
eval(layerRef + '["con"].' + layerRef + '["pic1"]' + styleDef + '.visibility="visible"')
displayText(1)
currentcommand="stop"
j=1
document.playercomm.stop.disabled=true
document.playercomm.faster.disabled=true
document.playercomm.slower.disabled=true
}
var rotation
var rotspeed
rotspeed=3000

function rotate()
{
for(i=1;i<=items;i++)
{
eval(layerRef + '["con"].' + layerRef + '["pic' + i + '"]' + styleDef + '.visibility="hidden"')
}
j++
if(j==0)j=items
if(j>items)j=1
eval(layerRef + '["con"].' + layerRef + '["pic' + j + '"]' + styleDef + '.visibility="visible"')
displayText(j)
rotation = setTimeout("rotate()",rotspeed)
}

function displayText(opt){
text='<center><b>'+descr[opt]+'</b></center>'

if(document.layers){
document.layers["container"].document.layers["description"].document.write(text)
document.layers["container"].document.layers["description"].document.close();
}

if(document.all)
{
document.all["description"].innerHTML=text;
}
}

currentcommand="play"
function player(command)
{
if(currentcommand=="play")
{
if(command=="stop")
	{ 
	clearTimeout(rotation)
	currentcommand="stop"
	document.playercomm.stop.disabled=true
	document.playercomm.play.disabled=false
	document.playercomm.faster.disabled=true
	document.playercomm.slower.disabled=true
	document.playercomm.previous.disabled=false
	document.playercomm.next.disabled=false
}
}

if(currentcommand=="stop")
{
if(command=="play")
	{ 
	rotate()
	currentcommand="play"
	document.playercomm.play.disabled=true
	document.playercomm.stop.disabled=false
	document.playercomm.faster.disabled=false
	document.playercomm.slower.disabled=false
	document.playercomm.previous.disabled=true
	document.playercomm.next.disabled=true
}
}

if(command=="next")
	{ 
	clearTimeout(rotation)
	rotate()
	if(currentcommand=="stop")clearTimeout(rotation)
}

if(command=="previous")
	{ 
	clearTimeout(rotation)
	j=j-2
	rotate()
	if(currentcommand=="stop")clearTimeout(rotation)
}
}

function fasterslower(action)
	{
	if(currentcommand=="play")
		{
		if(action=="faster")
			{
			rotspeed=rotspeed-500
			if (rotspeed<0)rotspeed=0
			}
		if(action=="slower")rotspeed=rotspeed+500
		}
	}
