/*================================================*
*
*	Drop Down Navigation for La Redoute.co.uk
*	Version 4 created 10/06/09
*	Last Modified 06/11/09 by J. Fallon
*
*================================================*/

// Store the sign in message so that it can be replaced when drop downs are hidden
if(document.getElementById('LAR_genericLoggedOutHeader'))
	var defSignIn=document.getElementById('LAR_genericLoggedOutHeader').innerHTML;

// If the pageIndicator exists then store a reference to it so that it can be hidden.
if(document.getElementById('ctl00_MainContentAreaPlaceHolder_CategoryList_Template21_XsltPagerProduct_pageNumberDiv') != null)
	var pageIndicator = document.getElementById('ctl00_MainContentAreaPlaceHolder_CategoryList_Template21_XsltPagerProduct_pageNumberDiv').parentNode;
else
	var pageIndicator = null;
	
function newNavIni(tab){	
	if(tab!=null){
		// Insert the drop down HTML into the page in place of the login message
		document.getElementById('LAR_genericLoggedOutHeader').innerHTML = tab;

		// Hide the page indicator which may intefer with the working of the drop downs
		if(pageIndicator!=null)
			pageIndicator.style.visibility ='hidden';
	}
	else {
		navReset();
	}
}

function navReset(){
	// This function hides the drop down menus and puts the login message back in its place
	
	// Insert the login message HTML back into the page in place of the drop down.
	document.getElementById('LAR_genericLoggedOutHeader').innerHTML = defSignIn;
	
	// Ensure the page indicators are visible again
	if(pageIndicator!=null)
			pageIndicator.style.visibility='visible';
			
	// If the Our Shops menu is displayed hide it too
	if(document.getElementById('ourShopsDD')!=null)
		document.getElementById('ourShopsDD').style.display ='none';
	
}

function showOurShops(){
	// Display the Our Shops drop down
	document.getElementById('ourShopsDD').style.display ='block';
	// Hide the page indicator which may intefer with the working of the drop downs
	if(pageIndicator!=null)
			pageIndicator.style.visibility ='hidden';
}


// Apply the navReset function to the header and content containers so that if the user takes their mouse off the menus they are reset
if(document.getElementById('mainheader')){
	document.getElementById('mainheader').onmouseover=navReset;
	document.getElementById('content').onmouseover=navReset;
}


