/*
 * This javascript function is to build the top navigation component
 * on the page. 
 * The dropdownmenu function creates the second level dropdown menu option
 * The showhide function is used to show / remove the dropdown menu option
 * disapperdelay variable is used the set the interval after which the dropdown
 * is hidden after mouse out even by user.
 * The textHoverColor and textColor are used to set the font color and background
 * color for the menu items. 
 */
var setNavColorFn = true;
var textHoverColor = '#009dd9';
var textColor = '#5c5d5f';
var disappeardelay=250,enableanchorlink=1,hidemenu_onclick=1,linkObj,ie5=document.all,ns6=document.getElementById&&!document.all;function getposOffset(a,b){var c=b=="left"?a.offsetLeft:a.offsetTop;for(a=a.offsetParent;a!=null;){c=b=="left"?c+a.offsetLeft:c+a.offsetTop;a=a.offsetParent}return c}function showhide(a,b,c,d){if(ie5||ns6)dropmenuobj.style.left=dropmenuobj.style.top=-700;if(b.type=="click"&&a.visibility==d||b.type=="mouseover")a.visibility=c;else if(b.type=="click")a.visibility=d}
function iecompattest(){return document.compatMode&&document.compatMode!="BackCompat"?document.documentElement:document.body}
function clearbrowseredge(a,b){var c=0;if(b=="rightedge"){b=ie5&&!window.opera?iecompattest().scrollLeft+iecompattest().clientWidth-15:window.pageXOffset+window.innerWidth-15;dropmenuobj.contentmeasure=dropmenuobj.offsetWidth;if(b-dropmenuobj.x<dropmenuobj.contentmeasure)c=dropmenuobj.contentmeasure-a.offsetWidth}else{var d=ie5&&!window.opera?iecompattest().scrollTop:window.pageYOffset;b=ie5&&!window.opera?iecompattest().scrollTop+iecompattest().clientHeight-15:window.pageYOffset+window.innerHeight-
18;dropmenuobj.contentmeasure=dropmenuobj.offsetHeight;if(b-dropmenuobj.y<dropmenuobj.contentmeasure){c=dropmenuobj.contentmeasure+a.offsetHeight;if(dropmenuobj.y-d<dropmenuobj.contentmeasure)c=dropmenuobj.y+a.offsetHeight-d}}return c}
function dropdownmenu(a,b,c){linkObj=a;if(window.event)event.cancelBubble=true;else b.stopPropagation&&b.stopPropagation();if(typeof dropmenuobj!="undefined")dropmenuobj.style.visibility="hidden";clearhidemenu();if(ie5||ns6){a.onmouseout=delayhidemenu;dropmenuobj=document.getElementById(c);if(hidemenu_onclick)dropmenuobj.onclick=function(){dropmenuobj.style.visibility="hidden"};dropmenuobj.onmouseover=clearhidemenu;dropmenuobj.onmouseout=ie5?function(){dynamichide(event)}:function(d){dynamichide(d)};
showhide(dropmenuobj.style,b,"visible","hidden");dropmenuobj.x=getposOffset(a,"left");dropmenuobj.y=getposOffset(a,"top");dropmenuobj.style.left=dropmenuobj.x-clearbrowseredge(a,"rightedge")+"px";dropmenuobj.style.top=dropmenuobj.y-clearbrowseredge(a,"bottomedge")+a.offsetHeight+"px";dropmenuobj.style.width=dropmenuobj.offsetWidth>160?dropmenuobj.clientWidth:"160px";dropmenuobj.style.zIndex=15000}return clickreturnvalue()}function clickreturnvalue(){return(ie5||ns6)&&!enableanchorlink?false:true}
function contains_ns6(a,b){for(;b.parentNode;)if((b=b.parentNode)==a)return true;return false}function dynamichide(a){if(ie5&&!dropmenuobj.contains(a.toElement))delayhidemenu();else ns6&&a.currentTarget!=a.relatedTarget&&!contains_ns6(a.currentTarget,a.relatedTarget)&&delayhidemenu()}
function delayhidemenu(){
    delayhide=setTimeout('if( document.getElementById(linkObjSelected)!=linkObj){linkObj.style.color=textColor;}dropmenuobj.style.visibility=\'hidden\'',disappeardelay)}function clearhidemenu(){typeof delayhide!="undefined"&&clearTimeout(delayhide)}function nielsenGenericSwf(a,b,c,d,e,f){a=new SWFObject(a,b,c,d,e);a.addParam("wmode","transparent");a.addParam("scale","noscale");a.write(f)}


