function NavOver(cell)
{
var thiscell = "Cell_" + cell;
// var oSrc = event.srcElement;
oCell = document.getElementById(thiscell);
oCell.style.backgroundColor = "white";
//var HTMLtext = oSrc.innerHTML;
//if (HTMLtext.search("
10) {
alert (warning);
}
else
{
window.document.forms[0].totalselected.value = Number(totalchosen) + 1;
window.document.forms[0].selectmenu.value = newselection;
window.parent.result.location.href="/publicinfo.nsf/NutritionResult?Openform&ID=" + newselection;
indx = menucode.indexOf("Drinks")
if (indx > -1) {
document.getElementById("main_frame").contentWindow.focus();
window.parent.scrollBy(1,120);
}
}
}
function addItem_FR(menucode)
{
var newselection = window.document.forms[0].selectmenu.value;
var totalchosen = window.document.forms[0].totalselected.value;
var newselection = newselection + menucode + "@";
var warning = "Veuillez prendre note que vous ne pouvez afficher qu'un maximum de 10 articles du menu à la fois. Retirez certains des articles sélectionnés ou cliquer sur la touche EFFACER ci-dessous pour recommencer. "
if ( totalchosen > 10) {
alert (warning);
}
else
{
window.document.forms[0].totalselected.value = Number(totalchosen) + 1;
window.document.forms[0].selectmenu.value = newselection;
window.parent.result.location.href="/publicinfo.nsf/NutritionResult_FR?Openform&ID=" + newselection;
indx = menucode.indexOf("Drinks")
if (indx > -1) {
document.getElementById("main_frame").contentWindow.focus();
window.parent.scrollBy(1,120);
}
}
}
/* ************************************************************************************************************************* */
function showMenu(menu) {
var aname = "dp" + menu;
var c = getAnchorPosition(aname);
var divname = "dropDown" + menu;
if (document.getElementById) {
var o = document.getElementById(divname);
if (o.style.visibility=="visible") {
o.style.visibility="hidden";
} else {
if (document.all) {
o.style.left = (c.x - 6).toString() + "px";
o.style.top = (c.y + 18).toString() + "px";
} else {
o.style.left = (c.x - 5).toString() + "px";
o.style.top = (c.y + 17).toString() + "px";
}
o.style.visibility = "visible";
}
// NOTE: maximum 10 pull down menus
for (var i = 0; i < 10; i++) {
if (i != menu) {
var idivname = "dropDown" + i;
var o = document.getElementById(idivname);
if (o!=null) o.style.visibility = "hidden";
}
}
}
}
// getAnchorPosition(anchorname)
// This function returns an object having .x and .y properties which are the coordinates
// of the named anchor, relative to the page.
function getAnchorPosition(anchorname) {
// This function will return an Object with x and y properties
var useWindow=false;
var coordinates=new Object();
var x=0,y=0;
// Browser capability sniffing
var use_gebi=false, use_css=false, use_layers=false;
if (document.getElementById) { use_gebi=true; }
else if (document.all) { use_css=true; }
//else if (document.layers) { use_layers=true; }
// Logic to find position
if (use_gebi && document.all) {
x=AnchorPosition_getPageOffsetLeft(document.all[anchorname]);
y=AnchorPosition_getPageOffsetTop(document.all[anchorname]);
}
else if (use_gebi) {
var o=document.getElementById(anchorname);
x=AnchorPosition_getPageOffsetLeft(o);
y=AnchorPosition_getPageOffsetTop(o);
}
else if (use_css) {
x=AnchorPosition_getPageOffsetLeft(document.all[anchorname]);
y=AnchorPosition_getPageOffsetTop(document.all[anchorname]);
}
else if (use_layers) {
var found=0;
for (var i=0; i