// UDMv4.1 //
/***************************************************************\

  ULTIMATE DROP DOWN MENU Version 4.1 by Brothercake
  http://www.udm4.com/
  
  This script may not be used or distributed without license

\***************************************************************/
function umKM(){um.kbm=this;um.ha=0;um.mt=[um.e[10],um.e[11]];um.tf=null;if(um.m.cookie){um.rf=[um.m.getElementById('hotkeySelector'),um.m.getElementById('modifierSelector')];um.oe=um.m.cookie.split(';');um.ol=um.oe.length;i=0;do{if(/udmKeyPrefs/.test(um.oe[i])){um.tk=um.oe[i].split('=');um.tk=um.tk[1].split(',');j=0;do{um.keys[j+4]=um.tk[j];if(um.rf[j]){um.zo=um.rf[j].options;um.zl=um.zo.length;var k=0;do{if(um.zo[k].value==um.tk[j]){um.zo[k].selected=1;break;}k++;}while(k<um.zl);}j++;}while(j<2);break;}i++;}while(i<um.ol);}};um.keyPrefs=function(){if(!(um.kb&&um.d)){alert('Sorry, this feature is not supported in your browser.');return false;}um.dd=new Date();um.dd.setTime(um.dd.getTime()+(365*24*60*60*1000));um.m.cookie='udmKeyPrefs=test; expires='+um.dd.toGMTString()+'; path=/';if(!um.m.cookie){alert('Sorry, your browser didn\'t accept the cookie.\nWe cannot save your settings.');}else{um.rf=[um.m.getElementById('hotkeySelector'),um.m.getElementById('modifierSelector')];i=0;do{um.keys[i+4]=um.rf[i].options[um.rf[i].options.selectedIndex].value;i++;}while(i<2);um.m.cookie='udmKeyPrefs='+um.keys[4]+','+um.keys[5]+'; expires='+um.dd.toGMTString()+'; path=/';alert('Save successful!');}return true;};umKM.prototype.bdh=function(){if(typeof document.addEventListener!=um.un){document.addEventListener('keypress',this.kha,0);}else{document.attachEvent('onkeydown',this.kha);}};umKM.prototype.bth=function(umI){um.of=(um.wie)?'onactivate':'onfocus';umI[um.of]=function(e){if(!e){e=event;e.target=e.srcElement;}this.over(1,e.target);};};umKM.prototype.cpm=function(umM,umI,umTG){um.av=[null,null,null];if((umM!=null&&umM.style.visibility!='visible')||umM==null){if(umI.previousSibling!=null){um.av[0]=umI.previousSibling;}if(umI.nextSibling!=null){um.av[1]=umI.nextSibling;}}umM=(um.gnu(um.gpi(umTG)).length>0)?um.gnu(um.gpi(umTG))[0]:null;if(umM!=null&&typeof umM.style!=um.un&&umM.style.visibility=='visible'){um.ct=umM.getElementsByTagName('li');um.ctl=um.ct.length;um.c=2;j=0;do{um.av[um.c++]=um.ct[j++];}while(j<um.ctl);}if(um.tf!=null){um.lc=um.gpi(um.tf).parentNode.lastChild;if(um.gpi(um.tf)==um.lc){um.n.lir(um.gca(um.lc),0);}}um.avl=um.av.length;i=0;do{if(um.av[i]!=null){if(um.gnu(um.av[i]).length>0){um.n.cop(um.gnu(um.av[i])[0],um.av[i]);}else{um.n.cop(null,um.av[i]);}}i++;}while(i<um.avl);};umKM.prototype.cdl=function(udmLink){udmLink.href='#';udmLink.style.cursor='default';udmLink.onmousedown=function(){return false;};udmLink.onclick=function(){return false;};};umKM.prototype.mkc=function(udmKey){for(i=1;i<4;i+=2){if(udmKey==um.keys[i]){udmKey=um.keys[4-i];break;}}return udmKey;};umKM.prototype.kha=function(e){if(!e){e=window.event;}um.key=e.keyCode;if(um.key==um.keys[6]){um.ha=1;}if((um.key==um.keys[4] &&((um.keys[5]=='none'&&!e.shiftKey&&!e.ctrlKey&&!e.altKey)||eval('e.'+um.keys[5])))||(um.key==um.keys[6])){um.e[10]=1;um.e[11]=1;if(!um.ha){um.cam(e);um.tm=umTree.getElementsByTagName('li')[0];um.tm=um.gca(um.tm);while(um.tm.href==''){um.kbm.cdl(um.tm);}um.tm.focus();um.ha=1;um.rep('080',um.tr);if(um.ie){return false;}else if(e){e.preventDefault();}}else{if(um.sp){um.sapi.voice.Speak(um.vocab[8],2);}um.cam(e);if(um.wie50&&um.e[13]=='yes'){um.n.ts('visible');}eval(um.keys[7]).focus();um.e[10]=um.mt[0];um.e[11]=um.mt[1];um.ha=0;um.rep('090',um.tr);if(um.ie){return false;}else if(e){e.preventDefault();}}}um.tg=(e.target)?e.target:e.srcElement;if(um.tr.contains(um.tg)){um.e[10]=1;um.e[11]=1;if(um.h&&um.gpi(um.tg).parentNode.className=='udm'){if(um.nm&&(um.key==um.keys[0]||um.key==um.keys[2])){return false;}i=0;do{if(um.key==um.keys[i]){um.key=um.keys[3-i];break;}i++;}while(i<4);}else{if(um.nm&&(um.key==um.keys[1]||um.key==um.keys[3])){return false;}um.tm=um.gpi(um.tg).parentNode;if(um.a=='right'||um.e[12]=='yes'){if(um.gnu(um.gpi(um.tg))[0]){um.nextMenu=um.gnu(um.gpi(um.tg))[0];if(um.getRealPosition(um.nextMenu,'x')<um.getRealPosition(um.tm,'x')){um.key=um.kbm.mkc(um.key);}}else if(um.tm.className!='udm'){um.previousMenu=um.gpi(um.tm).parentNode;if(um.getRealPosition(um.previousMenu,'x')>um.getRealPosition(um.tm,'x')){um.key=um.kbm.mkc(um.key);}}}}um.tf=null;switch(um.key){case 9 :i=0;do{if(um.li[i]==um.gpi(um.tg)){um.tf=um.tg;if(e.shiftKey){um.j=(i==0)?-1:i-1;}else{um.j=((i+1)==um.ll)?-1:i+1;}if(um.j>-1){um.tm=um.gca(um.li[um.j]);if(um.tm.href==null||um.tm.href==''){um.kbm.cdl(um.tm);}}else{um.cam(e);}break;}i++;}while(i<um.ll);break;case um.keys[0] :if(um.gpi(um.tg).previousSibling){um.fo=um.gpi(um.tg).previousSibling;if(um.fo!=null){um.tm=um.gca(um.fo);if(um.ie&&um.tm.href==''){um.kbm.cdl(um.tm);}um.nextFocus=(typeof um.tm!=um.un)?um.tm:null;if(um.nextFocus!=null){um.nextFocus.focus();}}}else if(um.gpi(um.tg).parentNode.childNodes.length>1){um.n.cop(um.gnu(um.gpi(um.tg))[0],um.gpi(um.tg));um.tm=um.gca(um.gpi(um.tg).parentNode.lastChild);if(um.ie&&um.tm.href==''){um.kbm.cdl(um.tm);}if(um.h&&um.gpi(um.gpi(um.tg).parentNode).parentNode.className=='udm'){um.tm=um.gca(um.gpi(um.gpi(um.tg).parentNode));}um.tm.focus();}if(um.ie){return false;}else if(e){e.preventDefault();}um.rep('100',um.tg);break;case um.keys[1] :if(um.gnu(um.gpi(um.tg))[0]){um.tm=um.gnu(um.gpi(um.tg))[0];um.nextFocus=(um.tm)?um.gca(um.tm):null;if(um.nextFocus!=null){um.nextFocus.focus();}}if(um.ie){return false;}else if(e){e.preventDefault();}um.rep('101',um.tg);break;case um.keys[2] :if(um.gpi(um.tg).nextSibling){um.fo=um.gpi(um.tg).nextSibling;if(um.fo!=null){um.tm=um.gca(um.fo);if(um.ie&&um.tm.href==''){um.kbm.cdl(um.tm);}um.nextFocus=(typeof um.tm!=um.un)?um.tm:null;if(um.nextFocus!=null){um.nextFocus.focus();}}}else if(um.gpi(um.tg).parentNode.childNodes.length>1){um.n.cop(um.gnu(um.gpi(um.tg))[0],um.gpi(um.tg));um.tm=um.gpi(um.tg).parentNode.firstChild;if(um.gca(um.tm).href==''){um.kbm.cdl(um.tm);}um.gca(um.tm).focus();}if(um.ie){return false;}else if(e){e.preventDefault();}um.rep('102',um.tg);break;case um.keys[3] :if(um.gpi(um.tg).parentNode.parentNode){um.tm=um.gpi(um.tg).parentNode;um.nextFocus=(um.tm.className=='udm')?null:um.gca(um.gpi(um.tm));if(um.nextFocus!=null&&(typeof um.nextFocus.focus=='function'||typeof um.nextFocus.focus=='object')){um.nextFocus.focus();}}if(um.ie){return false;}else if(e){e.preventDefault();}um.rep('103',um.tg);break;}}return true;};