//Pop-it menu- By Dynamic Drive
//For full source code and more DHTML scripts, visit  http://www.dynamicdrive.com
//This credit MUST stay intact for use.

var linkset=new Array()
//SPECIFY MENU SETS AND THEIR LINKS. FOLLOW SYNTAX LAID OUT.

//Web Marketing
linkset[0]='<div class="menuitems"><a href="category.asp?catid=30">TV WALL BRACKETS</a></div>'
linkset[0]+='<div class="menuitems"><a href="category.asp?catid=31">TV CEILING BRACKETS</a></div>'
linkset[0]+='<div class="menuitems"><a href="category.asp?catid=32">MICROWAVE WALL BRACKET</a></div>'
linkset[0]+='<div class="menuitems"><a href="category.asp?catid=33">LCD-PLASMA WALL BRACKETS</a></div>'
linkset[0]+='<div class="menuitems"><a href="category.asp?catid=34">LCD-PLASMA CEILING BRACKETS</a></div>'
linkset[0]+='<div class="menuitems"><a href="category.asp?catid=35">LCD-PLASMA FLOOR STAND</a></div>'
linkset[0]+='<div class="menuitems"><a href="category.asp?catid=36">SPEAKER FLOOR STAND</a></div>'
linkset[0]+='<div class="menuitems"><a href="category.asp?catid=37">SPEAKER WALL BRACKETS</a></div>'
linkset[0]+='<div class="menuitems"><a href="category.asp?catid=38">PROJECTOR MOUNTING BRACKETS WALL AND CEILING</a></div>'
//linkset[0]+='<div class="menuitems"><a href="../misc/free-traffic-monitoring.htm">free web statistics</a></div>'
//linkset[0]+='<div class="menuitems"><a href="../tools/web-macro-software.htm">free web macro software</a></div>'
//linkset[0]+='<div class="menuitems"><a href="../articles/ebooksviralmarketing.htm">ebook software review</a></div>'


//Ecommerce
linkset[1]='<div class="menuitems"><a href="category.asp?catid=39">BANK NOTE COUNTERS</a></div>'
linkset[1]+='<div class="menuitems"><a href="category.asp?catid=40">VACUUM NOTE COUNTERS</a></div>'
linkset[1]+='<div class="menuitems"><a href="category.asp?catid=41">MONEY DETECTORS</a></div>'
linkset[1]+='<div class="menuitems"><a href="category.asp?catid=42">COIN COUNTERS</a></div>'
linkset[1]+='<div class="menuitems"><a href="category.asp?catid=43">NOTE BINDING MACHINE</a></div>'
//linkset[1]+='<div class="menuitems"><a href="../articles2/back-end-ecommerce.htm">payment services guide</a></div>'
//linkset[1]+='<div class="menuitems"><a href="../tools/marketing-monitoring.htm">site monitoring - free trial</a></div>'
//linkset[1]+='<div class="menuitems"><a href="../tools/web-macro-software.htm">free web macro software</a></div>'
//linkset[1]+='<div class="menuitems"><a href="../blog/">ecommerce news</a></div>'

