/***********************************************
* AnyLink Drop Down menusub- © Dynamic Drive (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit http://www.dynamicdrive.com/ for full source code
***********************************************/

//Contents for menusub 1
var menusub1=new Array()
menusub1[0]='<a href="mission.php" class="whitelink">Our Mission</a>'
menusub1[1]='<a href="measured.php" class="whitelink">How The Best Is Measured</a>'
menusub1[2]='<a href="commitment_clients.php" class="whitelink">To Our Clients</a>'
menusub1[3]='<a href="commitment_candidate.php" class="whitelink">To The Candidate</a>'

		
var menusubwidth='250px' //default menusub width
var menusubbgcolor='#4C7CAB'  //menusub bgcolor
var disappeardelay=250  //menusub disappear speed onMouseout (in miliseconds)
var hidemenusub_onclick="yes" //hide menusub when user clicks within menusub?

/////No further editting needed

var ie4=document.all
var ns6=document.getElementById&&!document.all

if (ie4||ns6)
document.write('<div id="dropmenusubdiv" style="visibility:hidden;width:'+menusubwidth+';background-color:'+menusubbgcolor+'" onMouseover="clearhidemenusub()" 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, menusubwidth){
if (ie4||ns6)
dropmenusubobj.style.left=dropmenusubobj.style.top="-500px"
if (menusubwidth!=""){
dropmenusubobj.widthobj=dropmenusubobj.style
dropmenusubobj.widthobj.width=menusubwidth
}
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
dropmenusubobj.contentmeasure=dropmenusubobj.offsetWidth
if (windowedge-dropmenusubobj.x < dropmenusubobj.contentmeasure)
edgeoffset=dropmenusubobj.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
dropmenusubobj.contentmeasure=dropmenusubobj.offsetHeight
if (windowedge-dropmenusubobj.y < dropmenusubobj.contentmeasure){ //move up?
edgeoffset=dropmenusubobj.contentmeasure+obj.offsetHeight
if ((dropmenusubobj.y-topedge)<dropmenusubobj.contentmeasure) //up no good either?
edgeoffset=dropmenusubobj.y+obj.offsetHeight-topedge
}
}
return edgeoffset
}

function populatemenusub(what){
if (ie4||ns6)
dropmenusubobj.innerHTML=what.join("")
}


function dropdownmenusub(obj, e, menusubcontents, menusubwidth){
if (window.event) event.cancelBubble=true
else if (e.stopPropagation) e.stopPropagation()
clearhidemenusub()
dropmenusubobj=document.getElementById? document.getElementById("dropmenusubdiv") : dropmenusubdiv
populatemenusub(menusubcontents)

if (ie4||ns6){
showhide(dropmenusubobj.style, e, "visible", "hidden", menusubwidth)
dropmenusubobj.x=getposOffset(obj, "left")
dropmenusubobj.y=getposOffset(obj, "top")
dropmenusubobj.style.left=dropmenusubobj.x-clearbrowseredge(obj, "rightedge")+"px"
dropmenusubobj.style.top=dropmenusubobj.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&&!dropmenusubobj.contains(e.toElement))
delayhidemenusub()
else if (ns6&&e.currentTarget!= e.relatedTarget&& !contains_ns6(e.currentTarget, e.relatedTarget))
delayhidemenusub()
}

function hidemenusub(e){
if (typeof dropmenusubobj!="undefined"){
if (ie4||ns6)
dropmenusubobj.style.visibility="hidden"
}
}

function delayhidemenusub(){
if (ie4||ns6)
delayhide=setTimeout("hidemenusub()",disappeardelay)
}

function clearhidemenusub(){
if (typeof delayhide!="undefined")
clearTimeout(delayhide)
}

if (hidemenusub_onclick=="yes")
document.onclick=hidemenusub

