var sub;
var cont;
var mainImagePane;
var thumbPane;
var globPrevDataFrame;
var globPrevNewsImage;
var elementName;

document.getElementsByClassName = function(cl) 
{
	var retnode = [];
	var myclass = new RegExp('\\b'+cl+'\\b');
	var elem = this.getElementsByTagName('*');
	for (var i = 0; i < elem.length; i++) 
	{
		var classes = elem[i].className;
		if (myclass.test(classes)) retnode.push(elem[i]);
	}
	return retnode;
}; 

var album=new Array();
album['collection1']=new Array('#',['Alanna',2],['Ava',2],['Bethany',2],['Briony',2],['Catriona',2],['Dominique',3],['Faryl',3],['Isobel',2],['Katie',3],['Lilia',2],['Maria',3],['Mia',2],['Monique',2],['Natalie',2],['Phoebe',2],['Rachel',3]);

album['collection2']=new Array('#',['Alicia',3],['Beth',3],['Chloe',3],['Elizabeth',3],['Georgia',3],['Grace',3],['Helena',3],['Jasmine',2],['Lauren',3],['Louise',3],['Scarlett',4],['Sienna',3],['Zara',4]);

album['collection3']=new Array('#',['Audrey',2],['Catherine',2],['Dianna',3],['Faye',2],['Francesca',3],['Gina',3],['Megan',2],['Olivia',3],['Paige',2],['Sophie',2]);

album['collection4']=new Array('#',['Annabel',3],['Beatrice',3],['Charlotte',3],['Cleo',3],['Georgina',3],['Ingrid',3],['Jessica',3],['Leila',3],['Loretta',2],['Natalia',3],['Rebecca',3],['Roma',3],['Sabrina',3]);

album['boho_chic']=new Array('#',['adriana',3],['almira',3],['althea',3],['atlanta',3],['athena',3],['marguerite',3],['daisy',3]);

album['classic_elegance']=new Array('#',['callista',3],['celeste',3],['crystabel',3],['elspeth',3],['roberta',3],['eliana',2],['lola',3],['tamsin',3],['alyssa',3]);

album['romance']=new Array('#',['florina',3],['freya',3],['lily',3],['mariah',3],['rosina',3],['rosita',3]);

album['vintage_inspired']=new Array('#',['colette',2],['brigitta',3],['louisa',2],['rhona',3],['thea',3]);

album['brides']=new Array('#',['Lauren & Nelson',3],['Rachel & Matthew',3],['Joanna & Kristen',3],['Hannah & Steven',3],['Shelly & Richard',3],['Laura',3],['Alex',3],['Louise',3]);

album['collection1']['description']=new Array();
album['collection1']['description'][0]="#";
album['collection1']['description'][1]="Black silk fishtail dress with high neck. Hand beaded neckline in Swarovski crystals <br>Jacket also available (not shown)<br>Other colours available";
album['collection1']['description'][2]="Crepe backed satin fishtail dress with low back and knot detail.<br>Other colours available";
album['collection1']['description'][3]="Silk dress with full skirt. Bodice has a dropped waist with pleated detailing across waist.<br>Detachable flower corsage and twisted strap detail.<br>Matching jacket is available<br>Other colours available";
album['collection1']['description'][4]="Empire line silk tulle column dress with tiny flower and crystal detailing";
album['collection1']['description'][5]="Silk crepe empire line dress with straps. Chantilly lace and pleated detailing on bodice";
album['collection1']['description'][6]="1950's ball gown style with box pleated skirt  and small train. Bodice and sash is hand beaded using  Swarovski crystals. Matching bolero jacket with contrasting lining and cuff is available<br>Other colours available";
album['collection1']['description'][7]="Ivory short silk dress with corded lace bodice and tiered skirt with detachable full gathered overskirt skirt and oversized silk bow. Remove the overskirt for the evening of your wedding. This short dress is also ideal to take on honeymoon.<br>Lace shrug is optional";
album['collection1']['description'][8]="Ivory silk dress with full gathered skirt. Bodice has Chantilly lace overlay and has a contrasting silk sash in peacock green.<br>Brooch is optional";
album['collection1']['description'][9]="1950's style silk halter neck dress with three quarter length skirt with an organza overlay. Ruched detailing on bodice. Worn with a contrasting silk sash.";
album['collection1']['description'][10]="Silk crepe dress with French lace sleeves and lace inserts on back of dress. ";
album['collection1']['description'][11]="Silk dress with French lace bodice and dramatic pick up skirt. Contrasting sash worn at waist. Dress is worn with French lace capped sleeve bolero.";
album['collection1']['description'][12]="Silk dress with full skirt with an organza overlay. Bodice has a gathered bust detail and corset seam detail.<br>Other colours available";
album['collection1']['description'][13]="Silk tulle column dress with French lace detailing and soft gathered straps.";
album['collection1']['description'][14]="1950's style dress with three quarter length tulle skirt and silk bodice with contrasting sash and flower corsage.<br>Other colours available";
album['collection1']['description'][15]="Ivory silk dress with beautifully structured bodice with sweetheart neckline and pleated detail. Full pick up skirt with detachable bow. <br>Available in other colours <br>Matching jacket available";
album['collection1']['description'][16]="Silk ball gown style dress with dropped waist and double layered gathered skirt in subtle contrasting colours. <br>Handmade silk flowers worn on bodice with Swarovski crystal centres. Contrasting sash worn at waist.<br>Other colours available";


