var intParentID=0;
var intCurrentID=0;
var intSecondMenuCount=0;

function SetMenuSystem(intNewParentID,intNewCurrentID) {
   intParentID = intNewParentID;
   intCurrentID = intNewCurrentID;
}

function WriteTopMenuCell(strCatName,intCatID,blnIsParent,intStyle) {
   var classname = 'TopMenuNormal' + intStyle;
   var classtext = 'greymenu';
   var strIsParent = 'false';
   if (blnIsParent)
      strIsParent = 'true';
   if ((blnIsParent && (intCatID == intParentID)) || (!blnIsParent && (intCatID == intCurrentID))) {
      classname = 'TopMenuSelected' + intStyle;
      classtext = 'greymenuBold';
      }
   document.write('<TD WIDTH=152 CLASS="' + classname + '" onMouseOver="TopMenuMouseOver(this,' + intCatID + ',true,' + strIsParent + ',' + intStyle + ')" onMouseOut="TopMenuMouseOver(this,' + intCatID + ',false,' + strIsParent + ',' + intStyle + ')">');
   document.write('<P CLASS="Menu"><IMG HEIGHT=8 WIDTH=6 SRC="./point.gif" VSPACE=0 HSPACE=3 ALIGN="MIDDLE" BORDER=0 ALT=""> <A CLASS="LinkHidden" HREF="fr/eStore,wciCatalogue,type-C,ID-' + intCatID + '.html"><span class=' + classtext + '>' + strCatName + '</span></A></P>');
   document.write('</TD>');
}

function TopMenuMouseOver(objThis,intCatID,blnFocus,blnIsParent,intStyle) {
   var classname = 'TopMenuNormal' + intStyle;
   if ((blnIsParent && (intCatID == intParentID)) || (!blnIsParent && (intCatID == intCurrentID))) {
      classname = 'TopMenuSelected' + intStyle;
      }
   if (blnFocus == true) {
      objThis.className = 'TopMenuOver' + intStyle;
      }
   else {
      objThis.className = classname;
      }
}

function WriteMenuCell(strCatName,intCatID,intStyle) {
   var classname = 'SecondMenuEven' + intStyle;
   var classtext = 'sousrayon';
   var strIsOdd = 'false';
   intSecondMenuCount +=1;
   if ((intSecondMenuCount % 2) == 1) {
      strIsOdd = 'true';
      classname = 'SecondMenuOdd' + intStyle;
      }
   if (intCatID == intCurrentID) {
      classname = 'SecondMenuSelected' + intStyle;
      classtext = 'sousrayonBold';
      }
   document.write('<TD CLASS="' + classname + '" onMouseOver="SecondMenuMouseOver(this,' + intCatID + ',true,' + strIsOdd + ',' +  + intStyle + ')" onMouseOut="SecondMenuMouseOver(this,' + intCatID + ',false,' + strIsOdd + ',' + intStyle + ')">');
   document.write('<P CLASS="' + classtext + '"><A CLASS="LinkHidden" HREF="fr/eStore,wciCatalogue,type-C,ID-' + intCatID + '.html"><span class=' + classtext + '>' + strCatName + '</span></A></P>');
   document.write('</TD>');
}

function SecondMenuMouseOver(objThis,intCatID,blnFocus,blnIsOdd,intStyle) {
   var classname = 'SecondMenuEven' + intStyle;
   if (blnIsOdd == true)
      classname = 'SecondMenuOdd' + intStyle;
   if (intCatID == intCurrentID) {
      classname = 'SecondMenuSelected' + intStyle;
      }
   if (blnFocus == true) {
      objThis.className = 'SecondMenuOver' + intStyle;
      }
   else {
      objThis.className = classname;
      }
}


