//---------------------------------------------------------------------------------------------------------------------------
// This script detects the browser we're running.
// You can call: BrowserDetect.browser     for Browser name (eg Firefox)
//		 BrowserDetect.version     for Browser version (eg 2)
//	         BrowserDetect.OS          for OS (eg Windows) 

var BrowserDetect = {
	init: function () {
		this.browser = this.searchString(this.dataBrowser) || "An unknown browser";
		this.version = this.searchVersion(navigator.userAgent)
			|| this.searchVersion(navigator.appVersion)
			|| "an unknown version";
		this.OS = this.searchString(this.dataOS) || "an unknown OS";
	},
	searchString: function (data) {
		for (var i=0;i<data.length;i++)	{
			var dataString = data[i].string;
			var dataProp = data[i].prop;
			this.versionSearchString = data[i].versionSearch || data[i].identity;
			if (dataString) {
				if (dataString.indexOf(data[i].subString) != -1)
					return data[i].identity;
			}
			else if (dataProp)
				return data[i].identity;
		}
	},
	searchVersion: function (dataString) {
		var index = dataString.indexOf(this.versionSearchString);
		if (index == -1) return;
		return parseFloat(dataString.substring(index+this.versionSearchString.length+1));
	},
	dataBrowser: [
		{ string: navigator.userAgent, subString: "OmniWeb", versionSearch: "OmniWeb/", identity: "OmniWeb" },
		{ string: navigator.vendor, subString: "Apple", identity: "Safari" },
		{ prop: window.opera, identity: "Opera" },
		{ string: navigator.vendor, subString: "iCab", identity: "iCab" },
		{ string: navigator.vendor, subString: "KDE", identity: "Konqueror" },
		{ string: navigator.userAgent, subString: "Firefox", identity: "Firefox" },
		{ string: navigator.vendor, subString: "Camino", identity: "Camino" },
		{ string: navigator.userAgent, subString: "Netscape", identity: "Netscape" }, // for newer Netscapes (6+)
		{ string: navigator.userAgent, subString: "MSIE", identity: "Explorer", versionSearch: "MSIE" },
		{ string: navigator.userAgent, subString: "Gecko", identity: "Mozilla", versionSearch: "rv" },
		{ string: navigator.userAgent, subString: "Mozilla", identity: "Netscape", versionSearch: "Mozilla" } // for older Netscapes (4-)
	],
	dataOS : [
		{ string: navigator.platform, subString: "Win", identity: "Windows" },
		{ string: navigator.platform, subString: "Mac", identity: "Mac" },
		{ string: navigator.platform, subString: "Linux", identity: "Linux" }
	]

};
BrowserDetect.init();

//---------------------------------------------------------------------------------------------------------------------------
// This script toggles menu items on and off.
// It is used in the "Gallery" on the LHS of the menus.
// gallery.init is used when the window loads to hide the "Gallery" menu items.
// The gallery menu items are displayed in the ".htm" files - If javascript is disabled,
// then they won't be hidden - which is what we want.

gallery={
	id : 'Gallery',
	init : function() {
		if (!document.getElementById) return false;              // Exit if no "id"s exist in file
                galleryNav=document.getElementById(gallery.id);        
		if (galleryNav == null) return false;                    // Exit if no "id=Gallery"s exist in file
                innerText=document.getElementById(gallery.id).innerHTML; // Get the contents of the "Gallery" id
                t=innerText.indexOf("active_option");                    // See if "Gallery" id has an "active_option"
                if (t>-1) return false;                                  // "t" is -1 if there's no "active_option"
                galleryNav.style.display="none";
        },

        toggle : function(item) {
               obj=document.getElementById(item);
               visible=(obj.style.display!="none")
               key=document.getElementById("x" + item);
               if (visible) {
                 obj.style.display="none";
                 key.innerHTML=("<img src=images/arrowdn.gif alt='V' border=none>" + " " + item);
               } else {
                  obj.style.display="block";
                  key.innerHTML=("<img src=images/arrow.gif alt='->' border=none>" + " " + item);
               }
       }
}
DOMhelp.addEvent(window, 'load', gallery.init, false);

