   /* Slideshow images Path */

   var dir="http://www.europeanstoneinc.com/Slideshowimages/";

	 var audioOn = false;

	 

	 /* Declare the urls here */

	 var ImageURLs = new Array()

	      ImageURLs[0]="http://www.europeanstoneinc.com/"

	      ImageURLs[1]="http://www.europeanstoneinc.com/"

	      ImageURLs[2]="http://www.europeanstoneinc.com/"

	      ImageURLs[3]="http://www.europeanstoneinc.com/"

	      ImageURLs[4]="http://www.europeanstoneinc.com/"

	      ImageURLs[5]="http://www.europeanstoneinc.com/"

	      ImageURLs[6]="http://www.europeanstoneinc.com/"

  

	  var change = 0;

    var pause=0;

	  var top=0;

		

		/* Declare all the images here */

	  var arrImage = new Array()

	  arrImage[0]=dir+"water-fall-pond-lake-2.jpg"

	  arrImage[1]=dir+"water-fall-top.jpg"

	  arrImage[2]=dir+"water-fall-pond-lake.jpg"

	  arrImage[3]=dir+"pansies-waterfall.jpg"

	  arrImage[4]=dir+"water-fall-pond.jpg"

	  arrImage[5]=dir+"water-fall-dock.jpg"

	  arrImage[6]=dir+"stone-bridge.jpg"

	  arrImage[7]=dir+"lake-shore-waterfall.jpg"

	  arrImage[8]=dir+"lake-shore.jpg"

	  arrImage[9]=dir+"fire-pit.jpg"

	  arrImage[10]=dir+"flagstone-patio.jpg"

      arrImage[11]=dir+"lake-path.jpg"

	  arrImage[12]=dir+"stone-wall.jpg"

	  arrImage[13]=dir+"water-fall-pond.jpg"

	  arrImage[14]=dir+"lake-backyard.jpg"

	  

	//*** Slideshow stop play function ***//   

	function passslide(play){

		if (pause!=''){

			play=0;

		}

		if (play==1){

			document.getElementById("str").src ="Slideshowimages/play.gif";

			document.getElementById("str").title="Play SlideShow";

		} else {

			document.getElementById("str").src ="Slideshowimages/pause.gif";

			document.getElementById("str").title="Stop SlideShow";

		}

		pause=play;

		if(pause==0){

			SetImage(pause);

		}

	} 

	

	//*** onload function ***//

	function SetImage(arg){
		if(arg=="" || arg==0){

			pause=0;

		}

		var Imgsrc;

		change++;

		if(change >= arrImage.length){

			change = 0;

		}

		

		//var ran=Math.floor(arrImage.length*Math.random());

		//var ran=Math.floor(Math.random() * 100000) % arrImage.length;

		//change=ran;

		Imgsrc = arrImage[change];

		if(pause!=0){

			change--;

		}

		if(pause==0){

			document.images.bases.src=Imgsrc

			setTimeout("SetImage()", 5000);

			SlideShow(change)

		}		

	}


	function transport(){

		window.location.target = "_blank"

		window.location=ImageURLs[change]	

	}

	

	//*** automatic Slideshow function ***//

	function SlideShow(g){

		change=g;

		

		var lin="sel"+g;

		for(var f=0; f<=arrImage.length; f++){

			var hit="sel"+f;

			if( document.getElementById(hit)){

				if(lin==hit){			    

					document.getElementById(hit).style.color='#024266';

				}else{	

					document.getElementById(hit).style.color='#777575'; 

			    }   

			}

		}

		document.images.bases.src=arrImage[g]

	}

	

          ver=parseInt(navigator.appVersion)

		  ie4=(ver>3  && navigator.appName!="Netscape")?1:0

		  ns4=(ver>3  && navigator.appName=="Netscape")?1:0

		  ns3=(ver==3 && navigator.appName=="Netscape")?1:0

function playsound(fla){ 

	if (top==1){ 

		  document.getElementById("sound").src =dir+"musicoff2.gif";

		  document.getElementById("sound").title="Sound Off";

		  top = 0;	

		  if (ie4) document.all['BGSOUND_ID'].src='Slideshowimages/Sovereign64K.mp3';
		  if ((ns4||ns3)

		  && navigator.javaEnabled()

		  && navigator.mimeTypes['audio/x-midi']

		  && self.document.Bach.IsReady()){
			//self.document.Bach.stop()
		  self.document.Bach.play()

		  }

	  } else { 

			document.getElementById("sound").src =dir+"musicon2.gif";

			document.getElementById("sound").title="Sound On";

			top =1;

			if (ie4) document.all['BGSOUND_ID'].src=''; //Slideshowimages/Sovereign64K.mp3';

			if ((ns4||ns3)

			  && navigator.javaEnabled()

			  && navigator.mimeTypes['audio/x-midi']){

			  self.document.Bach.stop()
				//self.document.Bach.play()
			  }

	  }

}

function getMimeType(){
var mimeType = "application/x-mplayer2"; //default
var agt=navigator.userAgent.toLowerCase();
if (navigator.mimeTypes && agt.indexOf("windows")==-1) {
//non-IE, no-Windows
  var plugin=navigator.mimeTypes["audio/mpeg"].enabledPlugin;
  if (plugin) mimeType="audio/mpeg" //Mac/Safari & Linux/FFox
}//end no-Windows
return mimeType
}//end function getMimeType
//-->

function setEmbed(ID,srcpath) {
	 var element = document.getElementById(ID,srcpath);
    //Write the following three lines in one:
	var html = "<EMBED NAME='Bach' SRC='"+srcpath+"' LOOP=TRUE AUTOSTART=TRUE HIDDEN=TRUE MASTERSOUND>"
    //document.getElementById("soundarea").innerHTML = '<embed src="'+srcpath+'" HIDDEN="false"  autostart="true" loop="true" height="0" width="0" type="'+getMimeType()+'"></embed>';
	document.getElementById("soundarea").innerHTML = html;
	 //document.getElementById("soundarea").style.display = "block";
}// end function setEmbed  

function UnsetEmbed(ID,srcpath) {
	 var element = document.getElementById(ID,srcpath);
    //Write the following three lines in one:
	//var html = "<EMBED NAME='Bach' SRC='"+srcpath+"' LOOP=TRUE AUTOSTART=FALSE HIDDEN=TRUE MASTERSOUND>"
    //document.getElementById("soundarea").innerHTML = '<embed src="'+srcpath+'" HIDDEN="false"  autostart="true" loop="true" height="0" width="0" type="'+getMimeType()+'"></embed>';
	var html = "";
	document.getElementById("soundarea").innerHTML = html;
	 //document.getElementById("soundarea").style.display = "block"; 
}// end function setEmbed  



function playsound1(ID,srcpath){ 
	if (top!=0){
		  document.getElementById("music_id").src =dir+"musicoff2.gif";
		  document.getElementById("music_id").title="Sound Off";
		  top = 0;	
		  setEmbed('soundarea','Slideshowimages/Sovereign64K.mp3');
	  } else {
			document.getElementById("music_id").src =dir+"musicon2.gif";
			document.getElementById("music_id").title="Sound On";
			top =1;			
			UnsetEmbed('soundarea','');
	  }
}


