/***********************************************
* 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
***********************************************/
// GET YEAR
var dteNow = new Date();
var intYear = dteNow.getFullYear();

//Contents for menu 'hearing loss'
var menu1=new Array()
menu1[0]='<a href="how_we_hear.html">&nbsp;&nbsp;&nbsp;how we hear</a>'
menu1[1]='<a href="symptoms_of_hearing_loss.html">&nbsp;&nbsp;&nbsp;symptoms of hearing loss</a>'
menu1[2]='<a href="types_of_hearing_loss.html">&nbsp;&nbsp;&nbsp;types of hearing loss</a>'
menu1[3]='<a href="hearing_and_ear_protection.html">&nbsp;&nbsp;&nbsp;preventing hearing loss<br>&nbsp;&nbsp;&nbsp;&nbsp;-&nbsp;hearing and ear protection</a>'

//Contents for menu 'hearing test'
var menu2=new Array()
menu2[0]='<a href="understanding_your_hearing_test.html">&nbsp;&nbsp;&nbsp;understanding your hearing test</a>'
menu2[1]='<a href="hearing_aids_or_not.html">&nbsp;&nbsp;&nbsp;solutions - hearing aids or not</a>'

//Contents for menu 'hearing aids'
var menu3=new Array()
menu3[0]='<a href="digital_analogue_hearing_aids.html">&nbsp;&nbsp;&nbsp;digital and analogue hearing aids</a>'
menu3[1]='<a href="styles_of_hearing_aids.html">&nbsp;&nbsp;&nbsp;styles of hearing aids</a>'
menu3[2]='<a href="pricing_guides.html">&nbsp;&nbsp;&nbsp;hearing aid pricing guide</a>'
menu3[3]='<a href="financial_assistance.html">&nbsp;&nbsp;&nbsp;financial assistance</a>'

//Contents for menu 'about us'
var menu4=new Array()
menu4[0]='<a href="meet_our_team.html">&nbsp;&nbsp;&nbsp;meet our team</a>'
menu4[1]='<a href="about_our_practice.html">&nbsp;&nbsp;&nbsp;about our practice</a>'
menu4[2]='<a href="appointment_limerick.html">&nbsp;&nbsp;&nbsp;make an appointment</a>'
menu4[3]='<a href="how_to_find_us.html">&nbsp;&nbsp;&nbsp;how to find us</a>'

var menuwidth='250px' //default menu width
var menubgcolor='#1795A9'  //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=-500
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

image1 = new Image();
image1.src = "images/home_on.gif";

image2 = new Image();
image2.src = "images/hearingloss_on.gif";

image3 = new Image();
image3.src = "images/hearingtest_on.gif";

image4 = new Image();
image4.src = "images/hearingaids_on.gif";

image5 = new Image();
image5.src = "images/aboutus_on.gif";

image6 = new Image();
image6.src = "images/links_on.gif";

image10 = new Image();
image10.src = "images/menu_one_1_on.gif";

image11 = new Image();
image11.src = "images/menu_one_2_on.gif";

image12 = new Image();
image12.src = "images/menu_one_3_on.gif";

image13 = new Image();
image13.src = "images/menu_one_4_on.gif";

image20 = new Image();
image20.src = "images/menu_two_1_on.gif";

image21 = new Image();
image21.src = "images/menu_two_2_on.gif";

image30 = new Image();
image30.src = "images/menu_three_1_on.gif";

image31 = new Image();
image31.src = "images/menu_three_2_on.gif";

image32 = new Image();
image32.src = "images/menu_three_3_on.gif";

image33 = new Image();
image33.src = "images/menu_three_4_on.gif";

image34 = new Image();
image34.src = "images/menu_three_5_on.gif";

image40 = new Image();
image40.src = "images/menu_four_1_on.gif";

image41 = new Image();
image41.src = "images/menu_four_2_on.gif";

image42 = new Image();
image42.src = "images/menu_four_3_on.gif";

image43 = new Image();
image43.src = "images/menu_four_4_on.gif";

image44 = new Image();
image44.src = "images/menu_four_5_on.gif";