//---------------------------------------------------------------------------------------------------------------------------
// This script opens a new browser window and writes
// HTML to display an image with a title and caption

function show_photo(pFileName) {
  pText1='';
  pText2='';
  switch(pFileName) {
    case 'b001.jpg'         :  w=620; h=585; pTitle="Bracelet 1"; 
                                             pText1="Silver effect, elasticated charm bracelet with crystals &amp; semi-precious stones";
                                             pText2="Price £20";    break
    case 'b002.jpg'         :  w=620; h=555; pTitle="Bracelet 2";
                                             pText1="Swarovski Crystals";
                                             pText2="Price £10";    break
    case 'b003.jpg'         :  w=620; h=555; pTitle="Bracelet 3";
                                             pText1="Freshwater Pearls &amp; Crystals";
                                             pText2="Price £8" ;    break
    case 'b004.jpg'         :  w=620; h=585; pTitle="Bracelet 4";
                                             pText1="Sterling Silver with Swarovski Crystals. Perfect for a Bridesmaid's gift!";
                                             pText2="Price £20";    break
    case 'c001.jpg'         :  w=620; h=550; pTitle="Comb1";
                                             pText1="Comb1";
                                             pText2="Price £15";    break
    case 'e001.jpg'         :  w=360; h=610; pTitle="Earring 1";
                                             pText1="Sterling Silver Chandelier design with Swarovski crystals";
                                             pText2="Price £12";    break
    case 'e002.jpg'         :  w=360; h=585; pTitle="Earring 2"; 
                                             pText1="Tiger's eye design with Swarovski crystals"; 
                                             pText2="Price £7" ;    break
    case 'e003.jpg'         :  w=360; h=550; pTitle="Earring 3";
                                             pText1="Freshwater Pearls &amp; Crystals";        
                                             pText2="Price £7" ;    break
    case 'e004.jpg'         :  w=360; h=585; pTitle="Earring 4"; 
                                             pText1="Amethyst &amp; Swarovski crystals";     
                                             pText2="Price £7" ;    break
    case 'e005.jpg'         :  w=360; h=585; pTitle="Earring 5";
                                             pText1="Swarovski crystals &amp; Glass beads";   
                                             pText2="Price £7" ;    break
    case 'g001.jpg'         :  w=620; h=550; pTitle="Butterfly Grip"; 
                                             pText1="Butterfly Grip";
                                             pText2="Price £10";    break
    case 'n001.jpg'         :  w=620; h=580; pTitle="Necklace 1";
                                             pText1="An Illusion necklace with Swarovski Crystals, Pearls &amp; Freshwater Pearls";
                                             pText2="Price £25";    break
    case 'n002.jpg'         :  w=510; h=580; pTitle="Necklace 2";
                                             pText1="A stunning mix of Swarovski Crystals, Pearls &amp; Freshwater Pearls";
                                             pText2="Price £35";    break
    case 'n003.jpg'         :  w=740; h=550; pTitle="Necklace 3";
                                             pText1="Freshwater Pearls &amp; Swarovski Crystals";
                                             pText2="Price £15";    break
    case 'n004.jpg'         :  w=690; h=550; pTitle="Necklace 4";
                                             pText1="A woven design with Crystal Pearls";
                                             pText2="Price £20";    break
    case 'n005.jpg'         :  w=705; h=550; pTitle="Necklace 5";
                                             pText1="Freshwater Pearls in an Illusion style";
                                             pText2="Price £20";    break
    case 'n006.jpg'         :  w=620; h=550; pTitle="Necklace 6";
                                             pText1="A classic string of Swarovski Crystals";
                                             pText2="Price £30";    break
    case 'n007.jpg'         :  w=850; h=550; pTitle="Necklace 7";
                                             pText1="Swarovski Crystal Pearls &amp; Crystals in a woven design"; 
                                             pText2="Price £20";    break
    case 'n008.jpg'         :  w=510; h=550; pTitle="Necklace 8";
                                             pText1="A beautiful spiral design with Pearls";
                                             pText2="Price £40";    break
    case 'n009.jpg'         :  w=620; h=550; pTitle="Necklace 9";
                                             pText1="An Illusion necklace with fluorite chips";
                                             pText2="Price £20";    break
    case 'n010.jpg'         :  w=620; h=550; pTitle="Necklace 10"; 
                                             pText1="Stunningly simple Quartz beads (3 strands shown)";
                                             pText2="Price £15 per strand";    break
    case 'n011.jpg'         :  w=620; h=550; pTitle="Necklace 11";
                                             pText1="A combination of Crystals &amp; metal beads";
                                             pText2="Price £25";    break
    case 'athena.jpg'       :  w=620; h=550; pTitle="Athena";
                                             pText1="Athena - the Greek Goddess of Wisdom";
                                             pText2="Price £30";    break
    case 'crystal_pearl.jpg':  w=620; h=525; pTitle="Crystals and Pearls"; 
                                             pText1="Crystals and Pearls";
                                             pText2="";             break
    case 'aphrodite.jpg'    :  w=620; h=550; pTitle="Aphrodite";
                                             pText1="Aphrodite - the Greek Goddess of Love &amp; Fertility";
                                             pText2="Price £65";    break
    case 'brigid.jpg'       :  w=620; h=580; pTitle="Brigid";
                                             pText1="Brigid - the Celtic Goddess of Poetry, Healing &amp; Childbirth";
                                             pText2="Price £60";  break
    case 'fortuna.jpg'      :  w=620; h=550; pTitle="Fortuna";
                                             pText1="Fortuna - the Roman Goddess of Abundance";
                                             pText2="Price £70";    break
    case 'isis.jpg'         :  w=620; h=550; pTitle="Isis";
                                             pText1="Isis - the Egyptian Goddess of Fertility";
                                             pText2="Price £50";    break
    case 'freya.jpg'        :  w=620; h=550; pTitle="Freya";
                                             pText1="Freya - the Norse Goddess of Love &amp; Fertility";
                                             pText2="Price £25";    break
    case 'minerva.jpg'      :  w=620; h=550; pTitle="Minerva";
                                             pText1="Minerva - the Goddess of Wisdom";
                                             pText2="Price £40";    break
    case 'rhiannon.jpg'     :  w=620; h=580; pTitle="Rhiannon";
                                             pText1="Rhiannon - the Celtic Goddess of Inspiration &amp; the Moon";
                                             pText2="Price £50";    break
    case 'sophia.jpg'       :  w=620; h=580; pTitle="Sophia - the Goddess of Wisdom,";
                                             pText1="Sophia - the Goddess of Wisdom, the mother of Faith, Hope &amp; Charity";
                                             pText2="Price £50";    break
    case 'venus.jpg'        :  w=620; h=550; pTitle="Venus";
                                             pText1="Venus - the Roman Goddess of Beauty &amp; Love";
                                             pText2="Price £45";    break
    case 'laf692.jpg'       :  w=620; h=550; pTitle="Abalone &amp; Sterling Silver Necklace";
                                             pText1=pTitle;
                                             pText2="";             break
    case 'laf698.jpg'       :  w=620; h=550; pTitle="Flower turquoise Necklace";
                                             pText1=pTitle;
                                             pText2="";             break
    case 'laf704.jpg'       :  w=620; h=550; pTitle="Quartz &amp; Sterling Silver Necklace";
                                             pText1=pTitle;
                                             pText2="";             break
    case 'laf708.jpg'       :  w=620; h=550; pTitle="Fluorite &amp; Sterling Silver charms Necklace";
                                             pText1=pTitle;
                                             pText2="";             break
    case 'laf709.jpg'       :  w=620; h=550; pTitle="Freshwater Pearls &amp; Swarovski crystals Necklace";
                                             pText1=pTitle;
                                             pText2="";             break
    case 'laf712.jpg'       :  w=360; h=550; pTitle="Red Agate Necklace";
                                             pText1=pTitle;
                                             pText2="";             break
    case 'laf713.jpg'       :  w=620; h=550; pTitle="Swarovski crystals &amp; Sterling Silver Earrings";
                                             pText1=pTitle;
                                             pText2="";             break
    case 'laf714.jpg'       :  w=620; h=550; pTitle="Swarovski crystals &amp; Sterling Silver Earrings";
                                             pText1=pTitle;
                                             pText2="";             break
    case 'laf715.jpg'       :  w=620; h=550; pTitle="Swarovski crystals &amp; Sterling Silver Necklace";
                                             pText1=pTitle;
                                             pText2="";             break
    case 'laf716.jpg'       :  w=620; h=550; pTitle="Jade Earrings";
                                             pText1=pTitle;
                                             pText2="";             break
    case 'laf718.jpg'       :  w=620; h=550; pTitle="Onyx, Quartz &amp; Sterling Silver Necklace";
                                             pText1=pTitle;
                                             pText2="";             break
    case 'laf719.jpg'       :  w=620; h=550; pTitle="Coco Jasper Necklace";
                                             pText1=pTitle;
                                             pText2="";             break
    case 'laf720.jpg'       :  w=620; h=550; pTitle="Chinese Painting gemstone Necklace";
                                             pText1=pTitle;
                                             pText2="";             break
    case 'laf725.jpg'       :  w=620; h=550; pTitle="Chinese Painting gemstone Necklace (detail)";
                                             pText1=pTitle;
                                             pText2="";             break
    case 'laf722.jpg'       :  w=620; h=550; pTitle="Freshwater pearls &amp; Sterling Silver Beads Necklace";
                                             pText1=pTitle;
                                             pText2="";             break
    case 'laf724.jpg'       :  w=620; h=550; pTitle="Freshwater pearls &amp; Sterling Silver Beads Necklace (detail)";
                                             pText1=pTitle;
                                             pText2="";             break
    default                 :  alert("No popup available - sorry..."); return
}

// specify window parameters
  photoWin = window.open( "", "photo", "width=" + w + ",height=" + h + ",directories=0,toolbar=0,menubar=0,status=0,location=0,scrollbars=0,resizable=1,left=20,top=40");
// write content to window
  photoWin.document.write('<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">');
  photoWin.document.write('<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /><link href="css/style.css" rel="stylesheet" type="text/css" /><title>' + pTitle + '</title></head>');

// Need to resize window if it was already open
// Add to height & width to make internal window the right size (it works!)
  h=h+70
  w=w+8

// Add a bit off for Firefox
  if (BrowserDetect.browser == "Firefox") {
            h=h+5
  }
// Take a bit off for IE6 - leave others - eg IE7 - as is
  if (BrowserDetect.browser == "Explorer") {
	if (BrowserDetect.version == 6) {
            h=h-25
        }
  }
  photoWin.document.write('<body>');	
  photoWin.document.write('<script type="text/javascript">window.resizeTo( ' + w + ',' + h +')</script>');	
  photoWin.document.write('<p><a href="javascript:window.close();"><img src="images/full/' + pFileName + '" title="' + pTitle + '" alt="Picture of ' + pTitle + '" class="leftImg" /></a></p><h6>&copy;');	
  photoWin.document.write( RightNow.getFullYear());
  photoWin.document.write( ' Kate Latham Designs&hellip;</h6>');
  photoWin.document.write('<h6 class="second">' + pText1 + '</h6>');
  photoWin.document.write('<h6 class="second">' + pText2 + '</h6></body></html>');
  photoWin.document.close();	

// If we are on NetScape, we can bring the window to the front
//	if (navigator.appName.substring(0,8) == "Netscape") photoWin.focus();
  photoWin.focus();
}