album['collection2']['description']=new Array();
album['collection2']['description'][0]="#";
album['collection2']['description'][1]="Silk crepe dress in ivory with two layers of silk organza over skirt. Contrasting sash in dusty pink silk with handmade silk flower<br>Other colours available";
album['collection2']['description'][2]="Warm white silk dupion dress with corseted bodice skirt has side gather and gathered back that can bustle up two handmade silk roses in a contrasting colour are attached to the left hand side (detachable) dress is laced up at back <br>Other colours available";;
album['collection2']['description'][3]="Halter neck dress in ivory satin with full skirt. Bodice has dropped waist with handmade organza poppies with Swarovski crystal and freshwater pearl centres. The back of the dress laces up and has a poppy corsage that sits at the base of the back <br>Other colours available";
album['collection2']['description'][4]="Silk dress with crystal detail on bodice. Bodice back has lace up detail. The back skirt has bustle detail which can be let down to create a longer train. <br>Other colours available";
album['collection2']['description'][5]="Silk dupion fitted dress in ivory with small train. Front ruching and bow details at front and back <br>Other colours available";
album['collection2']['description'][6]="Deluxe silk bodice and skirt in pale pink. Fitted bodice has a chantilly lace overlay in ivory and is laced up at back-line skirt has ruched panel at front and back and has a handmade silk rose on left hip (detachable) skirt has no train. <br>Other colours available";
album['collection2']['description'][7]="Silk dupion dress with fitted bodice and double full skirt with train. Bodice has dropped waist, beaded and embroidered appliqu&eacute; across front and covered button detail at back. It is worn with a contrasting sash in deep gold silk<br>Other colours available";
album['collection2']['description'][8]="Silk dupion fishtail dress in champagne with ruched section at front and back in dusty pink covered buttons at side<br>Other colours available";
album['collection2']['description'][9]="1950's style dress with fitted bodice in silk dupion with French gold lace overlay. Full skirt has silk organza overlay lifted to the right hand side and secured with a Hand made silk rose in dusty pink. Contrasting sash worn around waist.<br>Other colours available";
album['collection2']['description'][10]="Silk fitted dress with large detachable bow. Low cut back detail. Sweepover detail at front and back<br>Other colours available";
album['collection2']['description'][11]="Deep red silk dress with embroidered and beaded bodice and full skirt with organza overlay. Handmade rose attached to skirt. <br>Available in ivory with gold embroidery and beading";
album['collection2']['description'][12]="Halter neck fishtail dress in silk dupion with contrasting ruched band around hips. Delicate beadwork in Swarovski crystal around neckline. Covered button detail at back<br>Other colours available";
album['collection2']['description'][13]="Fitted silk dress with mermaid style skirt. Pleated detail at front of dress. Covered button detail at back of dress.<br>Other colours available ";

album['collection3']['description']=new Array();
album['collection3']['description'][0]="#";
album['collection3']['description'][1]="1950's short spotty silk dress with deatchable bow detail.<br> Matching jacket available";
album['collection3']['description'][2]="1950's Ballgown dress with silk brocade bodice, full skirt with silk organza overlay. Worn with contrasting sash and handmade corsage.";
album['collection3']['description'][3]="Ivory silk dress with ruched bodice. Bow detail at back with Diamonte buckle. Matching jacket available.<br> Other colours available";
album['collection3']['description'][4]="Ivory silk spotty organza dress with lace trim at hem. Worn with contrasting sash and handmade corsage.<br> Matching jacket available";
album['collection3']['description'][5]="Ivory silk dress with lace and pleated detail on bodice. Full skirt with silk organza overlay.<br>Matching back fastening jacket available.";
album['collection3']['description'][6]="Ivory silk dress with pleated bodice and full skirt with silk organza overlay. Bow detail on bodice beaded with Swarovski crystals and pearls. <br>Other colours available";
album['collection3']['description'][7]="Pale pink silk dress with lace bodice.Draped skirt with bustle at the back and detachable bow detail. <br>Matching jacket available.Other colours available";
album['collection3']['description'][8]="Ivory silk bodice and skirt with ruched detailing. Detachable bow. Matching jacket available. <br>Other colours available";
album['collection3']['description'][9]="Ivory silk dress with ruched bodice, low back, Swarovski crystal straps and handmade flower corsage.<br>Matching jacket available<br>Other colours available";
album['collection3']['description'][10]="Ivory silk spotty organza dress with ruche detail<br>Matching jacket available";