// Below is the HTML for each of the different drop down menus.
var newInLnk='<div class="subnav-bar"><ul class="secondTier"><li class="nav-top"><div><a title="women" href="/clothing/New-In.aspx?CategoryId=50873961&Path=50873961/51011752&ChmCatId=51011752">Women</a></div></li><li class="nav-top"><div><a title="men" href="/clothing/New-In.aspx?CategoryId=50873961&Path=50873961/51011824&ChmCatId=51011824">Men</a></div></li><li class="nav-top"><div><a title="children" href="/clothing/New-In.aspx?CategoryId=50873961&Path=50873961/51011993&ChmCatId=51011993">Children</a></div></li></ul></div>';
var womenLnk='<div class="subnav-bar"><ul class="secondTier cramped"><li class="nav-top"><div><a title="New In" href="/clothing/New-In.aspx?CategoryId=61045377&Path=61026618/61045377&ChmCatId=61045377">New In</a></div></li><li class="nav-top"><div><a href="/clothing/Tops.aspx?CategoryId=61045378&Path=61026618/61045377/61045378&ChmCatId=61045378" title="Tops" >Tops</a></div></li><li class="nav-top"><div><a href="/clothing/Shirts-Blouses.aspx?CategoryId=61028888&Path=61026618/61028888&ChmCatId=61028888" title="Shirts &amp; Blouses" >Shirts</a></div></li><li class="nav-top"><div><a href="/clothing/Knitwear.aspx?CategoryId=61030394&Path=61026618/61030394&ChmCatId=61030394" title="Knitwear" >Knitwear</a></div></li><li class="nav-top"><div><a href="/clothing/Trousers-Cropped-Trousers.aspx?CategoryId=61031479&Path=61026618/61031479&ChmCatId=61031479" title="Trousers &amp; Cropped Trousers" >Trousers</a></div></li><li class="nav-top" id=""><div><a href="/clothing/Jeans.aspx?CategoryId=61032587&Path=61026618/61032587&ChmCatId=61032587" title="Jeans" >Jeans</a></div></li><li class="nav-top"><div><a href="/clothing/Skirts.aspx?CategoryId=61033219&Path=61026618/61033219&ChmCatId=61033219" title="Skirts" >Skirts</a></div></li><li class="nav-top"><div><a href="/clothing/Dresses.aspx?CategoryId=61033616&Path=61026618/61033616&ChmCatId=61033616" title="Dresses" >Dresses</a></div></li><li class="nav-top"><div><a href="/clothing/Jackets-Coats.aspx?CategoryId=61034338&Path=61026618/61034338&ChmCatId=61034338" title="Jackets &amp; Coats" >Jackets &amp; Coats</a></div></li><li class="nav-top"><div><a href="/clothing/Swimwear.aspx?CategoryId=61034991&Path=61026618/61034991&ChmCatId=61034991" title="Swimwear" >Swimwear</a></div></li><li class="nav-top"><div><a href="/clothing/Shoes.aspx?CategoryId=61035209&Path=61026618/61035209&ChmCatId=61035209" title="Shoes" >Shoes</a></div></li><li class="nav-top"><div><a href="/clothing/Accessories.aspx?CategoryId=61035731&Path=61026618/61035731&ChmCatId=61035731" title="Accessories" >Accessories</a></div></li><li class="nav-top"><div><a href="/clothing/Sportswear.aspx?CategoryId=61026618&&Path=61026618/61036254&&ChmCatId=61036254" title="Sportswear" >Sports</a></div></li><li class="nav-top"><div><a href="/clothing/Maternity.aspx?CategoryId=61036885&Path=61026618/61036885&ChmCatId=61036885" title="Maternity" >Maternity</a></div></li><li class="nav-top"><div><a href="/clothing/Plus-Size.aspx?CategoryId=61036995&Path=61026618/61036995&ChmCatId=61036995" title="Plus Size" >Plus Size</a></div></li></ul></div>';
var lingerieLnk='<div class="subnav-bar"><ul class="secondTier"><li class="nav-top"><div><a title="Bras" href="/clothing/Bras.aspx?CategoryId=17513341">Bras</a></div></li><li class="nav-top"><div><a title="Knickers & Briefs" href="/clothing/Knickers-Briefs.aspx?CategoryId=17513390">Knickers &amp; Briefs</a></div></li><li class="nav-top"><div><a title="Tops" href="/clothing/Tops.aspx?CategoryId=17513415">Tops</a></div></li><li class="nav-top"><div><a title="Stockings and Socks" href="/clothing/Stockings-Socks.aspx?CategoryId=17513443">Stockings &amp; Socks</a></div></li><li class="nav-top"><div><a title="Nightwear" href="/clothing/Nightwear.aspx?CategoryId=17513465">Nightwear</a></div></li><li class="nav-top"><div><a title="Sexy" href="/clothing/Sexy.aspx?CategoryId=17513491">Sexy</a></div></li><li class="nav-top"><div><a title="Mum-to-be" href="/clothing/Mum-to-be.aspx?CategoryId=17513516">Mum-to-be</a></div></li></ul></div>';
var plusSizeLnk='<div class="subnav-bar"><ul class="secondTier"><!--<li class="nav-top"><div><a title="New In" href="/clothing/New-In.aspx?CategoryId=61028325&Path=61028324/61028325&ChmCatId=61028325">New In</a></div></li>--><li class="nav-top"><div><a title="Tops" href="/clothing/Tops.aspx?CategoryId=61028327&Path=61028324/61028327&ChmCatId=61028327">Tops</a></div></li><li class="nav-top"><div><a title="Shirts &amp; Blouses" href="/clothing/Shirts-Blouses.aspx?CategoryId=61028811&Path=61028324/61028811&ChmCatId=61028811">Shirts</a></div></li><li class="nav-top"><div><a title="Knitwear" href="/clothing/Knitwear.aspx?CategoryId=61029050&Path=61028324/61029050&ChmCatId=61029050">Knitwear</a></div></li><li class="nav-top"><div><a title="Trousers, Jeans &amp; Shorts" href="/clothing/Trousers-Jeans-Shorts.aspx?CategoryId=61029903&Path=61028324/61029903&ChmCatId=61029903">Trousers &amp; Jeans</a></div></li><li class="nav-top"><div><a title="Jackets &amp; Coats" href="/clothing/Jackets-Coats.aspx?CategoryId=61030551&Path=61028324/61030551&ChmCatId=61030551">Jackets &amp; Coats</a></div></li><li class="nav-top"><div><a title="Tailoring" href="/clothing/Tailoring.aspx?CategoryId=61030848&Path=61028324/61030848&ChmCatId=61030848">Tailoring</a></div></li><li class="nav-top"><div><a title="Lingerie &amp; Nightwear" href="/clothing/Lingerie-Nightwear.aspx?CategoryId=61030935&Path=61028324/61030935&ChmCatId=61030935">Lingerie</a></div></li><li class="nav-top"><div><a title="Swimwear" href="/clothing/Swimwear.aspx?CategoryId=61032247&Path=61028324/61032247&ChmCatId=61032247">Swimwear</a></div></li><li class="nav-top"><div><a title="Shoes" href="/clothing/Shoes.aspx?CategoryId=61032318&Path=61028324/61032318&ChmCatId=61032318">Shoes</a></div></li><li class="nav-top"><div><a title="Accessories" href="/clothing/Accessories.aspx?CategoryId=61032574&Path=61028324/61032574&ChmCatId=61032574">Accessories</a></div></li><li onmouseout="delayedHide(this);" onmouseover="showSub(this);" class="nav-top"><div><a title="Men" href="/clothing/Men.aspx?CategoryId=61032800&Path=61028324/61032800&ChmCatId=61032800">Men</a></div></li></ul></div>';
var childrensLnk='<div class="subnav-bar"><ul class="secondTier"><li class="nav-top"><div><a href="/clothing/New-In.aspx?CategoryId=61048316&Path=61040674/61048316&ChmCatId=61048316" title="New In">New In</a></div></li><li class="nav-top"><div><a href="/clothing/Nursery.aspx?CategoryId=61040674&&Path=61040674/61041157&&ChmCatId=61041157" title="Nursery">Nursery</a></div></li><li class="nav-top"><div><a href="/clothing/Baby-Girl-0-to-4.aspx?CategoryId=61041165&Path=61040674/61041165&ChmCatId=61041165" title="Baby Girl 0-4">Baby Girl 0-4</a></div></li><li class="nav-top"><div><a href="/clothing/Baby-Boy-0-to-4.aspx?CategoryId=61041537&Path=61040674/61041537&ChmCatId=61041537" title="Baby Boy 0-4">Baby Boy 0-4</a></div></li><li class="nav-top"><div><a href="/clothing/Girls-2-to-12.aspx?CategoryId=61041845&Path=61040674/61041845&ChmCatId=61041845" title="Girls 2-12">Girls 2-12</a></div></li><li class="nav-top" ><div><a href="/clothing/Boys-2-to-12.aspx?CategoryId=61042413&Path=61040674/61042413&ChmCatId=61042413" title="Boys 2-12">Boys 2-12</a></div></li><li class="nav-top"><div><a href="/clothing/Girls-10-to-18.aspx?CategoryId=61042880&Path=61040674/61042880&ChmCatId=61042880" title="Girls 10-18">Girls 10-18</a></div></li><li class="nav-top"><div><a href="/clothing/Boys-10-to-18.aspx?CategoryId=61043446&Path=61040674/61043446&ChmCatId=61043446" title="Boys 10-18">Boys 10-18</a></div></li></ul></div>';
var menLnk='<div class="subnav-bar"><ul class="secondTier"><li class="nav-top"><div><a title="New In" href="/clothing/New-In.aspx?CategoryId=51032559">New In</a></div></li><li class="nav-top"><div><a title="Shoes" href="/clothing/Shoes.aspx?CategoryId=17514260">Shoes</a></div></li><li class="nav-top"><div><a title="Accessories" href="/clothing/Accessories.aspx?CategoryId=17514216">Accessories</a></div></li><li class="nav-top"><div><a title="T-shirts" href="/clothing/T-shirts.aspx?CategoryId=17514311">T-shirts</a></div></li><li class="nav-top"><div><a title="Sweaters" href="/clothing/Sweaters.aspx?CategoryId=17514390">Sweaters</a></div></li><li class="nav-top"><div><a title="Shirts" href="/clothing/Shirts.aspx?CategoryId=17514359">Shirts</a></div></li><li class="nav-top"><div><a title="Trousers" href="/clothing/Trousers.aspx?CategoryId=17514418">Trousers</a></div></li><li class="nav-top"><div><a title="Suits & Jackets" href="/clothing/Suits-Jackets.aspx?CategoryId=17514456">Suits &amp; Jackets</a></div></li><li class="nav-top"><div><a title="Coats" href="/clothing/Coats.aspx?CategoryId=17514489">Coats</a></div></li><li class="nav-top"><div><a title="Swimwear" href="/clothing/Swimwear.aspx?CategoryId=17514285">Swimwear</a></div></li><li class="nav-top"><div><a title="Underwear" href="/clothing/Underwear.aspx?CategoryId=17514522">Underwear</a></div></li><li class="nav-top"><div><a title="Sportswear" href="/clothing/Sportswear.aspx?CategoryId=17512781&Path=17512781/54723015&ChmCatId=54723015">Sportswear</a></div></li></ul></div>';
var homewareLnk='<div class="subnav-bar"><ul class="secondTier"><li class="nav-top"><div><a title="Textiles" href="/clothing/Textiles.aspx?CategoryId=17535628">Textiles</a></div></li><li class="nav-top"><div><a title="Decorative" href="/clothing/Decorative.aspx?CategoryId=17535922">Decorative</a></div></li><li class="nav-top"><div><a title="Furniture" href="/clothing/Furniture.aspx?CategoryId=17536323">Furniture</a></div></li></ul></div>';
var vertbaudetLnk='<div class="subnav-bar"><ul class="secondTier"><li class="nav-top" id=""><div><a title="Maternity" href="/clothing/Maternity.aspx?CategoryId=2&&Path=2/10986&&ChmCatId=10986">Maternity</a></div></li><li class="nav-top"><div><a title="Nursery" href="/clothing/Nursery.aspx?CategoryId=2&Path=2/11053&ChmCatId=11053">Nursery</a></div></li><li class="nav-top"><div><a title="Newborn" href="/clothing/Newborn.aspx?CategoryId=2&&Path=2/13281&&ChmCatId=13281">Newborn</a></div></li><li class="nav-top"><div><a title="Baby Girl" href="/clothing/Baby-Girl.aspx?CategoryId=2&&Path=2/13266&&ChmCatId=13266">Baby Girl</a></div></li><li class="nav-top"><div><a title="Baby Boy" href="/clothing/Baby-Boy.aspx?CategoryId=2&&Path=2/13252&&ChmCatId=13252">Baby Boy</a></div></li><li class="nav-top"><div><a title="Girls" href="/clothing/Girls.aspx?CategoryId=2&&Path=2/11011&&ChmCatId=11011">Girls</a></div></li><li class="nav-top"><div><a title="Boys" href="/clothing/Boys.aspx?CategoryId=2&&Path=2/11025&&ChmCatId=11025">Boys</a></div></li><li class="nav-top"><div><a title="Homes Collection" href="/clothing/Homes-collection.aspx?CategoryId=2&&Path=2/11037&&ChmCatId=11037">Homes Collection</a></div></li></ul></div>';
var saleLnk='<div class="subnav-bar saleNav"><ul class="secondTier"><li class="nav-top"><div><a title="Women" href="/clothing/Women.aspx?CategoryId=54136964&Path=54136964/54137001&ChmCatId=54137001">Women</a></div></li><li class="nav-top"><div><a title="Men" href="/clothing/Men.aspx?CategoryId=54136964&Path=54136964/54137015&ChmCatId=54137015">Men</a></div></li><li class="nav-top"><div><a title="Children" href="/clothing/Children.aspx?CategoryId=54136964&Path=54136964/54137027&ChmCatId=54137027">Children</a></div></li><li class="nav-top"><div><a title="Homeware" href="/clothing/Homeware.aspx?CategoryId=54136964&Path=54136964/54137030&ChmCatId=54137030">Homeware</a></div></li></ul></div>';
var ourShopsLnk='<div class="subnav-bar" id="ourShopsDD"><ul><li><a title="Vertbaudet" href="/clothes/Vertbaudet.aspx?CategoryId=2&Path=2&ChmCatId=2" id="vertbaudetDD"></a></li><li><a title="Taillissime" href="/shop/Taillisssime.aspx?CategoryId=63381344&Path=63381344&ChmCatId=63381344" id="taillissimeDD"></a></li><li><a title="Somewhere" href="/shop/SOMEWHERE.aspx?CategoryId=63619763&Path=63619763&ChmCatId=63619763" id="somewhereDD"></a></li><li><a title="AM-PM" href="/shop/AM-PM-SS09.aspx?CategoryId=60832352&Path=60832352&ChmCatId=60832352" id="ampmDD"></a></li><li><a title="Ellos" href="/shop/Ellos.aspx?CategoryId=64404023&Path=64404023&ChmCatId=64404023" id="ellosDD"></a></li></ul></div>';