// Slide Show
// written by T. Majewski
// Copyright CoralRealm.com 1999-2005 All Rights Reserved
// last modified 02/22/2005

 browser_name = navigator.appName;
 browser_version = parseFloat(navigator.appVersion); 

 if (browser_name == "Netscape" && browser_version >= 3.0) { roll = 'true'; }
 else if (browser_name == "Microsoft Internet Explorer" && browser_version >= 4.0) { roll = 'true'; }
 else { roll = 'false'; }

// Preload MouseOver Images & Mouseover Script
 function msover(img,ref) { if (roll == 'true') { document.images[img].src = ref; } }
 function msout(img,ref)  { if (roll == 'true') { document.images[img].src = ref; } }

	// determine browser
   CR_DOM = (document.getElementById) ? true : false;
   CR_NS4 = (document.layers) ? true : false;
   CR_IE = (document.all) ? true : false;
   CR_IE4 = CR_IE && !CR_DOM;
   CR_Mac = (navigator.appVersion.indexOf("Mac") != -1);
   CR_IE4M = CR_IE4 && CR_Mac;
   CR_IsFader = (CR_IE && !CR_IE4M);

var t;
var photonum=1;
var VDimage;
var VDtran='/features/dive/images/blueblack.jpg';
var imgurl='/images/features/diving/banda/bandaSS';
var imgext='.jpg';
var caption;

	function next() {
				document.images['photo'].src=VDtran;
				photonum=photonum+1;
				if (photonum > 47 ) {
					photonum=47;
					}
				VDimage=imgurl+photonum+imgext;
				caption="<font color=#DDDDDD><b>Slide " + photonum + " of 47</b></font>"
				if(CR_IsFader) {
						fader(VDimage);
						}
				else {
					 delay();
					 }
			}
	function previous() {
					photonum=photonum-1;
					if (photonum <= 1 ){
						photonum=1
						}
					VDimage=imgurl+photonum+imgext;
					caption="<font color=#DDDDDD><b>Slide " + photonum + " of 47</b></font>"
					if(CR_IsFader) {
						fader(VDimage);
						}
					else {
						document.images['photo'].src=VDimage;
						delay();
					 }
			}
		
	function delay(){
		t = setTimeout("document.images['photo'].src=VDimage;" ,2000);
		}
		
	// Used for IE Only		
	function fader(which){
		document.all.photo.filters.blendTrans.Apply();
		document.images['photo'].src= which;
		document.all.photo.filters.blendTrans.Play();
		document.all.caption1.innerHTML = caption
	}
// end of script