album['collection4']['description']=new Array();
album['collection4']['description'][0]='#';
album['collection4']['description'][1]="French corded lace and tulle dress with full gathered tulle skirt. Detachable one shouldered strap with tulle ruffles and handmade silk organza and tulle flowers. Lace covered buttons at back with hidden inner corset.Also worn without strap and with French corded lace shrug.";
album['collection4']['description'][2]="Chantilly lace and silk organza dress. Bodice has soft cowl detail. Gathered Chantilly lace straps. Vintage inspired brooch detail at base of right strap. Full silk skirt with silk organza overlay. Contrasting sash detail. Chantilly lace covered buttons at back with hidden inner corset.";
album['collection4']['description'][3]="Silk organza dress with heavy corded French lace bodice. Silk lame band at waist with flat bow detail. Lace covered buttons at back with hidden inner corset.";
album['collection4']['description'][4]="Silk fitted dress with double pouf skirt. Lace appliqué detail on bodice. Silk covered buttons at back with hidden inner corset.";
album['collection4']['description'][5]="Strapless dress in silk lame with full tulle skirt. Vintage inspired flower and bead detail on bodice. Silk lame covered buttons at back with hidden inner corset.";
album['collection4']['description'][6]="Long line fitted silk bodice dress with heavy corded French lace overlay. Full gathered skirt in silk. Handmade silk roses attached to skirt (detachable). Covered buttons at back with hidden inner corset.";
album['collection4']['description'][7]="Silk dress with full skirt in silk with silk organza overlay. Scalloped beaded lace band at waist of bodice. Silk covered button detail and flat bow at back with hidden inner corset.";
album['collection4']['description'][8]="Silk fishtail dress with ruche detail. Vintage inspired flowers and bead detail. Lace up back detail.";
album['collection4']['description'][9]="Silk dress with silk organza detail on bodice and organza overlay over full silk skirt. Contrasting sash with beaded detail. Silk covered buttons at back.";
album['collection4']['description'][10]="One shouldered silk dress with silk organza overlay. Lace appliqué detail on bodice and over strap. Silk organza covered buttons at back with hidden inner corset.";
album['collection4']['description'][11]="Silk fitted dress to hip with full gathered silk skirt. Chantilly lace over longline silk bodice. Silk ruche detail across bust.  Handmade silk roses attached to skirt (detachable). Silk covered button detail at back with hidden inner corset.";
album['collection4']['description'][12]="One shouldered dress with silk organza overlay. Vintage inspired flower and bead detail. Organza and silk covered buttons at back with hidden inner corset.";
album['collection4']['description'][13]="1950’s style dress in silk lame with full gathered tulle skirt. Detachable handmade silk lame roses. Lame covered buttons at back with hidden inner corset.";

album['boho_chic']['description']=new Array();
album['boho_chic']['description'][0]="#";
album['boho_chic']['description'][1]="Hand made silk rose circlet. These beautiful roses are hand made using a mix of raw silk and silk organza. Other colours available.";
album['boho_chic']['description'][2]="Blossom inspired circlet hand made using Swarovski pearl and crystal flowers. Fabric flowers are also incorporated into the design.  The circlet is asymmetrical in design with a focal point to one side leading to a narrow design on the opposite side.";
album['boho_chic']['description'][3]="Flower and branch inspired hand made circlet. The design incorporates a mixture of Swarovski crystals, pearls and fabric flowers. The circlet has different designs both sides giving it points of interest from all angles.";
album['boho_chic']['description'][4]="Silver plated wire is plaited to form this circlet. The band has a sprinkling of Swarovski pearl and crystal flowers all around the band. Fabric flowers are also incorporated into the design.";
album['boho_chic']['description'][5]="Hand made silver plated circlet with blossom design in Swarovski pearls and crystal and fabric flowers.";
album['boho_chic']['description'][6]="Large flower daisy chain inspired circlet. Each of the large fabric flowers has a Swarovski crystal centre. Each of the flowers is separately linked giving the headpiece movement.";
album['boho_chic']['description'][7]="Small flower daisy chain inspired circlet. Each of the small fabric flowers has a Swarovski crystal centre. Each of the flowers is separately linked giving the headpiece movement.";

album['classic_elegance']['description']=new Array();
album['classic_elegance']['description'][0]="#";
album['classic_elegance']['description'][1]="Swarovski crystal flower and branch hair vine.  Each flower centre has a small diamonte. This headpiece is very flexible and can be worn in many ways. It has two mini combs to hold it in place.";
album['classic_elegance']['description'][2]="Clusters of Swarovski crystals in mixed sizes adorn the band giving this headpiece lots of depth.Available in other colours.";
album['classic_elegance']['description'][3]="Swarovski crystal and pearl clustered headpiece. This headpiece is beautiful for someone looking for something delicate yet effective.";
album['classic_elegance']['description'][4]="Clusters of Swarovski pearls in mixed sizes adorn the band, giving this headpiece lots of depth.";
album['classic_elegance']['description'][5]="Traditional style tiara hand made using Swarovski crystals and pearls.";
album['classic_elegance']['description'][6]="Swarovski crystal flowers and branches attached to a comb. This design is subtle yet effective. Also available on a headband.";
album['classic_elegance']['description'][7]="Double band clustered with Swarovski crystals and pearls.                     Also available in crystal only, pearl only or mixed.";
album['classic_elegance']['description'][8]="Double band covered with Swarovski crystals. Also available in pearl only and pearl and crystal mix.";
album['classic_elegance']['description'][9]="Band with side detail. Swarovski crystal and pearl flower and branch design. This design has a delicate feel to it.";