//---------------------------------------------------------------------------------------------------------------------------
// Pass it name and domain - it then displays name@domain <<<<<<<<<<<<<<<<<<<<<<<<<<<<NOT BEING USED NOW>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
// 

function safemail(sName, sSubject) {
 domain='tiaras-etc' + '.' + 'co' + '.' + 'uk'
 var str = '<a href="mailto:' + sName + '@' + domain + '?subject=' +sSubject + '">' + sName + '@' + domain + '</a>';
 document.writeln(str);
}

//---------------------------------------------------------------------------------------------------------------------------
// Converts <span class="address">enquiry_at_tiaras-etc.co.uk</span> to a valid email address - avoids spam.
// 
var Convert = {
    initialize: function() {
        var spans = document.getElementsByTagName("span");
        for (var i = 0; i < spans.length; i++) {
            if(DOMhelp.cssjs('check',spans[i],'address')){ 
                string = spans[i].childNodes[0].nodeValue;
                if(string.split("_")[1] != null){
                    email = string.split("_")[0] + "@" + string.split("_")[2];
                    spans[i].innerHTML = '<a href="mailto:' + email + '?subject=Enquiry">' + email + '</a>';
                }
            }
        }
    }
}
//window.onload = Convert.initialize
DOMhelp.addEvent(window, 'load', Convert.initialize, false);

