var menuwidth='150px' //default menu width
var menubgcolor='#ffffff'  //menu bgcolor
var disappeardelay=100  //menu disappear speed onMouseout (in miliseconds)
var hidemenu_onclick="yes" //hide menu when user clicks within menu?
var menuLeftPos = '-2px' //Position Menu Left

function DoMenuHover(id){
	document.getElementById(id).className='tdmenuhover'
	}

function DoMenuOut(id){
	document.getElementById(id).className='tdmenu'
	}
	
function DoSwapMenu(id){
	ImagePath = id + '_over.gif'
	document.getElementById(id).src = 'images/'+ImagePath
}
	
function DoSwapMenuReturn(id){
	ImagePath = id + '_up.gif'
	document.getElementById(id).src = 'images/'+ImagePath
}

function DoNav(id){
	strPath = id + '.asp'
	window.location.href=strPath
	}

//Contents for System Features Menu
var SystemMenu=new Array()
SystemMenu[0]='<table cellpadding="0" cellspacing="0" border="0" style="width:'+menuwidth+'">'
SystemMenu[1]='<tr><td class="tdmenu"><img src="images/SystemOverview_up.gif" id="SystemOverview" onmouseover="DoSwapMenu(id)" onmouseout="DoSwapMenuReturn(id)" onclick="javascript:DoNav(id)"></td></tr>'
SystemMenu[2]='<tr><td height="1"><img src="images/menuspacer.gif" height="1" width="150"></td></tr>'
SystemMenu[3]='<tr><td class="tdmenu"><img src="images/HowItWorks_up.gif" id="HowItWorks" onmouseover="DoSwapMenu(id)" onmouseout="DoSwapMenuReturn(id)"  onclick="DoNav(id)"></td></tr>'
SystemMenu[4]='</table>'

//Contents for Recruitment Menu
var RecMenu=new Array()
RecMenu[0]='<table cellpadding="0" cellspacing="0" border="0" style="width:'+menuwidth+'">'
RecMenu[1]='<tr><td class="tdmenu"><img src="images/RecOverview_up.gif" id="RecOverview" onmouseover="DoSwapMenu(id)" onmouseout="DoSwapMenuReturn(id)"  onclick="DoNav(id)"></td></tr>'
RecMenu[2]='<tr><td height="1"><img src="images/menuspacer.gif" height="1" width="150"></tr>'
RecMenu[3]='<tr><td class="tdmenu"><img src="images/RecFeatures_up.gif" id="RecFeatures" onmouseover="DoSwapMenu(id)" onmouseout="DoSwapMenuReturn(id)"  onclick="DoNav(id)"></td></tr>'
RecMenu[4]='<tr><td height="1"><img src="images/menuspacer.gif" height="1" width="150"></tr>'
RecMenu[5]='<tr><td class="tdmenu"><img src="images/RecAgencies_up.gif" id="RecAgencies" onmouseover="DoSwapMenu(id)" onmouseout="DoSwapMenuReturn(id)"  onclick="DoNav(id)"></td></tr>'
RecMenu[6]='</table>'

//Contents for HR Menu
var HRMenu=new Array()
HRMenu[0]='<table cellpadding="0" cellspacing="0" border="0" style="width:'+menuwidth+'">'
HRMenu[1]='<tr><td class="tdmenu"><img src="images/HROverview_up.gif" id="HROverview" onmouseover="DoSwapMenu(id)" onmouseout="DoSwapMenuReturn(id)"  onclick="DoNav(id)"></td></tr>'
HRMenu[2]='<tr><td height="1"><img src="images/menuspacer.gif" height="1" width="150"></tr>'
HRMenu[3]='<tr><td class="tdmenu"><img src="images/HRFeatures_up.gif" id="HRFeatures" onmouseover="DoSwapMenu(id)" onmouseout="DoSwapMenuReturn(id)"  onclick="DoNav(id)"></td></tr>'
HRMenu[4]='</table>'