album['romance']['description']=new Array();
album['romance']['description'][0]="#";
album['romance']['description'][1]="Haircomb with three handmade silk roses in silk lame and silk organza.<br>Available in other colours.<br>Also available on a hair band";
album['romance']['description'][2]="Band with side detail. Swarovski crystal and pearl flower and branch design. The three flowers that are incorporated into this design have lots of depth against the delicate pearl and crystal branches.<br>Available in all crystal, all pearl or crystal and pearl mix.";
album['romance']['description'][3]="Flower design created using Swarovski crystals and pearls placed on the side of a band.<br>Available all crystal, all pearl or crystal and pearl mix.";
album['romance']['description'][4]="Swarovski crystal and pearl flower and branch design. This design is very effective with its trailing branches and delicate flower detail.";
album['romance']['description'][5]="Hand made flowers placed on the side of the band. This is design is simple yet very effective.<br>Also available on a comb.";
album['romance']['description'][6]="A cluster of three hand made roses in silk lame mixed with silk organza.<br>Other colours available.";

album['vintage_inspired']['description']=new Array();
album['vintage_inspired']['description'][0]="#";
album['vintage_inspired']['description'][1]="1920’s inspired asymmetrical headpiece. Sprays of Swarovski crystal and pearl adorn the band. The design is very intense on one side gradually going away to nothing at the opposite side.";
album['vintage_inspired']['description'][2]="Diamonte double flower and branch design. Branches are flexible and can be moved easily. This is a beautiful design and lies flat to the head giving it ultimate impact.";
album['vintage_inspired']['description'][3]="1920’s inspired Swarovski crystal, pearl and diamonte comb. This headpiece has an Art Deco feel to it. Also available.";
album['vintage_inspired']['description'][4]="Swarovski crystal, pearl and diamonte hair band. Subtle design yet very effective. Pearls and crystals weave around the diamonte beads.";
album['vintage_inspired']['description'][5]="Swarovski crystals and pearls make up this beautiful flower and branch design attached onto the side of a band.";

function getElement(specificElementName)
{
	elementName=specificElementName;
}

function loadGallery(element)
{	
	closeOthers(element);
	mainImagePane=document.getElementById('imageWindow');
	thumbPane=document.getElementById('thumbPane');
	if(element=="brides")
		var collections=document.getElementById('collections');
	else
		var collections=document.getElementById(element);
			
	collections.style.visibility="visible";
	collections.style.display="block";
		
	//if(element=="news")
	//{
	//	mainImagePane.innerHTML="";
	//}
	//else
	{
		mainImagePane.innerHTML="<div class='loadingImageWide'><img src='loading.gif'></div>";
		if(navigator.appName=="Microsoft Internet Explorer")
			mainImagePane.filters.alpha.opacity=0;
		else
			mainImagePane.style.opacity=0;
		mainImagePane.style.width='600px';
		thumbPane.style.display='none';
		
		if(element=="stockists")
		{
			collections.style.overflow="auto";
			collections.style.textAlign="center";
		}
		else if(element=="brides")
		{
			sub=document.getElementById('collSub');
			cont=document.getElementById('subMenuContent');
			cont.style.height='0px';
			sub.style.width='0px';
			sub.style.padding='7px';
			sub.style.paddingLeft='90px';
			cont.innerHTML="I would just like to say a huge big thank you to all of the brides that decided to choose a Leigh Hetherington wedding dress. It is a huge accolade to know that something that you have designed and made has been chosen to be worn on someone’s most special day.<br><br>Thank you for all of the beautiful photographs that have been sent to me.<br><br><img src='images/leigh_signature.jpg'>";
		}
		else if(element=="contact")
		{
			collections.style.textAlign="center";
		}
		else
		{
			sub=document.getElementById('collSub');
			cont=document.getElementById('subMenuContent');
			cont.style.height='0px';
			sub.style.width='0px';
			sub.style.padding='7px';
			sub.style.paddingLeft='90px';
			bringSubMenu(elementName);
		}
			
		setTimeout(function(){sidemainImagePane(element,'menu')},500);
	}
}

function closeOthers(menu)
{
	var elements=document.getElementsByClassName('innerContent');
	
	for(i=0;i<elements.length;i++)
	{
		if(elements[i].id!=menu)
		{
			elements[i].style.visibility="hidden";
			elements[i].style.display="none";
		}
	}
	
	if(cont)
	cont.innerHTML="";
	
	if(sub)
	sub.innerHTML="";

	return true;
}