//---------------------------------------------------------------------------------------------------------------------------
// Converts <span class="thisyear">2006</span> to current year - if user has disabled javascript it will show 2006.
// 
var ThisYear = {
    initialize: function() {
        var spans = document.getElementsByTagName("span");
        for (var i = 0; i < spans.length; i++) {
            if(DOMhelp.cssjs('check',spans[i],'thisyear')){ 
                if(spans[i].childNodes[0] != null){
                    string = spans[i].childNodes[0].nodeValue;
                    if(string == '2006'){
                        RightNow = new Date();
			thisYear= RightNow.getFullYear() - 2000;
                        spans[i].innerHTML = string + "-" + thisYear;
                    }
                }
            }
        }
    }
}
//window.onload = ThisYear.initialize;
DOMhelp.addEvent(window, 'load', ThisYear.initialize, false);

//---------------------------------------------------------------------------------------------------------------------------
// Sets height of <div id="menu_pad">depending on the size of page being loaded.
// It extends the menu down the LHS on large pages so that the background blends in smoothly.
// If javascript is disabled, we get the "standard" height set in the style sheet. (270px = size of index page.)
// 
var MenuPad = {
    initialize: function() {
	var bodyid = document.getElementsByTagName("body")[0].getAttribute("id");  // [1] Get the id for the <body> tag.
        var obj = document.getElementById("menu_pad");
	var hght = "225px";
	switch(bodyid) {
			case 'index'      : hght = "270px" ;  break;
			case 'colourchart': hght = "570px" ;  break;
			case 'earring'    : hght = "570px" ;  break;
			case 'necklace'   : hght = "550px" ;  break;
			case 'tiaras'     : hght = "570px" ;  break;
		       } ;
	obj.style.height=hght;
	}
}
//window.onload = MenuPad.initialize;
DOMhelp.addEvent(window, 'load', MenuPad.initialize, false);