//Contents for Scheduling Menu
var SchedMenu=new Array()
SchedMenu[0]='<table cellpadding="0" cellspacing="0" border="0" style="width:'+menuwidth+'">'
SchedMenu[1]='<tr><td class="tdmenu"><img src="images/SchedOverview_up.gif" id="SchedOverview" onmouseover="DoSwapMenu(id)" onmouseout="DoSwapMenuReturn(id)"  onclick="DoNav(id)"></td></tr>'
SchedMenu[2]='<tr><td height="1"><img src="images/menuspacer.gif" height="1" width="150"></tr>'
SchedMenu[3]='<tr><td class="tdmenu"><img src="images/SchedFeatures_up.gif" id="SchedFeatures" onmouseover="DoSwapMenu(id)" onmouseout="DoSwapMenuReturn(id)"  onclick="DoNav(id)"></td></tr>'
SchedMenu[4]='</table>'

//Contents for Payroll Menu
var PayrollMenu=new Array()
PayrollMenu[0]='<table cellpadding="0" cellspacing="0" border="0" style="width:'+menuwidth+'">'
PayrollMenu[1]='<tr><td class="tdmenu"><img src="images/PayOverview_up.gif" id="PayOverview" onmouseover="DoSwapMenu(id)" onmouseout="DoSwapMenuReturn(id)"  onclick="DoNav(id)"></td></tr>'
PayrollMenu[2]='<tr><td height="1"><img src="images/menuspacer.gif" height="1" width="150"></tr>'
PayrollMenu[3]='<tr><td class="tdmenu"><img src="images/PayFeatures_up.gif" id="PayFeatures" onmouseover="DoSwapMenu(id)" onmouseout="DoSwapMenuReturn(id)"  onclick="DoNav(id)"><td></tr>'
PayrollMenu[4]='<tr><td height="1"><img src="images/menuspacer.gif" height="1" width="150"></tr>'
PayrollMenu[5]='<tr><td class="tdmenu"><img src="images/PayrollBureau_up.gif" id="PayrollBureau" onmouseover="DoSwapMenu(id)" onmouseout="DoSwapMenuReturn(id)"  onclick="DoNav(id)"><td></tr>'
//PayrollMenu[6]='<tr><td height="1"><img src="images/menuspacer.gif" height="1" width="150"></tr>'
//PayrollMenu[7]='<tr><td class="tdmenu"><img src="images/SmallCompanyPayroll_up.gif" id="SmallCompanyPayroll" onmouseover="DoSwapMenu(id)" onmouseout="DoSwapMenuReturn(id)"  onclick="DoNav(id)"><td></tr>'
PayrollMenu[6]='</table>'

//Contents for Other Menu
var OtherMenu=new Array()
OtherMenu[0]='<table cellpadding="0" cellspacing="0" border="0" style="width:'+menuwidth+'">'
OtherMenu[1]='<tr><td class="tdmenu" id="OtherProduct1" onclick="DoNav(id)">Other 1</td></tr>'
OtherMenu[2]='<tr><td height="1"><img src="images/menuspacer.gif" height="1" width="150"></tr>'
OtherMenu[3]='<tr><td class="tdmenu" id="OtherProduct2" onclick="DoNav(id)">Other 2</td></tr>'
OtherMenu[4]='<tr><td height="1"><img src="images/menuspacer.gif" height="1" width="150"></tr>'
OtherMenu[5]='<tr><td class="tdmenu" id="OtherProduct3" onclick="DoNav(id)">Other 3</td></tr>'
OtherMenu[6]='</table>'
		

/////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:'+menuwidth+';background-color:'+menubgcolor+'" onMouseover="clearhidemenu()" onMouseout="dynamichide(event)">')
document.write('</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=-500
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 windowedge=ie4 && !window.opera? iecompattest().scrollTop+iecompattest().clientHeight-15 : window.pageYOffset+window.innerHeight-18
dropmenuobj.contentmeasure=dropmenuobj.offsetHeight
if (windowedge-dropmenuobj.y < dropmenuobj.contentmeasure)
edgeoffset=dropmenuobj.contentmeasure+obj.offsetHeight
}
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