//Web development
linkset[2]='<div class="menuitems"><a href="category.asp?catid=12">ECONOMICAL CCTV COLOR CAMERAS</a></div>'
linkset[2]+='<div class="menuitems"><a href="category.asp?catid=52">WIRELESS SECURITY EQPT</a></div>'
linkset[2]+='<div class="menuitems"><a href="category.asp?catid=13">DOOR CAMERA</a></div>'
linkset[2]+='<div class="menuitems"><a href="category.asp?catid=14">DAY NIGHT AND OUTDOOR CAMERAS</a></div>'
linkset[2]+='<div class="menuitems"><a href="category.asp?catid=15">PROFESSIONAL HIDDEN CAMERAS</a></div>'
linkset[2]+='<div class="menuitems"><a href="category.asp?catid=16">DUMMY CAMERAS</a></div>'
linkset[2]+='<div class="menuitems"><a href="category.asp?catid=17">LENSES AND CASINGS</a></div>'
linkset[2]+='<div class="menuitems"><a href="category.asp?catid=18">PROFESSIONAL COLOUR CAMERAS</a></div>'
linkset[2]+='<div class="menuitems"><a href="category.asp?catid=19">OTHER SECURITY EQUIPMENTS</a></div>'
linkset[2]+='<div class="menuitems"><a href="category.asp?catid=20">AV SWITCHERS</a></div>'
linkset[2]+='<div class="menuitems"><a href="category.asp?catid=21">PROCESSORS AND MULTIPLEXERS</a></div>'
linkset[2]+='<div class="menuitems"><a href="category.asp?catid=22">TIME LAPSE VCR</a></div>'
linkset[2]+='<div class="menuitems"><a href="category.asp?catid=23">DIGITAL VIDEO RECORDERS</a></div>'
linkset[2]+='<div class="menuitems"><a href="category.asp?catid=24">DVR CARD</a></div>'
linkset[2]+='<div class="menuitems"><a href="category.asp?catid=25">MONITORS</a></div>'
linkset[2]+='<div class="menuitems"><a href="category.asp?catid=26">VIDEO DOOR PHONES</a></div>'
linkset[2]+='<div class="menuitems"><a href="category.asp?catid=27">PORTABLE SECURITY UNITS</a></div>'
linkset[2]+='<div class="menuitems"><a href="category.asp?catid=28">ACC. REQ FOR INSTALLATION</a></div>'
linkset[2]+='<div class="menuitems"><a href="category.asp?catid=29">POWER SUPPLY</a></div>'



//Cell Phone Stuff
linkset[3]='<div class="menuitems"><a href="category.asp?catid=6">PABX</a></div>'
linkset[3]+='<div class="menuitems"><a href="category.asp?catid=7">TELEPHONES</a></div>'
linkset[3]+='<div class="menuitems"><a href="category.asp?catid=8">BATTERIES LI-ON</a></div>'
linkset[3]+='<div class="menuitems"><a href="category.asp?catid=9">BATTERIES FOR AA-AAA-9V</a></div>'
linkset[3]+='<div class="menuitems"><a href="category.asp?catid=10">LI-ON CHARGERS FOR CAMCORDERS</a></div>'
linkset[3]+='<div class="menuitems"><a href="category.asp?catid=11">SMART BATTERY CHARGERS</a></div>'

//Misc.
linkset[4]='<div class="menuitems"><a href="category.asp?catid=44">HEWLETT PACKARD</a></div>'
linkset[4]+='<div class="menuitems"><a href="category.asp?catid=45">SAMSUNG</a></div>'
linkset[4]+='<div class="menuitems"><a href="category.asp?catid=46">BENQ</a></div>'
linkset[4]+='<div class="menuitems"><a href="category.asp?catid=47">ACER</a></div>'
linkset[4]+='<div class="menuitems"><a href="category.asp?catid=48">FUJITSU SIEMENS</a></div>'
linkset[4]+='<div class="menuitems"><a href="category.asp?catid=49">SONY</a></div>'
linkset[4]+='<div class="menuitems"><a href="category.asp?catid=50">TOSHIBA</a></div>'
linkset[4]+='<div class="menuitems"><a href="category.asp?catid=51">DELL</a></div>'
linkset[4]+='<div class="menuitems"><a href="category.asp?catid=56">A-OPEN</a></div>'
linkset[4]+='<div class="menuitems"><a href="category.asp?catid=61">CANON</a></div>'
linkset[4]+='<div class="menuitems"><a href="category.asp?catid=59">EPSON</a></div>'
linkset[4]+='<div class="menuitems"><a href="category.asp?catid=60">HITACHI</a></div>'
linkset[4]+='<div class="menuitems"><a href="category.asp?catid=57">NEC</a></div>'
linkset[4]+='<div class="menuitems"><a href="category.asp?catid=58">SHARP</a></div>'

//About
linkset[5]='<div class="menuitems"><a href="../admin/about.htm">about us</a></div>'
linkset[5]+='<div class="menuitems"><a href="../admin/about.htm">contact us</a></div>'
linkset[5]+='<div class="menuitems"><a href="../admin/privacy.htm">privacy policy</a></div>'
linkset[5]+='<div class="menuitems"><a href="../admin/disclaimer.htm">terms of service</a></div>'
linkset[5]+='<div class="menuitems"><a href="../admin/usability.htm">usability issues</a></div>'
////No need to edit beyond here