//---------------------------------------------------------------------------------------------------------------------------
// Converts <li id="menu_xxx"> <a href="xxx.htm">XXXX</a></li> to <li id="menu_xxx"> <a id="active_option" href="#">XXX</a></li>
// Courtesy of Steve Wright.
//
// What I've done is given the <body> tag an id attribute.
// I've then labelled the associated <li> element with an id that is the same as the <body> but prefixed by "menu_".
// So for the bespoke page, the body would have an id of "bespoke" and the associated menu option would have an id of "menu_bespoke".
//
// When the javascript routine runs it does the following:
// [1] Grab the id from the body tag (if there is one).
// [2] Find an element with an id of "menu_" + that id (if there is one). This should be an <li> tag.
// [3] Find the <a> elements within that <li>. There should only be one, but incase there are more, we will only be tweaking the first one.
// [4] Set the id to be "active_option" and overwrite the href with "#" on this <a> tag.

ThisMenu = {
	menu_prefix : "menu_",
	active_id : "active_option",
	
	initialize: function(){
		var bodyid = document.getElementsByTagName("body")[0].getAttribute("id");  // [1] Get the id for the <body> tag.

		if(bodyid != null){
			menuli = document.getElementById(ThisMenu.menu_prefix + bodyid);   // [2] Find an <li> element with an id related to the <body> id.

			if(menuli != null){
				var anchors = menuli.getElementsByTagName("a");            // [3] Find the <a> tags within the <li> tag.
				if(anchors.length){
				
					anchors[0].setAttribute("id", ThisMenu.active_id); // [4] Add an id attribute to the first <a> tag to indicate
                                                                                           //     this is the active menu option.
					
					anchors[0].setAttribute("href", "#");              // [4] Overwrite the href attribute for the first <a> tag with "#"
				}
			}
		}
	}
};
DOMhelp.addEvent(window, 'load', ThisMenu.initialize, false);