function bringSubMenu(collection)
{
	sub.style.width='440px';
	
	if(collection=="" || collection=="collection1")	
	{
		alterContentArea('collection1');
		cont.innerHTML="<p>The 1950’s and 1930’s have a big influence on this collection. I have used a wide range of sumptuous fabrics for this collection.  Raw silk, silk organza, silk crepe backed satin, French lace, silk tulle that has an almost ethereal feel to it can be seen throughout the collection.</p><p>Many of the dresses in the collection have fitted and structured bodices with full skirts. We have incorporated pleating around the waist on some of the dresses this will really bring in the waist of the bride. Inner corsetry is hidden within the dresses allowing the bride to feel fabulous on her wedding day.</p><p>Corsages were very popular in the 1950’s. These can be seen on several of our dresses. These are beautifully hand made in silk fabrics and are made to look authentic with vintage appeal. 1950’s necklines can be seen throughout the collection, the strapless neckline, the halter neck and the slash neckline.</p><p>The Ava dress with all of the glamour of the 1930’s would not be out of place on the red carpet.</p><p>To compliment our dresses we have a range of beautifully cut bolero jackets.</p>";
	}
	else if(collection=="collection2")	
	{
		alterContentArea('collection2');
		cont.innerHTML="<p>I wanted to produce a collection that was still very bridal but slightly different. I chose to use a very soft palette of colours. Golds, coffees, taupes, soft pinks,dusky pinks and  contrasting  rich deep reds can be seen throughout the collection (all of the dresses are available in white/ivory).<p> <p>There are elements of the 1930’s and 1950’s throughout the collection. Very structured and full skirted dresses, fishtail dresses, double tiered skirts in contrasting colours can be seen within this collection.</p><p> The dresses have very clean lines with subtle detailing whether it be delicate beadwork in Swarovski crystals, bow details or beautiful handmade silk roses made from the fabrics of the dresses. I have used raw silk, silk organza, Chantilly lace and metallic lace throughout this collection.</p>";
		}
	else if(collection=="collection3")	
	{
		alterContentArea('collection3');
		cont.innerHTML="<p>Renowned for my full skirted dresses I hope this collection does not disappoint. Beautifully cut and structured these dresses are a must to try on. For something a little different I chose to use an embroidered spot organza for several of my dresses. This fabric is truly magical. Polka dots are very classical and something that never dates.</p><p>To compliment this fabric I have put contrasting silk sashes with handmade flower corsages with Swarovski crystal detailing, apron style ruched skirt overlays and big bows. If spots are not for you the spotted organza can be replaced with a plain organza.</p><p> Big bows are often featured throughout our collections, but if you are looking for a dramatic bow and back detail then look no further than Dianna, this is a truly beautiful feature and has a diamonte buckle centre for a little sparkle. Catherine’s beautiful silk brocade bodice with cuff detail and full sweeping skirt is reminiscent of the 1950’s.</p><p>Most of the full skirted dresses can come in a shorter 1950’s length (see the Audrey dress). Please contact us if this is required.</p>";
	}
	else if(collection=="collection4")	
	{
		alterContentArea('collection4');
		cont.innerHTML="<p>This wedding dress collection has a vintage and romantic feel to it. I have used an eclectic mix of beautiful fabrics. For a romantic feel I have used soft tulle overlays and delicate lace fabrics. The silk Lame fabric I have used is reminiscent of the 1950’s.</p><p> Large tea roses have been made in matching silk fabrics to adorn the dresses. Silk chiffon roses that have been made in Paris especially for our dresses, mixed with some vintage inspired beadwork give a shabby chic feel to some of the wedding dresses.</p><p> I have introduced new shapes into this collection. The slim long line bodice of the Cleo dress with its dramatic double pouf skirt is definitely a show stopper. Dresses with full frothy skirts of tulle giving the ultimate feel of romance. The elegant one shoulder features of Roma, Natalia and Annabel (detachable).</p><p>Our dresses have hidden corsetry giving the ultimate shape and fit to the bride. The wedding dresses need to be tried on to appreciate the luxuriousness of the fabrics and the fit of the designs.</p>";
	}
	else if(collection=="boho_chic")
	{
		alterContentArea('boho_chic');
		cont.innerHTML="<p>Leigh Hetherington designs and creates beautiful headpieces using Swarovski crystals, Swarovski pearls, faux pearls, diamonte, fabric flowers and handmade silk roses.</p><p> Taking inspiration from flowers and foliage to different decades in history from 1920’s Art Deco to Bohemian Chic from the 1970’s. </p><p>Each piece is individually hand made. Pieces can be adjusted to suit the wearer and customised. Many of the pieces can be made to go onto a hair band or a comb. </p><p>Hairbands can come in either silver or gold metal or the wearer can have the band covered to blend in with their hair colour. </p><p>We can colour match pearls, crystals and fabrics for roses and flowers. </p><p>A full bespoke service is also available.</p>";
	}
	else if(collection=="classic_elegance")
	{
		alterContentArea('classic_elegance');
		cont.innerHTML="<p>Leigh Hetherington designs and creates beautiful headpieces using Swarovski crystals, Swarovski pearls, faux pearls, diamonte, fabric flowers and handmade silk roses.</p><p> Taking inspiration from flowers and foliage to different decades in history from 1920’s Art Deco to Bohemian Chic from the 1970’s. </p><p>Each piece is individually hand made. Pieces can be adjusted to suit the wearer and customised. Many of the pieces can be made to go onto a hair band or a comb. </p><p>Hairbands can come in either silver or gold metal or the wearer can have the band covered to blend in with their hair colour. </p><p>We can colour match pearls, crystals and fabrics for roses and flowers. </p><p>A full bespoke service is also available.</p>";
	}
	else if(collection=="romance")
	{
		alterContentArea('romance');
		cont.innerHTML="<p>Leigh Hetherington designs and creates beautiful headpieces using Swarovski crystals, Swarovski pearls, faux pearls, diamonte, fabric flowers and handmade silk roses.</p><p> Taking inspiration from flowers and foliage to different decades in history from 1920’s Art Deco to Bohemian Chic from the 1970’s. </p><p>Each piece is individually hand made. Pieces can be adjusted to suit the wearer and customised. Many of the pieces can be made to go onto a hair band or a comb. </p><p>Hairbands can come in either silver or gold metal or the wearer can have the band covered to blend in with their hair colour. </p><p>We can colour match pearls, crystals and fabrics for roses and flowers. </p><p>A full bespoke service is also available.</p>";
	}
	else if(collection=="vintage_inspired")
	{
		alterContentArea('vintage_inspired');
		cont.innerHTML="<p>Leigh Hetherington designs and creates beautiful headpieces using Swarovski crystals, Swarovski pearls, faux pearls, diamonte, fabric flowers and handmade silk roses.</p><p> Taking inspiration from flowers and foliage to different decades in history from 1920’s Art Deco to Bohemian Chic from the 1970’s. </p><p>Each piece is individually hand made. Pieces can be adjusted to suit the wearer and customised. Many of the pieces can be made to go onto a hair band or a comb. </p><p>Hairbands can come in either silver or gold metal or the wearer can have the band covered to blend in with their hair colour. </p><p>We can colour match pearls, crystals and fabrics for roses and flowers. </p><p>A full bespoke service is also available.</p>";
	}
}

