/***********************************************
* AnyLink Drop Down Menu- © Dynamic Drive (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit http://www.dynamicdrive.com/ for full source code
***********************************************/

var disappeardelay=250  //menu disappear speed onMouseout (in miliseconds)
var enableanchorlink=0 //Enable or disable the anchor link when clicked on? (1=e, 0=d)
var hidemenu_onclick=1 //hide menu when user clicks within menu? (1=yes, 0=no)

/////No further editting needed

var ie5=document.all
var ns6=document.getElementById&&!document.all

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){
if (ie5||ns6)
dropmenuobj.style.left=dropmenuobj.style.top=-500
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=ie5 && !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=ie5 && !window.opera? iecompattest().scrollTop : window.pageYOffset
var windowedge=ie5 && !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 dropdownmenu(obj, e, dropmenuID){
if (window.event) event.cancelBubble=true
else if (e.stopPropagation) e.stopPropagation()
if (typeof dropmenuobj!="undefined") //hide previous menu
dropmenuobj.style.visibility="hidden"
clearhidemenu()
if (ie5||ns6){
obj.onmouseout=delayhidemenu
dropmenuobj=document.getElementById(dropmenuID)
if (hidemenu_onclick) dropmenuobj.onclick=function(){dropmenuobj.style.visibility='hidden'}
dropmenuobj.onmouseover=clearhidemenu
dropmenuobj.onmouseout=ie5? function(){ dynamichide(event)} : function(event){ dynamichide(event)}
showhide(dropmenuobj.style, e, "visible", "hidden")
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 ((ie5||ns6) && !enableanchorlink) 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 (ie5&&!dropmenuobj.contains(e.toElement))
delayhidemenu()
else if (ns6&&e.currentTarget!= e.relatedTarget&& !contains_ns6(e.currentTarget, e.relatedTarget))
delayhidemenu()
}

function delayhidemenu(){
delayhide=setTimeout("dropmenuobj.style.visibility='hidden'",disappeardelay)
}

function clearhidemenu(){
if (typeof delayhide!="undefined")
clearTimeout(delayhide)
}

function createMenuTop() {

  var newhtml = "";


newhtml = "<div id='anylinkmenu1' class='anylinkcss'>" + 
"<a href='/beef.html'>Beef</a>" + 
"<a href='/pork.html'>Pork</a>" + 
"<a href='/poultry.html'>Poultry</a>" + 
"<a href='/fish.html'>Fish &amp; Seafood</a>" + 
"<a href='/smoked.html'>Smoked Meats</a>" + 
"<a href='/specialty.html'>Specialty Meats</a>" + 
"</div>" + 

"<div id='anylinkmenu2' class='recipelinkcss'>" + 
"<a href='/recipes/apwings.html'>Apricot Glazed Chicken Wings</a>" + 
"<a href='/recipes/beeften.html'>Beef Tenderloin with Mushroom Sauce</a>" + 
"<a href='/recipes/bestribs.html'>Best Country Ribs</a>" + 
"<a href='/recipes/legolamb.html'>Boneless Leg of Lamb Roasting Guide</a>" + 
"<a href='/recipes/meatballhd.html'>Meatball Hors D'Oeuvres</a>" + 
"<a href='/recipes/primerib.html'>Boneless Prime Rib Roasting Guide</a>" + 
"<a href='/recipes/swmeatball.html'>Swedish Meatball Sauce</a>" + 
"</div>" +

"<div id='pagewrapper' align='center'> " + 
"<TABLE BORDER='0' class='bkg-table' cellpadding='0' cellspacing='0'>" + 
"  <TR>" + 
"    <TD valign='top'>" + 
"    <TABLE BORDER='0' BACKGROUND='' cellpadding='0' cellspacing='0' style='padding-top:45px;'>" + 
"		 <tr><td width='60'>&nbsp;</td><td align='center' width='680'><table border='0' cellspacing='0' cellpadding='0' width='680' style='margin-bottom: 14px;'>" + 
"    <tr> " + 
"      <td align='center' height='125' valign='bottom' rowspan='2'><a class='topnav' href='/about-us.html'>About Us</a></td>" + 
"      <td align='center' height='125' valign='bottom' rowspan='2'><a class='topnav' href='/recipes.html' onMouseover='dropdownmenu(this, event, \"anylinkmenu2\")'>Our Recipes</a></td>" + 
"      <td align='center' height='125' valign='bottom' rowspan='2'><a class='topnav' href='/index.html' onClick='return clickreturnvalue()' onMouseover='dropdownmenu(this, event, \"anylinkmenu1\")'>Products</a></td>" + 
"      <td style='width: 220px;' rowspan='2'><a href='/index.html'><img src='/images/logo-spacer.gif' border='0' width='220' height='125'></a></td>" + 
"      <td align='center' height='125' valign='bottom' rowspan='2'><a class='topnav' href='/orders.html'>Orders</a></td>" + 
"      <td align='center' height='100' colspan='2'><a href='/pdf/news/yobnews.pdf' target='_blank' style='display:block;width:100%;height:100%;text-decoration:none;'><br><br><br><br><font color='#ffff00'><strong>CLICK&nbsp;&nbsp;&nbsp;<br>HERE ></strong></font></a></td>" + 
"    </tr>" + 
"	<tr>" + 
"		<td valign='bottom'><a class='topnav' href='/processing.html'>Processing</a></td>" + 
"		<td valign='bottom'><a class='topnav' href='/contact.html'>Contact Us</a></td>" + 
"	</tr>" + 
"</table>";

  return newhtml;
}