//---------------------------------------------------------------------------------------------------------------------------
// Function displays current year (eg. 2007)
// REDUNDANT +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

//function showyear() {
// RightNow = new Date();
// document.write(+ RightNow.getFullYear());
//}

//---------------------------------------------------------------------------------------------------------------------------
// These functions rotate a sequence of images for images with an id="slide"
// Courtesy of Steve Wright

slideShow = {
	interval : 2,
	currentSlide : 0,
	id : 'slide',
	
	initArray : function() {
		this.length = slideShow.initArray.arguments.length
    		for (var i = 0; i < this.length; i++)
        	this[i] = slideShow.initArray.arguments[i]
	},
	
	init : function() {
		if (!document.getElementById) return false;
		if (!document.images) return false;
		if (document.getElementById(slideShow.id) == null) return false;
		slideShow.images = new slideShow.initArray('images/thumb/c001.jpg', 'images/thumb/g001.jpg', 'images/thumb/n001.jpg',
	       	                                           'images/thumb/athena.jpg', 'images/thumb/aphrodite.jpg', 'images/thumb/brigid.jpg',
	       	                                           'images/thumb/fortuna.jpg', 'images/thumb/isis.jpg', 'images/thumb/freya.jpg',
	       	                                           'images/thumb/minerva.jpg', 'images/thumb/rhiannon.jpg', 'images/thumb/sophia.jpg',
	               	                                   'images/thumb/venus.jpg');
		slideShow.setTimer();
	},
	
	setTimer : function() {
		setTimeout("slideShow.nextSlide()", slideShow.interval * 1000);
	},
	
	nextSlide : function() {
		var slide = document.getElementById(slideShow.id);
		if (slide != null) {
			slideShow.currentSlide = (slideShow.currentSlide + 1) % slideShow.images.length;
			slide.src = slideShow.images[slideShow.currentSlide];
			slideShow.setTimer()
 		}
	}
}

DOMhelp.addEvent(window, 'load', slideShow.init, false);