function sidemainImagePane(element,position)
{
	if(position=="menu")
	{
		if(element=="brides")
			mainImagePane.innerHTML=alterContentArea('brides');
		else if(element=="profile")
			mainImagePane.innerHTML="<img src='images/profile_home.jpg'>";
		else if(element=="designer")
			mainImagePane.innerHTML="<img src='images/designer_profile.jpg'>";
		else if(element=="thankyou")
			mainImagePane.innerHTML="<img src='images/thankyou.jpg'>";
		else if(element=="contact")
			mainImagePane.innerHTML="<img src='images/contact.jpg'>";
		else if(element=="stockists")
			mainImagePane.innerHTML="<img src='images/stockists.jpg'>";
		else if(element=="designerDays")
			mainImagePane.innerHTML="<img src='images/profile_home.jpg'>";
		else if(element=="news")
			mainImagePane.innerHTML="<img src='images/profile_home.jpg'>";
		else if(element=="boutique")
			mainImagePane.innerHTML="<img src='images/shop-interior.jpg'>";
	}
	
	smoothTransition();
}

function smoothTransition()
{
	if(navigator.appName=="Microsoft Internet Explorer")
	{
		mainImagePane.filters.alpha.opacity=parseFloat(mainImagePane.filters.alpha.opacity) + 20;
			
		if(parseFloat(mainImagePane.filters.alpha.opacity)!=100)
			var tt=setTimeout(function(){smoothTransition()},100);
	}
	else
	{
		mainImagePane.style.opacity=parseFloat(mainImagePane.style.opacity) + 0.2;
			
		if(parseFloat(mainImagePane.style.opacity)!=1)
			var tt=setTimeout(function(){smoothTransition()},100);
	}
}

