var menu1 = new Array();
menu1[0] = "<div class=\"dropped\" onMouseOut=\"hideMenu();this.className='dropped'\" onMouseOver=\"clearInterval(mierda);this.className='dropped_over'\" onClick=\"parent.location='camera_repair.php'\">Camera Repair</div>";
menu1[1] = "<div class=\"dropped\" onMouseOut=\"hideMenu();this.className='dropped'\" onMouseOver=\"clearInterval(mierda);this.className='dropped_over'\" onClick=\"parent.location='dealer_partners.php'\">Dealer Partners</div>";
menu1[2] = "<div class=\"dropped\" onMouseOut=\"hideMenu();this.className='dropped'\" onMouseOver=\"clearInterval(mierda);this.className='dropped_over'\" onClick=\"parent.location='altlookup.php'\">Repair Status Login</div>";
menu1[3] = "<div class=\"dropped\" onMouseOut=\"hideMenu();this.className='dropped'\" onMouseOver=\"clearInterval(mierda);this.className='dropped_over'\" onClick=\"parent.location='test_instruments.php'\">Test Instruments</div>";
menu1[4] = "<div class=\"dropped\" onMouseOut=\"hideMenu();this.className='dropped'\" onMouseOver=\"clearInterval(mierda);this.className='dropped_over'\" onClick=\"parent.location='mercury_battery_adapters.php'\">Mercury Battery Adapters</div>";
menu1[5] = "<div class=\"dropped\" onMouseOut=\"hideMenu();this.className='dropped'\" onMouseOver=\"clearInterval(mierda);this.className='dropped_over'\" onClick=\"parent.location='third_party_logistics.php'\">Third Party Logistics</div>";
menu1[6] = "<div class=\"dropped\" onMouseOut=\"hideMenu();this.className='dropped'\" onMouseOver=\"clearInterval(mierda);this.className='dropped_over'\" onClick=\"parent.location='third_party_logistics_pentax.php'\">Pentax</div>";

var menu2 = new Array();
menu2[0] = "<div class=\"dropped\" onMouseOut=\"hideMenu();this.className='dropped'\" onMouseOver=\"clearInterval(mierda);this.className='dropped_over'\" onClick=\"parent.location='employment.php'\">Employment</div>";
menu2[1] = "<div class=\"dropped\" onMouseOut=\"hideMenu();this.className='dropped'\" onMouseOver=\"clearInterval(mierda);this.className='dropped_over'\" onClick=\"parent.location='cris_walk_through.php'\">CRIS Walk Through</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 showMenu(menuarr,xloc,yloc,id,what){
if(id == 'nav1'){
document.getElementById('nav3').src = 'images/top_navigation_03.png';
} else if(id == 'nav3'){
document.getElementById('nav1').src = 'images/top_navigation_01.png';
}
document.getElementById('dropdiv').innerHTML = menuarr.join("");
document.getElementById('dropdiv').innerHTML += "<div class=\"bottomnav\">&nbsp;</div>";
//place the menu
xoffset = getposOffset(what,"left");
xpos = xoffset+xloc;
yoffset = getposOffset(what,"top");
ypos = yoffset+yloc;
document.getElementById('dropdiv').style.top = ypos+"px";
document.getElementById('dropdiv').style.left = xpos+"px";
// make it visible 
document.getElementById('dropdiv').style.display = "block";
}
function hideMenu(){
mierda = setTimeout('killMenu()',500);
}
function killMenu(){
document.getElementById('dropdiv').style.display = "none";
document.getElementById('nav1').src = 'images/top_navigation_01.png';
document.getElementById('nav3').src = 'images/top_navigation_03.png';
}

