// JavaScript Document

/***********************************************
* AnyLink Drop Down Menu- © Dynamic Drive (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit http://www.dynamicdrive.com/ for full source code
***********************************************/

//Contents for menu 1
var menu1=new Array()
menu1[0]='<a href="http://www.balterley.com/whatsnew.html">BROWSE</a>'
menu1[1]='<a href="http://www.balterley.com/suites/crystal.html">Crystal</a>'
menu1[2]='<a href="http://www.balterley.com/suites/reflection.html">Reflection</a>'
menu1[3]='<a href="http://www.balterley.com/suites/delight.html">Delight</a>'
menu1[4]='<a href="http://www.balterley.com/suites/curve.html">Curve</a>'
menu1[5]='<a href="http://www.balterley.com/suites/lagoon.html">Lagoon</a>'
menu1[6]='<a href="http://www.balterley.com/suites/arc.html">Arc</a>'
menu1[7]='<a href="http://www.balterley.com/suites/vision.html">Vision</a>'
menu1[8]='<a href="http://www.balterley.com/suites/concave.html">Concave</a>'
menu1[9]='<a href="http://www.balterley.com/suites/petite.html">Petite</a>'
menu1[10]='<a href="http://www.balterley.com/suites/mirage.html">Mirage</a>'
menu1[11]='<a href="http://www.balterley.com/suites/edge.html">Edge</a>'
menu1[12]='<a href="http://www.balterley.com/suites/smart.html">Smart</a>'


//Contents for menu 2, and so on
var menu2=new Array()
menu2[0]='<a href="http://www.balterley.com/suites_main.html">BROWSE</a>'
menu2[1]='<a href="http://www.balterley.com/suites/scenario.html">Scenario</a>'
menu2[2]='<a href="http://www.balterley.com/suites/cube.html">Cube</a>'
menu2[3]='<a href="http://www.balterley.com/suites/fusion.html">Fusion</a>'
menu2[4]='<a href="http://www.balterley.com/suites/ambience.html">Ambience</a>'
menu2[5]='<a href="http://www.balterley.com/suites/majestic.html">Majestic</a>'
menu2[6]='<a href="http://www.balterley.com/suites/spirit.html">Spirit</a>'
menu2[7]='<a href="http://www.balterley.com/suites/aspiresol.html">Aspire Solutions</a>'
menu2[8]='<a href="http://www.balterley.com/suites/aura.html">Aura</a>'
menu2[9]='<a href="http://www.balterley.com/suites/affinity.html">Affinity</a>'
menu2[10]='<a href="http://www.balterley.com/suites/affinitysol.html">Affinity Solutions</a>'
menu2[11]='<a href="http://www.balterley.com/suites/relish.html">Relish</a>'
menu2[12]='<a href="http://www.balterley.com/suites/affinitywash.html">Affinity Washroom</a>'
menu2[13]='<a href="http://www.balterley.com/suites/scenariowh.html">Scenario Wall Hung</a>'
menu1[14]='<a href="http://www.balterley.com/suites/vogue2.html">Vogue 2</a>'
menu1[15]='<a href="http://www.balterley.com/suites/custom.html">Custom</a>'
menu1[16]='<a href="http://www.balterley.com/suites/aspire.html">Aspire</a>'
menu1[17]='<a href="http://www.balterley.com/suites/vogue.html">Vogue</a>'
menu1[18]='<a href="http://www.balterley.com/suites/elevation.html">Elevation</a>'
menu1[19]='<a href="http://www.balterley.com/suites/curve2.html">Curve 2</a>'
menu2[20]='<font color="FF0000">En-suites</color>'
menu2[21]='<a href="http://www.balterley.com/suites/900quadrant.html">900 Quadrant</a>'
menu2[22]='<a href="http://www.balterley.com/suites/1200slider.html">1200 Slider</a>'
menu2[23]='<a href="http://www.balterley.com/suites/1350luxury.html">1350x900mm Walk-in</a>'
menu2[24]='<a href="http://www.balterley.com/suites/cloakroom.html">Corner Cloakroom</a>'




