
//Contents for menu 1
var aboutKDAMenu=new Array()
aboutKDAMenu[0]='<a href="/commissioner/index.htm">Commissioners Corner</a>'
aboutKDAMenu[1]='<a href="/aginfo/empdirectory/kdaemployees.aspx">Find a KDA employee</a>'
aboutKDAMenu[2]='<a href="/forms/index.htm">KDA Forms</a>'
aboutKDAMenu[3]='<a href="/strategic/personnel_budget/employment.htm">KDA Job Opportunities</a>'
aboutKDAMenu[4]='<a href="/strategic/personnel_budget/orgchart.mht"  target="_blank">KDA Organizational Chart</a>'
aboutKDAMenu[5]='<a href="/sitemap.htm">KDA Sitemap</a>'
aboutKDAMenu[6]='<a href="/marketing/index.htm">Office of Agricultural Marketing & Product Promotion</a>'
aboutKDAMenu[7]='<a href="/consumer/index.htm">Office for Consumer & Environmental Protection</a>'
aboutKDAMenu[8]='<a href="/statevet/index.htm">Office of State Veterinarian</a>'
aboutKDAMenu[9]='<a href="/strategic/index.htm">Office for Strategic Planning & Administration</a>'

//Contents for menu 2, and so on
var directoriesMenu=new Array()

directoriesMenu[0]='<a href="/forms/aglinks.htm">Ag Links</a>'
directoriesMenu[1]='<a href="/marketing/farmmarket/index.htm">Farmers Markets Directory</a>'
directoriesMenu[2]='<a href="/buyky/corral/haylistingpara.asp">Hay For Sale (Tested)</font></a>'
directoriesMenu[3]='<a href="/aginfo/empdirectory/kdaemployees.aspx">KDA Staff Directory</a>'
directoriesMenu[4]='<a href="/aginfo/agdirectory/index.aspx">Kentucky Ag Directory</a>'
directoriesMenu[5]='<a href="/pr/agstats/index.htm">KY Agriculture Statistics</font></a>'
directoriesMenu[6]='<a href="/marketing/plantmktg/plantguide/PLANT.htm">Landscape Plant Availability Guide</a>'
directoriesMenu[7]='<a href="/marketing/marketingmatters/index.htm">Marketing Matters</a>'
directoriesMenu[8]='<a href="/marketing/animalmktg/PurebredBreedersDir.aspx">Purebred Breeders Directory</font></a>'
directoriesMenu[9]='<a href="/marketing/plantmktg/Sod.htm">Sod Producers</a>'

var newseventsMenu=new Array()
newseventsMenu[0]='<a href="/aginfo/events/events.aspx">Calendar of Ag Events</a>'
newseventsMenu[1]='<a href="/pr/kan/index.htm">KY Agricultural News</a>'
newseventsMenu[2]='<a href="/pr/newscenter/index.htm">News Center</a>'
newseventsMenu[3]='<a href="/pr/news/index.htm">News Releases</a>'


var educationMenu=new Array()
educationMenu[0]='<a href="/marketing/ageducation/index.htm">Ag in the Classroom</a>'
educationMenu[1]='<a href="/marketing/farmsafety/index.htm">Farm & Home Safety</a>'
educationMenu[2]='<a href="/pr/newscenter/index.htm">News Center</a>'
educationMenu[3]='<a href="/consumer/envsvs/testing/index.htm">Pesticide Training and Testing</a>'
educationMenu[4]='<a href="/pesticide/agr_pco.aspx">Status of Individual Testing & Certification</a>'

var buysellMenu=new Array()
buysellMenu[0]='<a href="/marketing/index.htm">Agriculture Marketing</a>'
buysellMenu[1]='<a href="/marketing/marketreports/index.htm">Check Market Prices</a>'
buysellMenu[2]='<a href="/buyky/webbuild/index.htm">Free Web Page</a>'
buysellMenu[3]='<a href="/buyky/corral/haylistingpara.asp">Hay for Sale (Tested)</a>'
buysellMenu[4]='<a href="/marketing/forage/hayforagedroughtrelief.htm">Hay Hotline</a>'
buysellMenu[5]='<a href="/kyproud/index.htm">KY Proud</a>'
buysellMenu[6]='<a href="/forms/documents/KYProudApplication2009.pdf">KY Proud Application (PDF)</a>'
buysellMenu[7]='<a href="/kyproud/compsearch.aspx">KY Proud - Find Producers</a>'
buysellMenu[8]='<a href="/kyproud/prodsearch.aspx">KY Proud - Find Products</a>'
buysellMenu[9]='<a href="/marketing/animalmktg/PurebredBreedersDir.aspx">Purebred Breeders Directory</font></a>'
buysellMenu[10]='<a href="/buyky/index.htm">Shop the Country / Farm Store</a>'
buysellMenu[11]='<a href="/marketing/plantmktg/Sod.htm">Sod Producers</a>'


var consProtMenu=new Array()
consProtMenu[0]='<a href="/statevet/index.htm">Animal Health</a>'
consProtMenu[1]='<a href="/pr/consumerinfo/index.htm">Consumer Information</a>'
consProtMenu[2]='<a href="/consumer/envsvs/index.htm">Environmental Protection</a>'
consProtMenu[3]='<a href="/marketing/farmsafety/index.htm">Farm and Home Safety</a>'
consProtMenu[4]='<a href="/statevet/homelandsecurity/index.htm">Homeland Security</a>'
consProtMenu[5]='<a href="/consumer/ri/index.htm">Regulation and Inspection</a>'

var kyproudMenu=new Array()
kyproudMenu[0]='<a href="/forms/documents/KYProudApplication2009.pdf">KY Proud Application (PDF)</a>'
kyproudMenu[1]='<a href="/kyproud/compsearch.aspx">Find KY Proud Producers</a>'
kyproudMenu[2]='<a href="/kyproud/prodsearch.aspx">Find KY Proud Products</a>'
kyproudMenu[2]='<a href="/marketing/farmmarket/atcostitems.htm">At-Cost Program</a>'

		
var menuwidth='200px' //default menu width
var menubgcolor='light blue'  //menu bgcolor
var disappeardelay=250  //menu disappear speed onMouseout (in miliseconds)
var horizontaloffset=2
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||firefox)
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