//********************************************************************************
function show_photo2(pFileName,w,h) {
  pText1='';
  pText2='';
  switch(pFileName) {
    case 'b001.jpg'         :   pTitle="Bracelet 1"; 
                                             pText1="Silver effect, elasticated charm bracelet with crystals &amp; semi-precious stones";
                                             pText2="Price £20";    break
    case 'b002.jpg'         :   pTitle="Bracelet 2";
                                             pText1="Swarovski Crystals";
                                             pText2="Price £10";    break
    case 'b003.jpg'         :   pTitle="Bracelet 3";
                                             pText1="Freshwater Pearls &amp; Crystals";
                                             pText2="Price £8" ;    break
    case 'b004.jpg'         :   pTitle="Bracelet 4";
                                             pText1="Sterling Silver with Swarovski Crystals. Perfect for a Bridesmaid's gift!";
                                             pText2="Price £20";    break
    case 'c001.jpg'         :   pTitle="Comb1";
                                             pText1="Comb1";
                                             pText2="Price £15";    break
    case 'e001.jpg'         :   pTitle="Earring 1";
                                             pText1="Sterling Silver Chandelier design with Swarovski crystals";
                                             pText2="Price £12";    break
    case 'e002.jpg'         :   pTitle="Earring 2"; 
                                             pText1="Tiger's eye design with Swarovski crystals"; 
                                             pText2="Price £7" ;    break
    case 'e003.jpg'         :   pTitle="Earring 3";
                                             pText1="Freshwater Pearls &amp; Crystals";        
                                             pText2="Price £7" ;    break
    case 'e004.jpg'         :   pTitle="Earring 4"; 
                                             pText1="Amethyst &amp; Swarovski crystals";     
                                             pText2="Price £7" ;    break
    case 'e005.jpg'         :   pTitle="Earring 5";
                                             pText1="Swarovski crystals &amp; Glass beads";   
                                             pText2="Price £7" ;    break
    case 'g001.jpg'         :   pTitle="Butterfly Grip"; 
                                             pText1="Butterfly Grip";
                                             pText2="Price £10";    break
    case 'n001.jpg'         :   pTitle="Necklace 1";
                                             pText1="An Illusion necklace with Swarovski Crystals, Pearls &amp; Freshwater Pearls";
                                             pText2="Price £25";    break
    case 'n002.jpg'         :   pTitle="Necklace 2";
                                             pText1="A stunning mix of Swarovski Crystals, Pearls &amp; Freshwater Pearls";
                                             pText2="Price £35";    break
    case 'n003.jpg'         :   pTitle="Necklace 3";
                                             pText1="Freshwater Pearls &amp; Swarovski Crystals";
                                             pText2="Price £15";    break
    case 'n004.jpg'         :   pTitle="Necklace 4";
                                             pText1="A woven design with Crystal Pearls";
                                             pText2="Price £20";    break
    case 'n005.jpg'         :   pTitle="Necklace 5";
                                             pText1="Freshwater Pearls in an Illusion style";
                                             pText2="Price £20";    break
    case 'n006.jpg'         :   pTitle="Necklace 6";
                                             pText1="A classic string of Swarovski Crystals";
                                             pText2="Price £30";    break
    case 'n007.jpg'         :   pTitle="Necklace 7";
                                             pText1="Swarovski Crystal Pearls &amp; Crystals in a woven design"; 
                                             pText2="Price £20";    break
    case 'n008.jpg'         :   pTitle="Necklace 8";
                                             pText1="A beautiful spiral design with Pearls";
                                             pText2="Price £40";    break
    case 'n009.jpg'         :   pTitle="Necklace 9";
                                             pText1="An Illusion necklace with fluorite chips";
                                             pText2="Price £20";    break
    case 'n010.jpg'         :   pTitle="Necklace 10"; 
                                             pText1="Stunningly simple Quartz beads (3 strands shown)";
                                             pText2="Price £15 per strand";    break
    case 'n011.jpg'         :   pTitle="Necklace 11";
                                             pText1="A combination of Crystals &amp; metal beads";
                                             pText2="Price £25";    break
    case 'athena.jpg'       :   pTitle="Athena";
                                             pText1="Athena - the Greek Goddess of Wisdom";
                                             pText2="Price £30";    break
    case 'crystal_pearl.jpg':   pTitle="Crystals and Pearls"; 
                                             pText1="Crystals and Pearls";
                                             pText2="";             break
    case 'aphrodite.jpg'    :   pTitle="Aphrodite";
                                             pText1="Aphrodite - the Greek Goddess of Love &amp; Fertility";
                                             pText2="Price £65";    break
    case 'brigid.jpg'       :   pTitle="Brigid";
                                             pText1="Brigid - the Celtic Goddess of Poetry, Healing &amp; Childbirth";
                                             pText2="Price £60";  break
    case 'fortuna.jpg'      :   pTitle="Fortuna";
                                             pText1="Fortuna - the Roman Goddess of Abundance";
                                             pText2="Price £70";    break
    case 'isis.jpg'         :   pTitle="Isis";
                                             pText1="Isis - the Egyptian Goddess of Fertility";
                                             pText2="Price £50";    break
    case 'freya.jpg'        :   pTitle="Freya";
                                             pText1="Freya - the Norse Goddess of Love &amp; Fertility";
                                             pText2="Price £25";    break
    case 'minerva.jpg'      :   pTitle="Minerva";
                                             pText1="Minerva - the Goddess of Wisdom";
                                             pText2="Price £40";    break
    case 'rhiannon.jpg'     :   pTitle="Rhiannon";
                                             pText1="Rhiannon - the Celtic Goddess of Inspiration &amp; the Moon";
                                             pText2="Price £50";    break
    case 'sophia.jpg'       :   pTitle="Sophia - the Goddess of Wisdom,";
                                             pText1="Sophia - the Goddess of Wisdom, the mother of Faith, Hope &amp; Charity";
                                             pText2="Price £45";    break
    case 'venus.jpg'        :   pTitle="Venus";
                                             pText1="Venus - the Roman Goddess of Beauty &amp; Love";
                                             pText2="Price £45";    break
    default                 :  alert("No popup available - sorry..."); return
}
document.write("Filename=" + pFileName);
document.write("<br/>Width=" + w);
document.write("<br/>Height=" + h);
document.write("<br/>Text1=" + pText1);
document.write("<br/>Text2=" + pText2);
document.write("<br/>Browser=" + BrowserDetect.browser);
document.write("<br/>Version=" + BrowserDetect.version);
document.write("<br/>OS=" + BrowserDetect.OS);

// specify window parameters
  photoWin2 = window.open( "", "photo", "width=" + w + ",height=" + h + ",directories=0,toolbar=0,menubar=0,status=0,location=0,scrollbars=0,resizable=1,left=20,top=40");
// write content to window
  photoWin2.document.write('<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">');
  photoWin2.document.write('<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /><link href="css/style.css" rel="stylesheet" type="text/css" /><title>' + pTitle + '</title></head>');	

// Need to resize window if it was already open
// Add to height & width to make internal window the right size (it works!)
  h=h+70
  w=w+8

// Take a bit off for Firefox
  if (BrowserDetect.browser == "Firefox") {
            h=h-20
  }
// Take a bit off for IE6 - leave others - eg IE6 - as is
  if (BrowserDetect.browser == "Explorer") {
	if (BrowserDetect.version == 6) {
            h=h-45
        }
  }
  photoWin2.document.write('<body>');	
  photoWin2.document.write('<script type="text/javascript">window.resizeTo( ' + w + ',' + h +')</script>');	
  photoWin2.document.write('<a href="javascript:window.close();"><img src="images/full/' + pFileName + '" title="' + pTitle + '" alt="Picture of ' + pTitle + '" class="leftImg" /></a><h6>&copy;');	
  photoWin2.document.write( RightNow.getFullYear());
  photoWin2.document.write( ' Kate Latham Designs&hellip;</h6>');
  photoWin2.document.write('<h6 class="second">' + pText1 + '</h6>');
  photoWin2.document.write('<h6 class="second">' + pText2 + '</h6>');
  photoWin2.document.close();	

// If we are on NetScape, we can bring the window to the front
//	if (navigator.appName.substring(0,8) == "Netscape") photoWin2.focus();
  photoWin2.focus();
}


