/***********************************************
* AnyLink Vertical Menu- © Dynamic Drive (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit http://www.dynamicdrive.com/ for full source code
***********************************************/

	
var disappeardelay=350  //menu disappear speed onMouseout (in miliseconds)
var horizontaloffset=-10 //horizontal offset of menu from default location. (0-5 is a good value)

/////No further editting needed

var ie4=document.all
var ns6=document.getElementById&&!document.all

if (ie4||ns6)
document.write('<div id="dropmenudivV" style="visibility:hidden;width: 220px" onMouseover="clearhidemenuV()" onMouseout="dynamichideV(event)"></div>')

function getposOffsetV(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 showhideV(obj, e, visible, hidden, menuwidth){
if (ie4||ns6)
dropmenuobj.style.left=dropmenuobj.style.top=-500
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 iecompattestV(){
return (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body
}

function clearbrowseredgeV(obj, whichedge){
var edgeoffset=0
if (whichedge=="rightedge"){
var windowedge=ie4 && !window.opera? iecompattestV().scrollLeft+iecompattestV().clientWidth-15 : window.pageXOffset+window.innerWidth-15
dropmenuobj.contentmeasure=dropmenuobj.offsetWidth
if (windowedge-dropmenuobj.x-obj.offsetWidth < dropmenuobj.contentmeasure)
edgeoffset=dropmenuobj.contentmeasure+obj.offsetWidth
}
else{
var topedge=ie4 && !window.opera? iecompattestV().scrollTop : window.pageYOffset
var windowedge=ie4 && !window.opera? iecompattestV().scrollTop+iecompattestV().clientHeight-15 : window.pageYOffset+window.innerHeight-18
dropmenuobj.contentmeasure=dropmenuobj.offsetHeight
if (windowedge-dropmenuobj.y < dropmenuobj.contentmeasure){ //move menu up?
edgeoffset=dropmenuobj.contentmeasure-obj.offsetHeight
if ((dropmenuobj.y-topedge)<dropmenuobj.contentmeasure) //up no good either? (position at top of viewable window then)
edgeoffset=dropmenuobj.y
}
}
return edgeoffset
}

function populatemenuV(what){
if (ie4||ns6)
dropmenuobj.innerHTML=what.join("")
}


function dropdownmenuV(obj, e, menucontents, menuwidth){
if (window.event) event.cancelBubble=true
else if (e.stopPropagation) e.stopPropagation()
clearhidemenuV()
dropmenuobj=document.getElementById? document.getElementById("dropmenudivV") : dropmenudivV
populatemenuV(menucontents)

if (ie4||ns6){
showhideV(dropmenuobj.style, e, "visible", "hidden", menuwidth)
dropmenuobj.x=getposOffsetV(obj, "left")
dropmenuobj.y=getposOffsetV(obj, "top")
dropmenuobj.style.left=dropmenuobj.x-clearbrowseredgeV(obj, "rightedge")+obj.offsetWidth+horizontaloffset+"px"
dropmenuobj.style.top=dropmenuobj.y-clearbrowseredgeV(obj, "bottomedge")+"px"
}

return clickreturnvalueV()
}

function clickreturnvalueV(){
if (ie4||ns6) return false
else return true
}

function contains_ns6V(a, b) {
while (b.parentNode)
if ((b = b.parentNode) == a)
return true;
return false;
}

function dynamichideV(e){
if (ie4&&!dropmenuobj.contains(e.toElement))
delayhidemenuV()
else if (ns6&&e.currentTarget!= e.relatedTarget&& !contains_ns6V(e.currentTarget, e.relatedTarget))
delayhidemenuV()
}

function hidemenuV(e){
if (typeof dropmenuobj!="undefined"){
if (ie4||ns6)
dropmenuobj.style.visibility="hidden"
}
}

function delayhidemenuV(){
if (ie4||ns6)
delayhide=setTimeout("hidemenuV()",disappeardelay)
}

function clearhidemenuV(){
if (typeof delayhide!="undefined")
clearTimeout(delayhide)
}



