
/***********************************************
* 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
***********************************************/
//gk this variable holds the id of the previous a href element which had been dropped down, so that it can be reset to className = out 
eIdAHref = ""

//Contents for menu1,  home
var menu1=new Array()
//menu1[0]='<a href="#"> </a>'
//menu1[1]='<a href="#"> </a>'
//menu1[2]='<a href="#"> </a>'

//Contents for menu2, Our Cats
var menu2=new Array()
menu2[0]='<a href="/pb_queen_01.asp">Our queens</a>'
menu2[1]='<a href="/pb_king_01.asp">Our studs</a>'
menu2[2]='<a href="/pb_kittens_previous_01.asp">Our previous kittens</a>'
menu2[3]='<a href="/pb_nursery_01.asp">Our nursery</a>'
menu2[4]='<a href="/AnsonRoadPixieBobBlogs.asp">Kitten blogs</a>'
menu2[5]='<a href="/pb_kittens_01.asp">Available kittens</a>'
menu2[6]='<a href="/pixiebobkittenswhatpeoplesay.asp">Testimonials</a>'


//Contents for menu3,  Kittens
var menu3=new Array()
menu3[0]='<a href="/pb_kittens_01.asp">Available kittens</a>'
menu3[1]='<a href="/pb_kittens_compare_01.asp">Compare kittens</a>'
menu3[2]='<a href="/available_adults_01.asp">Available adults</a>'
menu3[3]='<a href="/PixieBobRescue.asp">Pixie Bob rescue &amp; rehoming</a>'

//Contents for menu 7, Everything Else
var menu7=new Array()
menu7[0]='<a href="/pb_background_01.asp">About Pixie Bobs</a>'
menu7[1]='<a href="/showPixieBobKittenPage.asp?kn=0">Bobcat photo library</a>'
menu7[2]='<a href="#"><hr></a>'
menu7[3]='<a href="/PixieBobDietAndCare.asp">Diet and care for Pixie Bobs</a>'
menu7[4]='<a href="/BreedingPixieBobs.asp">So you want to breed...</a>'
menu7[5]='<a href="/everythingelse_01.asp">Useful links</a>'
menu7[6]='<a href="#"><hr></a>'
menu7[7]='<a href="/PixieBobRescue.asp">Pixie Bob rescue &amp; rehoming</a>'
menu7[8]='<a href="/otherbreeders_01.asp">Other breeders</a>'
menu7[9]='<a href="/favguest_01.asp">Favourite guest houses</a>'
		
		
//Contents for menu 5, News and events 
var menu5=new Array()
//menu5[0]='<a href="#">Press releases</a>'
//menu5[1]='<a href="#">Articles</a>'
//menu5[2]='<a href="#">Press coverage</a>'

//Contents for menu 6, About us 
var menu6=new Array()
//menu6[0]='<a href="/brochure/Organisation.asp">Organisation</a>'
//menu6[1]='<a href="/brochure/Management.asp">Management</a>'
//menu6[2]='<a href="/brochure/ContactUs.asp">Contact us</a>'
		

var menuwidth='180px' //default menu width
var menubgcolor='rgb(1,125,189)'  //menu bgcolor gk was: lightyellow
var disappeardelay=250  //menu disappear speed onMouseout (in miliseconds)
var hidemenu_onclick="yes" //hide menu when user clicks within menu?
//background image offset is managed in the styles for #dropmenudiv.menu1 2 3 etc

/////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;" class="" 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, bgposition, eId){
node = document.getElementById("dropmenudiv");
//node.className = "menupos5"- that doen't work for ie very well, gk;
node.style.backgroundPosition = bgposition;
//gk added folowing 3 line to permanently highoight the current h href
if (eIdAHref.length > 0) {document.getElementById(eIdAHref).className = "out"}
document.getElementById(eId).className="hover"
eIdAHref = eId
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"
//gk added next line to reset a href back ground to white when dropdowndiv hides
document.getElementById(eIdAHref).className = "out"
}
}

function delayhidemenu(){
if (ie4||ns6)
delayhide=setTimeout("hidemenu()",disappeardelay)
}

function clearhidemenu(){
if (typeof delayhide!="undefined")
clearTimeout(delayhide)
}

if (hidemenu_onclick=="yes")
document.onclick=hidemenu

<!-- end styles and drop down menu -->