//Contents for menu 3, and so on and on
var menu3=new Array()
menu3[0]='<a href="http://www.balterley.com/enclosures.html">BROWSE</a>'
menu3[1]='<font color="FF0000">Enclosures</color>'
menu3[2]='<a href="http://www.balterley.com/enclosures/1200slider.html">1200 Slider</a>'
menu3[3]='<a href="http://www.balterley.com/enclosures/semiframed.html">Semi Framed Quadrants</a>'
menu3[4]='<a href="http://www.balterley.com/enclosures/singlequad.html">Single Quadrants</a>'
menu3[5]='<a href="http://www.balterley.com/enclosures/offset1250.html">Offset 1250x1000 Quadrant</a>'
menu3[8]='<a href="http://www.balterley.com/enclosures/900single.html">900 Single Door Quadrant</a>'
menu3[9]='<a href="http://www.balterley.com/enclosures/doorwalkin.html">New Doored Walk-in</a>'
menu3[10]='<a href="http://www.balterley.com/enclosures/1350walkin.html">1350x900 Walk-in</a>'
menu3[11]='<a href="http://www.balterley.com/enclosures/760pivot.html">760 Pivot</a>'
menu3[12]='<a href="http://www.balterley.com/enclosures/doublequad.html">Double Door Quadrant</a>'
menu3[13]='<a href="http://www.balterley.com/enclosures/offsetdoubledoorquad.html">Offset Double Door Quadrant</a>'
menu3[14]='<font color="FF0000">Showers</color>'
menu3[15]='<a href="http://www.balterley.com/shower_main.html">BROWSE</a>'
menu3[16]='<a href="http://www.balterley.com/showers/waterfall.html">Waterfall Shower</a>'
menu3[17]='<a href="http://www.balterley.com/showers/glade.html">Glade Shower Mixer</a>'
menu3[18]='<a href="http://www.balterley.com/showers/novel.html">Novel Shower Mixer</a>'
menu3[19]='<a href="http://www.balterley.com/showers/reign.html">Reign Shower Mixer</a>'
menu3[20]='<a href="http://www.balterley.com/showers/cubist.html">Cubist Shower Mixer</a>'
menu3[21]='<a href="http://www.balterley.com/showers/85kw.html">8.5kw Electric Shower</a>'
menu3[22]='<a href="http://www.balterley.com/showers/95kw.html">9.5kw Electric Shower</a>'
menu3[23]='<a href="http://www.balterley.com/showers/minimalist.html">Minimalist Shower Panel</a>'
menu3[24]='<a href="http://www.balterley.com/showers/luxury.html">Luxury Shower Panel</a>'



//Contents for menu 4, and so on
var menu4=new Array()
menu4[0]='<a href="http://www.balterley.com/brassware.html">BROWSE</a>'
menu4[1]='<a href="http://www.balterley.com/brassware/nobel.html">Nobel</a>'
menu4[2]='<a href="http://www.balterley.com/brassware/victor.html">Victor</a>'
menu4[3]='<a href="http://www.balterley.com/brassware/zone.html">Zone</a>'
menu4[4]='<a href="http://www.balterley.com/brassware/ultimo.html">Ultimo</a>'
menu4[5]='<a href="http://www.balterley.com/brassware/pillar.html">Pillar</a>'
menu4[6]='<a href="http://www.balterley.com/brassware/prise.html">Prise</a>'
menu4[7]='<a href="http://www.balterley.com/brassware/mini.html">Mini</a>'
menu4[8]='<a href="http://www.balterley.com/brassware/oval.html">Oval</a>'
menu4[9]='<a href="http://www.balterley.com/brassware/micro.html">Micro</a>'
menu4[10]='<a href="http://www.balterley.com/brassware/vibe.html">Vibe</a>'
menu4[11]='<a href="http://www.balterley.com/brassware/joy.html">Joy</a>'
menu4[12]='<a href="http://www.balterley.com/brassware/space.html">Space</a>'
menu4[13]='<a href="http://www.balterley.com/brassware/mode.html">Mode</a>'
menu4[14]='<a href="http://www.balterley.com/brassware/loop.html">Loop</a>'
menu4[15]='<a href="http://www.balterley.com/brassware/realm.html">Realm</a>'
menu4[16]='<a href="http://www.balterley.com/brassware/clone.html">Clone</a>'
menu4[17]='<a href="http://www.balterley.com/brassware/santo.html">Santo</a>'