function alterContentArea(collection)
{
	if(collection!='brides')
	{
		//bringSubMenu(collection);
		var subMenuSelection=document.getElementById(collection);
		if(subMenuSelection)
		subMenuSelection.style.color="white";
	}
	thumbPane.style.display='none';
	mainImagePane.innerHTML="";
	mainImagePane.style.width="600px";
	
	var a="";
	var b="";
	a+="<br>";
	
	if(collection=="collection5")
	{
		mainImagePane.innerHTML="<div style='font-size:15px; width:550px; padding:17px;'><p>Leigh Hetherington designs and creates beautiful headpieces using Swarovski crystals, Swarovski pearls, faux pearls, diamonte, fabric flowers and handmade silk roses.</p><p> Taking inspiration from flowers and foliage to different decades in history from 1920’s Art Deco to Bohemian Chic from the 1970’s. </p><p>Each piece is individually hand made. Pieces can be adjusted to suit the wearer and customised. Many of the pieces can be made to go onto a hair band or a comb. </p><p>Hairbands can come in either silver or gold metal or the wearer can have the band covered to blend in with their hair colour. </p><p>We can colour match pearls, crystals and fabrics for roses and flowers. </p><p>A full bespoke service is also available.</p></div>";
	}
	else
	{
		for(i=1;i<album[collection].length;i++)
		{
			if(i % 6==1)
			{
				if(navigator.appName=="Microsoft Internet Explorer")
				{
					var j=i/6;
					j=Math.floor(j);
					j=j*170;
					a+="<table style='position:absolute; top:"+j+"px' cellspacing='9' align='left'><tr>";
					b+="<tr>";
				}
				else
				{
					a+="<table cellspacing='9' align='left'><tr>";
					b+="<tr>";
				}
			}
			
			var str=album[collection][i][0];
			str = str.slice(0,1).toUpperCase() + str.slice(1);
			
			a+="<td><img id='"+i+"' name='"+collection+"' alt='"+album[collection][i][0]+"' src='"+collection+"/thumbs/large/"+album[collection][i][0]+"01.jpg' onclick='showCollection(this);'></td>";
			b+="<td width='50px' align='center' class='tipText'>"+str+"</td>"
					
			if(i % 6==0 || i==album[collection].length-1)
			{
				a+="</tr>";
				b+="</tr></table>";
				mainImagePane.innerHTML+=a+b;
				a="";
				b="";
			}
		}
	}
	
	if(navigator.appName=="Microsoft Internet Explorer")
		mainImagePane.filters.alpha.opacity=0;
	else
		mainImagePane.style.opacity=0;
	setTimeout(function(){smoothTransition()},500);
	var z=mainImagePane.innerHTML;
	return z;
}

function showCollection(image)
{
	var subMenuContent=document.getElementById('subMenuContent');
	subMenuContent.innerHTML="";
	var temp="";
	temp="<table width='40%' cellspacing='9' align='center' border='0'><tr>";
	for(i=1;i<=album[image.name][image.id][1];i++)
	{
		temp+="<td><img name='"+image.name+"' id='"+album[image.name][image.id][0]+"0"+i+"' src='"+image.name+"/thumbs/large/"+album[image.name][image.id][0]+"0"+i+".jpg' onclick='showImageInPane(this);'></td>";
		var brideName=album[image.name][image.id][0];
	}
	
	if(image.name!='brides')
		temp+="</tr></table><table width='100%'><tr><td colspan='3' align='center'><div style='display:block; height:75px; width:250px;'><img src='"+image.name+"/names/"+album[image.name][image.id][0]+".jpg'></div></td></tr><tr><td colspan='3' align='center'>"+album[image.name]['description'][image.id]+"</td></tr></table>";
	else
		temp+="</tr></table><table width='100%'><tr><td colspan='3' align='center'>"+brideName+"</td></tr></table>";
	
	subMenuContent.innerHTML=temp;
	
	showCollectionGallery(image);
}

function showCollectionGallery(collection)
{
	mainImagePane.innerHTML="<div class='loadingImage'><img src='loading.gif'></div>";
	if(navigator.appName=="Microsoft Internet Explorer")
		mainImagePane.filters.alpha.opacity=0;
	else
		mainImagePane.style.opacity=0;
	setTimeout(function(){sidemainImagePane('collections','internal')},500);
	var X="";
	thumbPane.style.display='block';
	
	for(i=1;i<album[collection.name].length;i++)
	{
		X+="<span id='thumbCast"+i+"' class='smallThumbNails'><img id='"+i+"' name='"+collection.name+"' src='"+collection.name+"/thumbs/small/"+album[collection.name][i][0]+"01.jpg' onclick=showCollection(this);highlightImage('thumbCast"+i+"');></span>";
	}
	
	thumbPane.innerHTML=X;
	mainImagePane.style.width='400px';
	mainImagePane.style.height='538px';
	mainImagePane.style.display='block';
	mainImagePane.innerHTML="<img src='"+collection.name+"/previews/"+album[collection.name][collection.id][0]+"01.jpg'>";
	var thumbCast="thumbCast"+collection.id;
	highlightImage(thumbCast);
}

function highlightImage(image)
{
	var thumbCast=document.getElementById(image);
	globPrevDataFrame=thumbCast;
	//alert(globPrevDataFrame.id);
	if(navigator.appName=="Microsoft Internet Explorer")
		thumbCast.filters.alpha.opacity=100;
	else
	{
		//if(globPrevDataFrame && globPrevDataFrame!=thumbCast)
			//globPrevDataFrame.style.opacity=0.4;
				
		thumbCast.style.opacity=1;
		
	}
	//globPrevDataFrame=thumbCast;
}

function showImageInPane(image)
{
	setTimeout(function(){sidemainImagePane('collections','internal')},1000);
	mainImagePane.innerHTML="<img src='"+image.name+"/previews/"+image.id+".jpg'>";
}

