﻿/***********************************************
* 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.xpressit.com.au/bpay.html">Pay by BPay</a>'
menu1[1]='<a href="http://www.xpressit.com.au/payoffline.html">Pay Offline</a>'

//Contents for menu 2, and so on
var menu2=new Array()
menu2[0]='<a href="http://www.xpressit.com.au/catalog/index.php?cPath=544&os">Specials</a>'
menu2[1]='<a href="http://www.xpressit.com.au/catalog/index.php?cPath=298&os">Add On Cards</a>'
menu2[2]='<a href="http://www.xpressit.com.au/catalog/index.php?cPath=358&os">Audio & Sund</a>'
menu2[3]='<a href="http://www.xpressit.com.au/catalog/index.php?cPath=343&os">Bags</a>'
menu2[4]='<a href="http://www.xpressit.com.au/catalog/index.php?cPath=269&os">Cables</a>'
menu2[5]='<a href="http://www.xpressit.com.au/catalog/index.php?cPath=38&os">Cases</a>'
menu2[6]='<a href="http://www.xpressit.com.au/catalog/index.php?cPath=238&os7>DVD & CD Drives'
menu2[8]='<a href="http://www.xpressit.com.au/catalog/index.php?cPath=205&os">Computers - Xnet Pc - BTO</a>'
menu2[9]='<a href="http://www.xpressit.com.au/catalog/index.php?cPath=410&os">Computers - Xnet Pc - Express</a>'
menu2[10]='<a href="http://www.xpressit.com.au/catalog/index.php?cPath=202&os">Computers - Xnet Servers</a>'
menu2[11]='<a href="http://www.xpressit.com.au/catalog/index.php?cPath=316&os">Consumables </a>'
menu2[12]='<a href="http://www.xpressit.com.au/catalog/index.php?cPath=460&os">Consumer Electronics</a>'
menu2[13]='<a href="http://www.xpressit.com.au/catalog/index.php?cPath=43&os">CPU / Prcocessor</a>'
menu2[14]='<a href="http://www.xpressit.com.au/catalog/index.php?cPath=389&os">Dlink - Products</a>'
menu2[15]='<a href="http://www.xpressit.com.au/catalog/index.php?cPath=530&os">External Case</a>'
menu2[16]='<a href="http://www.xpressit.com.au/catalog/index.php?cPath=347&os">Flash Media (SanDisk)</a>'
menu2[17]='<a href="http://www.xpressit.com.au/catalog/index.php?cPath=53&os">Floppy Drive</a>'
menu2[18]='<a href="http://www.xpressit.com.au/catalog/index.php?cPath=534_392&os">Graphics Card</a>'
menu2[19]='<a href="http://www.xpressit.com.au/catalog/index.php?cPath=60&os">Hard Drives</a>'
menu2[20]='<a href="http://www.xpressit.com.au/catalog/index.php?cPath=524&os">Infra-Red</a>'
menu2[21]='<a href="http://www.xpressit.com.au/catalog/index.php?cPath=524&os">IP Camera</a>'
menu2[22]='<a href="http://www.xpressit.com.au/catalog/index.php?cPath=88&os">Keyboards & Mice</a>'
menu2[23]='<a href="http://www.xpressit.com.au/catalog/index.php?cPath=469&os">KVM</a>'
menu2[24]='<a href="http://www.xpressit.com.au/catalog/index.php?cPath=299&os">Modems & Routers</a>'
menu2[25]='<a href="http://www.xpressit.com.au/catalog/index.php?cPath=113&os">Monitors</a>'
menu2[26]='<a href="http://www.xpressit.com.au/catalog/index.php?cPath=118&os">Motherbards</a>'
menu2[27]='<a href="http://www.xpressit.com.au/catalog/index.php?cPath=331&os">Network Att. Stroage</a>'
menu2[28]='<a href="http://www.xpressit.com.au/catalog/index.php?cPath=470&os">Networking (Cabled) </a>'
menu2[29]='<a href="http://www.xpressit.com.au/catalog/index.php?cPath=458&os">Power Over Ethernet</a>'
menu2[30]='<a href="http://www.xpressit.com.au/catalog/index.php?cPath=137&os">Power Supply</a>'
menu2[31]='<a href="http://www.xpressit.com.au/catalog/index.php?cPath=314&os">Print Server</a>'
menu2[32]='<a href="http://www.xpressit.com.au/catalog/index.php?cPath=258&os">Printers - Epson</a>'
menu2[33]='<a href="http://www.xpressit.com.au/catalog/index.php?cPath=130&os">Printers - Hp</a>'
menu2[34]='<a href="http://www.xpressit.com.au/catalog/index.php?cPath=233&os">Racks</a>'
menu2[35]='<a href="http://www.xpressit.com.au/catalog/index.php?cPath=4&os">RAID Cards</a>'
menu2[36]='<a href="http://www.xpressit.com.au/catalog/index.php?cPath=139&os">RAM / Memory</a>'
menu2[37]='<a href="http://www.xpressit.com.au/catalog/index.php?cPath=141&os">Scanners</a>'
menu2[38]='<a href="http://www.xpressit.com.au/catalog/index.php?cPath=609&os">Software</a>'
menu2[39]='<a href="http://www.xpressit.com.au/catalog/index.php?cPath=503&os">Swann Products </a>'
menu2[40]='<a href="http://www.xpressit.com.au/catalog/index.php?cPath=459&os">TV Tuner / Capture</a>'
menu2[41]='<a href="http://www.xpressit.com.au/catalog/index.php?cPath=183&os">UPS</a>'
menu2[42]='<a href="http://www.xpressit.com.au/catalog/index.php?cPath=375&os">USB & Firewire</a>'
menu2[43]='<a href="http://www.xpressit.com.au/catalog/index.php?cPath=475&os">VOIP</a>'
menu2[44]='<a href="http://www.xpressit.com.au/catalog/index.php?cPath=482&os">Web Cam</a>'
menu2[45]='<a href="http://www.xpressit.com.au/catalog/index.php?cPath=313&os">Wireless</a>'

//Contents for menu 2, and so on
var menu3=new Array()
menu3[0]='<a href="http://www.xpressit.com.au/returns_parts.html">Returns</a>'
menu3[1]='<a href="https://www.xpressit.com.au/returns_pc.html">PC Repairs</a>'

//Contents for menu 2, and so on
var menu4=new Array()
menu4[0]='<a href="http://www.xpressit.com.au/terms.html">Terms</a>'
menu4[1]='<a href="http://www.xpressit.com.au/profile.html">Profile</a>'
menu4[2]='<a href="http://www.xpressit.com.au/contactus.html">Enquiries</a>'
		
var menuwidth='150px' //default menu width
var menubgcolor='#0b385e'  //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