//Contents for menu 5, and so on
var menu5=new Array()
menu5[0]='<a href="http://www.balterley.com/baths.html">BROWSE</a>'
menu5[1]='<a href="http://www.balterley.com/baths/mono.html">Mono</a>'
menu5[2]='<a href="http://www.balterley.com/baths/pulse.html">Pulse</a>'
menu5[3]='<a href="http://www.balterley.com/baths/niche.html">Niche Spacesaver</a>'
menu5[4]='<a href="http://www.balterley.com/baths/soul.html">Soul</a>'
menu5[5]='<a href="http://www.balterley.com/baths/1600.html">1600 Steel</a>'
menu5[6]='<a href="http://www.balterley.com/baths/17001.html">1700 Steel</a>'
menu5[7]='<a href="http://www.balterley.com/baths/1800.html">1800 Steel</a>'
menu5[8]='<a href="http://www.balterley.com/baths/flow.html">Flow</a>'
menu5[9]='<a href="http://www.balterley.com/baths/bowfront.html">Bowfront</a>'
menu5[10]='<a href="http://www.balterley.com/baths/scope.html">Scope</a>'
menu5[11]='<a href="http://www.balterley.com/baths/nuvo.html">Nuvo</a>'
menu5[12]='<a href="http://www.balterley.com/baths/concave.html">Concave</a>'
menu5[13]='<a href="http://www.balterley.com/baths/form1500.html">Form 1500</a>'
menu5[14]='<a href="http://www.balterley.com/baths/form1700.html">Form 1700</a>'
menu5[15]='<a href="http://www.balterley.com/baths/keyhole.html">Keyhole</a>'
menu5[16]='<a href="http://www.balterley.com/baths/mediansnr.html">Median Snr</a>'
menu5[17]='<a href="http://www.balterley.com/baths/duo.html">Duo</a>'
menu5[18]='<a href="http://www.balterley.com/baths/median750.html">Median</a>'
menu5[19]='<a href="http://www.balterley.com/baths/enya.html">Enya</a>'
menu5[20]='<a href="http://www.balterley.com/baths/elite.html">Elite</a>'
menu5[21]='<a href="http://www.balterley.com/baths/vista.html">Vista</a>'
menu5[22]='<a href="http://www.balterley.com/baths/beau.html">Beau</a>'
menu5[23]='<a href="http://www.balterley.com/baths/contemp.html">Contemporary</a>'
menu5[24]='<a href="http://www.balterley.com/baths/custom.html">Custom</a>'
menu5[25]='<a href="http://www.balterley.com/baths/echo2.html">Echo Junior</a>'
menu5[26]='<a href="http://www.balterley.com/baths/echo.html">Echo</a>'
menu5[27]='<a href="http://www.balterley.com/baths/yearn.html">Yearn</a>'
menu5[28]='<a href="http://www.balterley.com/baths/cube.html">Cube</a>'
menu5[29]='<a href="http://www.balterley.com/baths/elipse.html">Elipse</a>'
menu5[30]='<a href="http://www.balterley.com/baths/sweep.html">Sweep</a>'
menu5[31]='<a href="http://www.balterley.com/baths/elitejnr.html">Elite Jnr</a>'

//Contents for menu 6, and so on
var menu6=new Array()
menu6[0]='<a href="http://www.balterley.com/furniture.html">BROWSE</a>'
menu6[1]='<a href="http://www.balterley.com/furniture/fitted.html">Fitted Furniture</a>'
menu6[2]='<a href="http://www.balterley.com/furniture/whiteclassic.html">White Classic</a>'
menu6[3]='<a href="http://www.balterley.com/furniture/whiterustic.html">White Rustic</a>'
menu6[4]='<a href="http://www.balterley.com/furniture/wallhung1.html">Wall Hung 1</a>'
menu6[5]='<a href="http://www.balterley.com/furniture/wallhung2.html">Wall Hung 2</a>'
menu6[6]='<a href="http://www.balterley.com/furniture/compact.html">Compact Furniture</a>'
menu6[7]='<a href="http://www.balterley.com/furniture/vanity.html">Vanity Units</a>'

//Contents for menu 7, and so on
var menu7=new Array()
menu7[0]='<a href="http://www.balterley.com/accessories.html">BROWSE</a>'
menu7[1]='<a href="http://www.balterley.com/accessories/wastes.html">Wastes</a>'
menu7[2]='<a href="http://www.balterley.com/accessories/htrails.html">Heated Towel Rails</a>'
menu7[3]='<a href="http://www.balterley.com/accessories/radvalves.html">Radiator Valves</a>'
menu7[4]='<a href="http://www.balterley.com/accessories/toiletseats.html">Toilet Seats</a>'
menu7[5]='<a href="http://www.balterley.com/accessories/cameofurn.html">Cameo Furniture</a>'
menu7[6]='<a href="http://www.balterley.com/accessories/cameobasins.html">Cameo Basins</a>'

//Contents for menu 8, and so on
var menu8=new Array()
menu8[0]='<a href="http://www.balterley.com/screens.html">BROWSE</a>'
menu8[1]='<a href="http://www.balterley.com/baths/4fold.html">4 fold bath screen</a>'
menu8[2]='<a href="http://www.balterley.com/baths/scope_bs.html">Scope corner bath screen</a>'
menu8[3]='<a href="http://www.balterley.com/baths/form_bs1.html">form showerbath pivot door</a>'
menu8[4]='<a href="http://www.balterley.com/baths/form_bs2.html">form showerbath screen</a>'
menu8[5]='<a href="http://www.balterley.com/baths/bliss_bs.html">Bliss straight bath screen</a>'
menu8[6]='<a href="http://www.balterley.com/baths/concave_bs.html">Concave bath screen</a>'
		
