function showmenu(elmnt)
{
document.getElementById(elmnt).style.visibility="visible";
}
function hidemenu(elmnt)
{
document.getElementById(elmnt).style.visibility="hidden";
}

/*
// create the dhtml menu when flash is not available.  error msg + link is displayed first then the menu + logo
function generatemenu(errorflag)
{
//output the error msg / links
var errormsg ='<tr align="center"><td><font color="#ff0000" face="Arial, Helvetica, sans-serif" size="3"><b>To bring you the best experience possible this web site makes use<br> of Adobe Flash software. You have an older version of the<br> Flash player that cannot show the content we have created.</b></font>' +
'<P><font face="Arial, Helvetica, sans-serif" color="#aa00">Why not <A HREF="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash">download and install</A> the latest version now? It will only take a moment. </font>'+ 
'<P><FONT FACE="Verdana, Arial, Helvetica, sans-serif" SIZE="1" color="#bbbbbb">Macromedia and Flash are trademarks of Macromedia, Inc.</FONT></td></tr>';

var menustart ='<tr align="center"><td><table width="800" border="0" cellpadding="0" cellspacing="0"><tr><td><table class="noflash"><tr>' +
               '<td width="20"></td>';


var homenav =  '<td onmouseover="showmenu(\'home\')" onmouseout="hidemenu(\'home\')">'+
                   '<a href="/index.php">Home&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a><br />'+
                   '<table class="noflashmenu" id="home" width="60" border="0" cell padding="4">'+ 
                   '</table>'+
               '</td>';

var aboutnav = '<td onmouseover="showmenu(\'aboutus\')" onmouseout="hidemenu(\'aboutus\')">'+
                   '<a href="/aboutus.php">About us&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a><br />'+
                   '<table class="noflashmenu"  id="aboutus">'+
                      '<tr><td nowrap><a href="/briefhistory.php">A Brief Corporate History</a></td></tr>'+
                      '<tr><td nowrap><a href="/management.php">Management Team</a></td></tr>'+
                      '<tr><td nowrap><a href="/careers.php">Careers</a></td></tr>'+
                   '</table>'+
                '</td>';

var operationav = '<td onmouseover="showmenu(\'operations\')" onmouseout="hidemenu(\'operations\')">'+
                      '<a href="/operations.php">Operations&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a><br />'+
                      '<table class="noflashmenu"  id="operations">'+
                        '<tr><td nowrap><a href="/langleyhog.php">Britco Pork Inc.</a></td></tr>'+
                        '<tr><td nowrap><a href="/richmondlogistic.php">Donald\'s Fine Foods - Richmond BC</a></td></tr>'+
                      '</table>'+
                  '</td>';


var productnav = '<td onmouseover="showmenu(\'products\')" onmouseout="hidemenu(\'products\')">'+
                    '<a href="/products.php">Products&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a><br />'+
                    '<table class="noflashmenu"  id="products">'+
                        '<tr><td nowrap><a href="/ourbrands.php">Our Brands</a></td></tr>'+   
                        '<tr><td nowrap><a href="/partners.php">Partners</a></td></tr>'+
                        '<tr><td nowrap><a href="/thirdparty.php">Other Product Lines</a></td></tr>'+   
                    '</table>'+
                 '</td>';

var recipesnav = '<td onmouseover="showmenu(\'recipes\')" onmouseout="hidemenu(\'recipes\')">'+
                      '<a href="/recipes.php">Recipes&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a><br />'+
                      '<table class="noflashmenu"  id="recipes">'+ 
                      '</table>'+
                 '</td>';

var contactnav = '<td onmouseover="showmenu(\'contactus\')" onmouseout="hidemenu(\'contactus\')">'+
                    '<a href="/contactus.php">Contact us</a><br />'+
                    '<table class="noflashmenu"  id="contactus">'+
                    '</table>'+
                 '</td>';
  
var menuend = '<td width="20"></td>'+  
              '</tr></table></td></tr></table></td></tr>';              
              
var banner =  '<tr align="center"><td><table width="775"><tr><td><br><p align="left"><img height="141" width="271" alt="" src="/images/dff_logo.jpg" /></p><br></td></tr></table></td></tr>';

var newbanner = '<tr align="center"><td><table width="100%" align="center" cellpadding="0" cellspacing="0"><tr><td><p align="center"><img height="344" width="800" alt="" src="/images/banners/main.jpg" /></p></td></tr></table></td></tr>';

if (errorflag)
{
  document.write(errormsg);
}
document.write(menustart)
document.write(homenav);
document.write(aboutnav);
document.write(operationav);
document.write(productnav);
document.write(recipesnav);
document.write(contactnav);
document.write(menuend);
document.write(newbanner);

}
*/
// create the dhtml menu when flash is not available.  error msg + link is displayed first then the menu + logo
function generatemenu(errorflag, pageid)
{

var footer = '?flash=no';

if(errorflag)
{
  footer='';
}
//output the error msg / links
var errormsg ='<tr align="center"><td style="color: #ff0000; font-family:Arial, Helvetica, sans-serif; font-size: 12px;"><strong>To bring you the best experience possible this web site makes use<br> of Adobe Flash software. You have an older version of the<br> Flash player that cannot show the content we have created.</strong>' +
'<p style="color:#aa00;">Why not <A HREF="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash">download and install</A> the latest version now? It will only take a moment.'+ 
'<P style="font-family:Verdana, Arial, Helvetica, sans-serif; font-size:10px; color: #bbb;">Macromedia and Flash are trademarks of Macromedia, Inc.<br /><br /></td></tr>';

var menustart ='<tr align="center"><td><table width="800" border="0" cellpadding="0" cellspacing="0"><tr><td><table class="noflash"><tr>' +
               '<td width="20"></td>';


var homenav =  '<td onmouseover="showmenu(\'home\')" onmouseout="hidemenu(\'home\')">'+
                   '<a href="/index.php' + footer + '"><strong>Home</strong>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a><br />'+
                   '<table class="noflashmenu" id="home" width="60" border="0" cell padding="4">'+ 
                   '</table>'+
               '</td>';

var aboutnav = '<td onmouseover="showmenu(\'aboutus\')" onmouseout="hidemenu(\'aboutus\')">'+
                   '<a href="/aboutus.php' + footer + '"><strong>About Us</strong>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a><br />'+
                   '<table class="noflashmenu"  id="aboutus">'+
                      '<tr><td nowrap><a href="/briefhistory.php' + footer + '">A Brief Corporate History</a></td></tr>'+
                      '<tr><td nowrap><a href="/news_archive.php' + footer + '">Recent News</a></td></tr>'+
                      '<tr><td nowrap><a href="/careers.php' + footer + '">Careers</a></td></tr>'+
                   '</table>'+
                '</td>';

var operationav = '<td onmouseover="showmenu(\'operations\')" onmouseout="hidemenu(\'operations\')">'+
                      '<a href="/operations.php' + footer + '"><strong>Operations</strong>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a><br />'+
                      '<table class="noflashmenu"  id="operations">'+
                        '<tr><td nowrap><a href="/langleyhog.php' + footer + '">Britco Pork Inc.</a></td></tr>'+
                        '<tr><td nowrap><a href="/richmondlogistic.php' + footer + '">Donald\'s Fine Foods - Richmond BC</a></td></tr>'+
                      '</table>'+
                  '</td>';


var productnav = '<td onmouseover="showmenu(\'products\')" onmouseout="hidemenu(\'products\')">'+
                    '<a href="/products.php' + footer + '"><strong>Products</strong>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a><br />'+
                    '<table class="noflashmenu"  id="products">'+
                        '<tr><td nowrap><a href="/ourbrands.php' + footer + '">Our Brands</a></td></tr>'+   
                        '<tr><td nowrap><a href="/partners.php' + footer + '">Partners</a></td></tr>'+
                        '<tr><td nowrap><a href="/thirdparty.php' + footer + '">Other Product Lines</a></td></tr>'+   
                    '</table>'+
                 '</td>';

var recipesnav = '<td onmouseover="showmenu(\'recipes\')" onmouseout="hidemenu(\'recipes\')">'+
                      '<a href="/recipes.php' + footer + '"><strong>Recipes</strong>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a><br />'+
                      '<table class="noflashmenu"  id="recipes">'+ 
                      '</table>'+
                 '</td>';

var contactnav = '<td onmouseover="showmenu(\'contactus\')" onmouseout="hidemenu(\'contactus\')">'+
                    '<a href="/contactus.php' + footer + '"><strong>Contact Us</strong></a><br />'+
                    '<table class="noflashmenu"  id="contactus">'+
                    '</table>'+
                 '</td>';
  
var menuend = '<td width="20"></td>'+  
              '</tr></table></td></tr></table></td></tr>';              
              
var banner = '<tr align="center"><td><table width="100%" align="center" cellpadding="0" cellspacing="0"><tr><td><p align="center"><img height="344" width="800" alt="" src="/images/banners/';
var imgfile = 'main';

/*
if (pageid != "")
{
  imgfile = pageid;
}
*/

/*
switch(pageid)
{
case "aboutus":
  imgfile = pageid;
  break;
case "briefhistory":
  imgfile = pageid;
  break;
case "careers":
  imgfile = pageid;
  break;
case "operations":
  imgfile = pageid;
  break;
case "langleyhog":
  imgfile = pageid;
  break;
case "richmondlogistic":
  imgfile = pageid;
  break;
case "products":
imgfile = pageid;
break;
case "ourbrands":
imgfile = pageid;
break;
case "partners":
imgfile = pageid;
break;
case "thirdparty":
imgfile = pageid;
break;
case "recipes":
  imgfile = pageid;
  break;
case "contactus":
  imgfile = pageid;
  break;

default:
  imgfile = 'main';
}
*/
imgfile = pageid;
banner = banner + imgfile + '.jpg" /></p></td></tr></table></td></tr>'; 

if (errorflag)
{
  document.write(errormsg);
}
document.write(menustart)
document.write(homenav);
document.write(aboutnav);
document.write(operationav);
document.write(productnav);
document.write(recipesnav);
document.write(contactnav);
document.write(menuend);
document.write(banner);

}
