// JavaScript Document


// random splash generator

function randomSplash()

{
var splashImage=new Array()

// location of images in this array
splashImage[1]="Assets/Splash/bathroom1.jpg";
splashImage[2]="Assets/Splash/bathroom2.jpg";
splashImage[3]="Assets/Splash/bathroom3.jpg";
splashImage[4]="Assets/Splash/bathroom4.jpg";
splashImage[5]="Assets/Splash/bathroom5.jpg";

var splashCaption=new Array()

// captions
splashCaption[1]="M&M Bathroom Showroom";
splashCaption[2]="M&M Bathroom Showroom";
splashCaption[3]="M&M Bathroom Showroom";
splashCaption[4]="M&M Bathroom Showroom";
splashCaption[5]="M&M Bathroom Showroom";

var getRan=Math.floor(Math.random()*splashImage.length)
if (getRan==0)
getRan=1

document.write('<p><img src=\"'+splashImage[getRan]+'\" alt=\"Products.\" title=\"M&M Plumbing & Heating Suppies.\" width=\"255\" height=\"191\" \/>');

document.write('<p>'+splashCaption[getRan]+'<br \/>');
}

// random splash 2 generator

function randomSplash2()

{
var splashImage=new Array()

// location of images in this array
splashImage[1]="Assets/Splash2/product1.jpg";
splashImage[2]="Assets/Splash2/product2.jpg";
splashImage[3]="Assets/Splash2/product3.jpg";
splashImage[4]="Assets/Splash2/product4.jpg";
splashImage[5]="Assets/Splash2/product5.jpg";
splashImage[6]="Assets/Splash2/product6.jpg";
splashImage[7]="Assets/Splash2/product7.jpg";
splashImage[8]="Assets/Splash2/product8.jpg";
splashImage[9]="Assets/Splash2/product9.jpg";

var splashCaption=new Array()

// captions
splashCaption[1]="Roman Embrace Bi-Fold";
splashCaption[2]="Zehnder Fassane Spa";
splashCaption[3]="Showerlux Glide Slider";
splashCaption[4]="Showerlux Designa";
splashCaption[5]="Vitra Cocoon";
splashCaption[6]="Vitra Step";
splashCaption[7]="Vitra Sunrise";
splashCaption[8]="Vitra Sunrise Suite";
splashCaption[9]="Zehnder Altai Spa";


var getRan=Math.floor(Math.random()*splashImage.length)
if (getRan==0)
getRan=1

document.write('<p><img src=\"'+splashImage[getRan]+'\" alt=\"Products.\" title=\"M&M Plumbing & Heating Suppies.\" width=\"300\" height=\"225\" \/>');

document.write('<p>'+splashCaption[getRan]+'<br \/>');
}


// swap image and caption 

function swapPhoto(photoSRC,theCaption,thePrice) {

	var displayedCaption = document.getElementById("caption");
	
	displayedCaption.firstChild.nodeValue = theCaption;

    document.images.imgPhoto.src = "Assets/" + photoSRC;
}