function readXML(newsId)
{
	if (window.XMLHttpRequest)
	{// code for IE7+, Firefox, Chrome, Opera, Safari
		xmlhttp=new XMLHttpRequest();
	}
	else
	{// code for IE6, IE5
		xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
	}
	xmlhttp.open("GET","news.xml",false);
	xmlhttp.send();
	xmlDoc=xmlhttp.responseXML; 
	var newsList="";
	newsList+="<table border='0' cellpadding='5'>";
	var x=xmlDoc.getElementsByTagName("story");
	var j=0;
	var thumbnail="";
	if(newsId!=undefined)
	{
		var loopStart=newsId;
		var loopLimit=parseInt(newsId) + 1;
	}
	else
	{
		var loopStart=0;
		var loopLimit=x.length;
	}

	for (i=loopStart;i<loopLimit;i++)
	{ 
		//alert(newsId);
		j++;
		if(newsId!=undefined)
		{
			k=i+1;
			optionalNewsList+="<tr>";
			optionalNewsList+="<td colspan=3>" + x[i].getElementsByTagName("details")[0].childNodes[0].nodeValue + "</td>";
			optionalNewsList+="</tr>";			
			readOptions="<td><a href='javascript:void(0);' style='text-decoration:none;' id='readAll' onClick=readXML();loadGallery('news');>Show All</a></td>"
			mainImagePane.innerHTML="<img id='1' name='news1' src='news/previews/"+k+"/1.jpg'>"
		}
		else
		{
			optionalNewsList="";
			readOptions="<td><a href='javascript:void(0);' style='text-decoration:none;' id='readOne' onClick='readXML("+i+")'>Read More</a></td>"
			thumbPane.style.display = "none";
		}
		newsList+="<tr>";
		newsList+="<td>" + x[i].getElementsByTagName("title")[0].childNodes[0].nodeValue + "</td>";
		newsList+=readOptions;
		newsList+="</tr>";
		newsList+="<tr>";
		newsList+="<td>" + x[i].getElementsByTagName("date")[0].childNodes[0].nodeValue + "</td>";
		newsList+="</tr>";
		newsList+=optionalNewsList;		
		
		var id= x[i].getElementsByTagName("item")[0].childNodes[0].nodeValue;
		var noOfImages= x[i].getElementsByTagName("images")[0].childNodes[0].nodeValue;
		//alert(noOfImages);
		
		if(newsId!=undefined)
		{	
			thumbnail=getNewsThumbs(id,noOfImages);
			thumbPane.style.display = "block";
			mainImagePane.style.width = "400px";
			thumbPane.innerHTML=thumbnail;
			highlightNewsImage('thumbCast1');
		}
	}
	newsList+="</table>";
	
	var n=document.getElementById("news");
	
	document.getElementById("news").innerHTML=newsList;
	
}	

function getNewsThumbs(id,noOfImages)
{
	var thumbnail="";
	var a="";
	for(k=1;k<=noOfImages;k++)
	{
		thumbnail+="<span id='thumbCast"+k+"' class='smallThumbNails'><img id='"+k+"' name='news"+k+"' src='news/thumbs/"+id+"/"+k+".jpg' onclick=showNewsImage("+id+","+k+");highlightNewsImage('thumbCast"+k+"');></span>";
	}
	
	return thumbnail;
}

function showNewsImage(id,imageNo)
{
	mainImagePane.innerHTML="<div style='background:red; width:400px'>dsdsds</div>"
	mainImagePane.innerHTML="<img id='"+imageNo+"' name='news"+imageNo+"' src='news/previews/"+id+"/"+imageNo+".jpg'>"
	smoothTransition();
}

function highlightNewsImage(image)
{
	var thumbCast=document.getElementById(image);
	if(navigator.appName=="Microsoft Internet Explorer")
	{
		if(globPrevNewsImage && globPrevNewsImage!=thumbCast)
		{
			//alert(globPrevNewsImage);
			globPrevNewsImage.filters.alpha.opacity=40;
		}
		
		thumbCast.filters.alpha.opacity=100;
	}
	else
	{
		if(globPrevNewsImage && globPrevNewsImage!=thumbCast)
			globPrevNewsImage.style.opacity=0.4;
				
		thumbCast.style.opacity=1;
		
	}
	globPrevNewsImage=thumbCast;
}

function showSubMenu(subMenu,yesOrNo)
{
	var getAllMenu=document.getElementsByClassName("mainSubMenu");
	
	if(yesOrNo=="yes")
	{
		var subMenuObject=document.getElementById(subMenu);
		for(var i=0;i<getAllMenu.length;i++)
		{
			if(getAllMenu[i].style.display=="block" || getAllMenu[i].style.display=="")
				getAllMenu[i].style.display="none";
		}
		
		subMenuObject.style.display="block";
	}
	else
	{
		for(var i=0;i<getAllMenu.length;i++)
		{
			getAllMenu[i].style.display="none";
		}
	}
}