var menuwidth='165px' //default menu width
var menubgcolor='#FFFFFF'  //menu bgcolor
var disappeardelay=250  //menu disappear speed onMouseout (in miliseconds)
var hidemenu_onclick="yes" //hide menu when user clicks within menu?

/////No further editting needed

var ie4=document.all
var ns6=document.getElementById&&!document.all

if (ie4||ns6)
document.write('<div id="dropmenudiv" style="visibility:hidden;width:'+menuwidth+';background-color:'+menubgcolor+'" onMouseover="clearhidemenu()" onMouseout="dynamichide(event)"></div>')

function getposOffset(what, offsettype){
var totaloffset=(offsettype=="left")? what.offsetLeft : what.offsetTop;
var parentEl=what.offsetParent;
while (parentEl!=null){
totaloffset=(offsettype=="left")? totaloffset+parentEl.offsetLeft : totaloffset+parentEl.offsetTop;
parentEl=parentEl.offsetParent;
}
return totaloffset;
}


function showhide(obj, e, visible, hidden, menuwidth){
if (ie4||ns6)
dropmenuobj.style.left=dropmenuobj.style.top="-500px"
if (menuwidth!=""){
dropmenuobj.widthobj=dropmenuobj.style
dropmenuobj.widthobj.width=menuwidth
}
if (e.type=="click" && obj.visibility==hidden || e.type=="mouseover")
obj.visibility=visible
else if (e.type=="click")
obj.visibility=hidden
}

function iecompattest(){
return (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body
}

function clearbrowseredge(obj, whichedge){
var edgeoffset=0
if (whichedge=="rightedge"){
var windowedge=ie4 && !window.opera? iecompattest().scrollLeft+iecompattest().clientWidth-15 : window.pageXOffset+window.innerWidth-15
dropmenuobj.contentmeasure=dropmenuobj.offsetWidth
if (windowedge-dropmenuobj.x < dropmenuobj.contentmeasure)
edgeoffset=dropmenuobj.contentmeasure-obj.offsetWidth
}
else{
var topedge=ie4 && !window.opera? iecompattest().scrollTop : window.pageYOffset
var windowedge=ie4 && !window.opera? iecompattest().scrollTop+iecompattest().clientHeight-15 : window.pageYOffset+window.innerHeight-18
dropmenuobj.contentmeasure=dropmenuobj.offsetHeight
if (windowedge-dropmenuobj.y < dropmenuobj.contentmeasure){ //move up?
edgeoffset=dropmenuobj.contentmeasure+obj.offsetHeight
if ((dropmenuobj.y-topedge)<dropmenuobj.contentmeasure) //up no good either?
edgeoffset=dropmenuobj.y+obj.offsetHeight-topedge
}
}
return edgeoffset
}

function populatemenu(what){
if (ie4||ns6)
dropmenuobj.innerHTML=what.join("")
}


function dropdownmenu(obj, e, menucontents, menuwidth){
if (window.event) event.cancelBubble=true
else if (e.stopPropagation) e.stopPropagation()
clearhidemenu()
dropmenuobj=document.getElementById? document.getElementById("dropmenudiv") : dropmenudiv
populatemenu(menucontents)

if (ie4||ns6){
showhide(dropmenuobj.style, e, "visible", "hidden", menuwidth)


dropmenuobj.x=getposOffset(obj, "left")
dropmenuobj.y=getposOffset(obj, "top")
dropmenuobj.style.left=dropmenuobj.x-clearbrowseredge(obj, "rightedge")+"px"
dropmenuobj.style.top=dropmenuobj.y-clearbrowseredge(obj, "bottomedge")+obj.offsetHeight+"px"
}

return clickreturnvalue()
}

function clickreturnvalue(){
if (ie4||ns6) return false
else return true
}

function contains_ns6(a, b) {
while (b.parentNode)
if ((b = b.parentNode) == a)
return true;
return false;
}

function dynamichide(e){
if (ie4&&!dropmenuobj.contains(e.toElement))
delayhidemenu()
else if (ns6&&e.currentTarget!= e.relatedTarget&& !contains_ns6(e.currentTarget, e.relatedTarget))
delayhidemenu()
}

function hidemenu(e){
if (typeof dropmenuobj!="undefined"){
if (ie4||ns6)
dropmenuobj.style.visibility="hidden"
}
}

function delayhidemenu(){
if (ie4||ns6)
delayhide=setTimeout("hidemenu()",disappeardelay)
}

function clearhidemenu(){
if (typeof delayhide!="undefined")
clearTimeout(delayhide)
}

if (hidemenu_onclick=="yes")
document.onclick=hidemenu