var ie4=document.all&&navigator.userAgent.indexOf("Opera")==-1
var ns6=document.getElementById&&!document.all
var ns4=document.layers

function showmenu(e,which){

if (!document.all&&!document.getElementById&&!document.layers)
return

clearhidemenu()

menuobj=ie4? document.all.popmenu : ns6? document.getElementById("popmenu") : ns4? document.popmenu : ""
menuobj.thestyle=(ie4||ns6)? menuobj.style : menuobj

if (ie4||ns6)
menuobj.innerHTML=which
else{
menuobj.document.write('<layer name=gui bgColor=#0099CC width=165 onmouseover="clearhidemenu()" onmouseout="hidemenu()">'+which+'</layer>')
menuobj.document.close()
}

menuobj.contentwidth=(ie4||ns6)? menuobj.offsetWidth : menuobj.document.gui.document.width
menuobj.contentheight=(ie4||ns6)? menuobj.offsetHeight : menuobj.document.gui.document.height
eventX=ie4? event.clientX : ns6? e.clientX : e.x
eventY=ie4? event.clientY : ns6? e.clientY : e.y
//menuobj.document.write(event.offsetX);



eventX = eventX-event.offsetX
//eventY = 323+event.offsetY;
eventY = eventY-event.offsetY+166;
/////


//Find out how close the mouse is to the corner of the window
var rightedge=ie4? document.body.clientWidth-eventX : window.innerWidth-eventX
var bottomedge=ie4? document.body.clientHeight-eventY : window.innerHeight-eventY

//if the horizontal distance isn't enough to accomodate the width of the context menu
if (rightedge<menuobj.contentwidth)
//move the horizontal position of the menu to the left by it's width
menuobj.thestyle.left=ie4? document.body.scrollLeft+eventX-menuobj.contentwidth : ns6? window.pageXOffset+eventX-menuobj.contentwidth : eventX-menuobj.contentwidth
else
//position the horizontal position of the menu where the mouse was clicked
menuobj.thestyle.left=ie4? document.body.scrollLeft+eventX : ns6? window.pageXOffset+eventX : eventX

//same concept with the vertical position
if (bottomedge<menuobj.contentheight)
menuobj.thestyle.top=ie4? document.body.scrollTop+eventY-menuobj.contentheight : ns6? window.pageYOffset+eventY-menuobj.contentheight : eventY-menuobj.contentheight
else
menuobj.thestyle.top=ie4? document.body.scrollTop+eventY : ns6? window.pageYOffset+eventY : eventY
menuobj.thestyle.visibility="visible"
return false
}

function contains_ns6(a, b) {
//Determines if 1 element in contained in another- by Brainjar.com
while (b.parentNode)
if ((b = b.parentNode) == a)
return true;
return false;
}

function hidemenu(){
if (window.menuobj)
menuobj.thestyle.visibility=(ie4||ns6)? "hidden" : "hide"
}

function dynamichide(e){
if (ie4&&!menuobj.contains(e.toElement))
hidemenu()
else if (ns6&&e.currentTarget!= e.relatedTarget&& !contains_ns6(e.currentTarget, e.relatedTarget))
hidemenu()
}

function delayhidemenu(){
if (ie4||ns6||ns4)
delayhide=setTimeout("hidemenu()",500)
}

function clearhidemenu(){
if (window.delayhide)
clearTimeout(delayhide)
}

function highlightmenu(e,state){
if (document.all)
source_el=event.srcElement
else if (document.getElementById)
source_el=e.target
if (source_el.className=="menuitems"){
source_el.id=(state=="on")? "mouseoverstyle" : ""
}
else{
while(source_el.id!="popmenu"){
source_el=document.getElementById? source_el.parentNode : source_el.parentElement
if (source_el.className=="menuitems"){
source_el.id=(state=="on")? "mouseoverstyle" : ""
}
}
}
}

if (ie4||ns6)
document.onclick=hidemenu


