var t;
var slideShowSpeed = 6000;
//var crossFadeDuration = 3;
var crossFadeDuration = 500;

	if (navigator.appName == 'Netscape') {
        crossFadeDuration = 2500;
	}


var myphotos=new Array();
var mythumbs=new Array();
//var mycaptions=new Array();
var c=1;
var SelectedPhoto=1;
var LastC=1;
var LastNav="";
var OrigNav="";
var LastPhoto=1;

var ImageCount = 0;

function ChangePhoto(x)
{    c=x;
	//if (navigator.appName == 'Netscape') {
        blendimage('blenddiv','blendimage', myphotos[x],crossFadeDuration);
    //}
	//else {
	//	document.images.SnapPhoto.style.filter="blendTrans(duration=2)";
	//	document.images.SnapPhoto.style.filter="blendTrans(duration=" + crossFadeDuration + ")"
	//	document.images.SnapPhoto.filters.blendTrans.Apply()  ;    
		///document.SnapPhoto.src = myphotos[x];
	//	document.images.SnapPhoto.filters.blendTrans.Play();
	//}
	
	if (LastC!==SelectedPhoto)
		{document.getElementById('Nav' + LastC).innerHTML=LastNav;}
	else
		{document.getElementById('Nav' + LastC).innerHTML=OrigNav;}	
	LastNav = document.getElementById('Nav' + x).innerHTML;
	//document.getElementById('Nav' + x).innerHTML = '<SPAN CLASS=ATallRev>' + LastNav + '</SPAN>';
	
	//document.getElementById('Nav' + x).innerHTML = "<img style='border-color: #C8D4E3; ' src='" + mythumbs[x] + "'  border=4   width=52 height=52 />";
	
	document.getElementById('Nav' + x).innerHTML = "";
	//alert(document.getElementById('Nav' + x).innerHTML); //
	LastC = x;
	//document.SnapPhoto.title = mycaptions[x];

}

function GotoNextPhoto()
{
	document.getElementById('NavNext').src='images/buttons/B_Next_Pressed.gif'
	if (c<LastPhoto)
		{c=c+1;}
	else
		{c=1;}
	ChangePhoto(c);
	document.getElementById('NavNext').src='images/buttons/B_Next.gif'
}

function PrevDown()
{
	document.getElementById('NavPrev').src='images/buttons/B_Prev_Pressed.gif';
}
function PrevUp()
{
	document.getElementById('NavPrev').src='images/buttons/B_Prev.gif';
}
function NextDown()
{
	document.getElementById('NavNext').src='images/buttons/B_Next_Pressed.gif';
}
function NextUp()
{
	document.getElementById('NavNext').src='images/buttons/B_Next.gif';
}
function GotoPrevPhoto()
{
	if (c>1)
		{c=c-1;}
	else
		{c=LastPhoto;}
	ChangePhoto(c);
}
function timedCount()
{
    ImageCount ++ ;
	clearTimeout(t);
	document.getElementById('StartTimer').src='images/buttons/B_Play_Pressed.gif';
	document.getElementById('StopTimer').src='images/buttons/B_Stop.gif';
	t=setTimeout("timedCount()",slideShowSpeed);
	GotoNextPhoto();
	//alert("mem=" + member_id) ;
	if (ImageCount == 2 && member_id == "") {
	   // window.location = loginsignupUrl ;
	}
}

function stopCount()
{
	clearTimeout(t);
	document.getElementById('StartTimer').src='images/buttons/B_Play.gif';
	document.getElementById('StopTimer').src='images/buttons/B_Stop_Pressed.gif';
}
function StopChangePhoto(x)
{
	clearTimeout(t);
	document.getElementById('StartTimer').src='images/buttons/B_Play.gif';
	document.getElementById('StopTimer').src='images/buttons/B_Stop_Pressed.gif';
	ChangePhoto(x);
}


