// JavaScript Document

// random masthead splash generator

function randomMastheadSplash()

{
var splashMastheadImage=new Array()

// location of images in this array
splashMastheadImage[1]="assets/images/masthead img1.jpg";
splashMastheadImage[2]="assets/images/masthead img2.jpg";
splashMastheadImage[3]="assets/images/masthead img3.jpg";
splashMastheadImage[4]="assets/images/masthead img4.jpg";

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

document.write('<img src=\"'+splashMastheadImage[getRan]+'\" alt=\"Simply Beautiful Tiaras.\" title=\"Simply Beautiful Tiaras.\" width=\"740\" height=\"120\" \/>');
}

// random splash generator

function randomSplash()

{
var splashImage=new Array()

// location of images in this array
splashImage[1]="assets/images/img_large/SBT04-1.jpg";
splashImage[2]="assets/images/img_large/SBT11-2.jpg";
splashImage[3]="assets/images/img_large/accessories.jpg";
splashImage[4]="assets/images/img_large/girl.jpg";


var splashCaption=new Array()

// captions
splashCaption[1]="New Collection Tiara SBT 04";
splashCaption[2]="New Collection Tiara SBT 11";
splashCaption[3]="Bomboniere, Shimmering Bags, Top Hats & Boxes";
splashCaption[4]="That Special Day!";


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

document.write('<p><img src=\"'+splashImage[getRan]+'\" alt=\"Simply Beautiful Tiaras.\" title=\"Simply Beautiful Tiaras.\" width=\"400\" height=\"234\" \/>');

document.write('<p>'+splashCaption[getRan]+'<p \/>');
document.write('View more Tiaras in our <a href=\"collection.html\">collection page<\/a><\/p>');
}



// swap image and caption 

function swapPhoto(photoSRC,theCaption,thePrice) {

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

	var displayedPrice = document.getElementById("Price");
	
	displayedPrice.firstChild.nodeValue = thePrice;
	
    document.images.imgPhoto.src = "assets/images/img_large/" + photoSRC;
}

<!--
// Hide from old browsers
  // All you have to do is put another text in the variable message.
  // Don't forget to break all lines with a ^
  // When you do not place a ^ at the end of all the message, the
  // message will not repeat
  message     = " Welcome to Simply Beautiful Tiara's Web Site by Lisa.^" +
                "Handcrafted Bridal Tiara's, accessories for your special day and headdresses for all occasions.^" +
                "Simply Beautiful Tiara's are uniquely designed, individually handmade with exquisite gems and high quality materials....^" +
				"to create a stunning item for your special occasion.^" +
                "Why not carry on your colour theme through from the ceremony to the table... ^" +
                "wedding favours make the perfect keepsake to thank your guests for sharing your special day ^" +
				"take a look at our accessories on our collections page.^" +
				"^"
  scrollSpeed = 25
  lineDelay   = 2500
  // Do not change the text below //
  txt         = ""
  function scrollText(pos) {
    if (message.charAt(pos) != '^') {
      txt    = txt + message.charAt(pos)
      status = txt
      pauze  = scrollSpeed
    }
    else {
      pauze = lineDelay
      txt   = ""
      if (pos == message.length-1) pos = -1
    }
    pos++
    setTimeout("scrollText('"+pos+"')",pauze)
  }
  // Unhide -->
scrollText(0)
function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}
