//Contents for menu 1
var menu1=new Array()
menu1[0]='<a href="Rwc_About.asp">About RWC</a>'
menu1[1]='<a href="Rwc_Crop.asp">RW Systems</a>'
menu1[2]='<a href="Rwc_Igp.asp">Indo-Gangetic Plains</a>'
menu1[3]='<a href="Rwc_Stake.asp">Partners</a>'
menu1[4]='<a href="Rwc_Donors.asp">Donors</a>'
menu1[5]='<a href="Rwc_Members.asp">Membership</a>'
menu1[6]='<a href="RSCRTCC/index.asp" target="_blank">Steering &amp; Coordination</a>'
menu1[7]='<a href="Rwc_Jobs.asp">Work with us</a>'
menu1[7]='<a href="Int_LinksHome.asp">Resources</a>'
//Contents for menu 2, and so on
var menu2=new Array()
menu2[0]='<a href="Rwc_Events.asp">Latest Events</a>'
menu2[1]='<a href="Rwc_Visitors.asp">Visitors</a>'
menu2[2]='<a href="Int_PressHome.asp">Newsstand</a>'
menu2[3]='<a href="Rwc_Events.asp?p=1">ADB Project</a>'
menu2[4]='<a href="Rwc_Events.asp?p=2">USAID Project</a>'
menu2[5]='<a href="Rwc_Events.asp?p=4">SLP Project</a>'
//Contents for menu 3
var menu3=new Array()
menu3[0]='<a href="Theme_Till.asp">Tillage and Crop Establishment</a>'
menu3[1]='<a href="Theme_Weeds.asp">Weed and Pest Management</a>'
menu3[2]='<a href="Theme_Nutrient.asp">Nutrient Management</a>'
menu3[3]='<a href="Theme_Water.asp">Water Management</a>'
menu3[4]='<a href="Theme_Socio.asp">Socio-Economics</a>'
menu3[5]='<a href="Theme_KM.asp">Knowledge Management</a>'

//Contents for menu 4
var menu4=new Array()
menu4[0]='<a href="Rwc_PubNew.asp">New Releases</a>'
menu4[1]='<a href="Pub_Datasheets.asp">Datasheets</a>'
menu4[2]='<a href="Pub_Main.asp">Digital Library</a>'
menu4[3]='<a href="Pub_Authors.asp">Authors</a>'
menu4[4]='<a href="Int_FAQHome.asp">Zero-Till FAQ</a>'
menu4[5]='<a href="Pub_Themes.aspx">By Research Theme</a>'
var menu6=new Array()
menu6[0]='<a href="Farm_Dir.asp">Directory</a>'
menu6[1]='<a href="Farm_ProductSelection.asp">Machinery Suppliers</a>'
menu6[2]='<a href="Farm_Laser.asp">Laser-leveler Suppliers</a>'

var disappeardelay=250//menu disappear speed onMouseout (in miliseconds)
var horizontaloffset=2//horizontal offset of menu from default location. (0-5 is a good value)
/////No further editing needed
var ie4=document.all;var ns6=document.getElementById&&!document.all
if(ie4||ns6)
document.write('<div id="dropmenudiv" style="visibility:hidden;width: 160px" 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)
d.style.left=d.style.top=-500
d.widthobj=d.style
d.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 c(){
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?c().scrollLeft+c().clientWidth-15:window.pageXOffset+window.innerWidth-15
d.contentmeasure=d.offsetWidth
if(windowedge-d.x-obj.offsetWidth<d.contentmeasure)
edgeoffset=d.contentmeasure+obj.offsetWidth
}
else{
var topedge=ie4&&!window.opera?c().scrollTop:window.pageYOffset
var windowedge=ie4&&!window.opera?c().scrollTop+c().clientHeight-15:window.pageYOffset+window.innerHeight-18
d.contentmeasure=d.offsetHeight
if(windowedge-d.y<d.contentmeasure){//move menu up?
edgeoffset=d.contentmeasure-obj.offsetHeight
if((d.y-topedge)<d.contentmeasure)//up no good either? (position at top of viewable window then)
edgeoffset=d.y
}
}
return edgeoffset
}
function populatemenu(what){
if(ie4||ns6)
d.innerHTML=what.join("")
}
function dropdownmenu(obj,e,menucontents,menuwidth){
if(window.event)event.cancelBubble=true
else if(e.stopPropagation)e.stopPropagation()
clearhidemenu()
d=document.getElementById?document.getElementById("dropmenudiv"):dropmenudiv
populatemenu(menucontents)
if(ie4||ns6){
showhide(d.style,e,"visible","hidden",menuwidth)
d.x=getposOffset(obj,"left")
d.y=getposOffset(obj,"top")
d.style.left=d.x-clearbrowseredge(obj,"rightedge")+obj.offsetWidth+horizontaloffset+"px"
d.style.top=d.y-clearbrowseredge(obj,"bottomedge")+"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&&!d.contains(e.toElement))
delayhidemenu()
else if(ns6&&e.currentTarget!=e.relatedTarget&&!contains_ns6(e.currentTarget,e.relatedTarget))
delayhidemenu()
}
function hidemenu(e){
if(typeof d!="undefined"){
if(ie4||ns6)
d.style.visibility="hidden"
}
}
function delayhidemenu(){
if(ie4||ns6)
delayhide=setTimeout("hidemenu()",disappeardelay)
}
function clearhidemenu(){
if(typeof delayhide!="undefined")
clearTimeout(delayhide)
}
