
/* In the page <HEAD> add <script Language="JavaScript" src="./js/page.js"></script>    */

/* To call a function add <script language="JavaScript" >fWriteMenuBottom("fr");</script>   */

function winOpenDoc(pageUrl)
{
  // window.alert("*" + pageUrl + "*");
  window.open(pageUrl,"","width=600,height=480,toolbar=0,menubar=0,scrollbars=1,resizable=1,left=10,top=10");
}



function winOpenProd3(code, language, id) // 050822  instead of winOpenProd2(code, language)
{
    page = "product_detail.php?p=" + id + "&code=" + code + "&language=" + language;
    //alert(page)

    var ww = 700; //screen.width - 100;
    var ww1 = 700; //ww - 10;
    var hh = screen.height - 100;
    var xx = 50;
    var yy = 10;
    window.open(page,"","outerwidth=" + ww1 + ",outerheight=" + hh + ",width=" + ww + ",height=" + hh + ",toolbar=0,menubar=0,scrollbars=1,resizable=0,left=" + xx + ",top=" + yy);
}

function winOpenProd4(code, familly, language, id) // 050823  instead of winOpenProd(code,familly,language)
{
    page = "product_detail.php?p=" + id + "&code=" + code + "&familly=" + familly + "&language=" + language;

    var ww = 700; //screen.width - 100;
    var ww1 = 700; //ww - 10;
    var hh = screen.height - 100;
    var xx = 50;
    var yy = 10;
    window.open(page,"","outerwidth=" + ww1 + ",outerheight=" + hh + ",width=" + ww + ",height=" + hh + ",toolbar=0,menubar=0,scrollbars=1,resizable=0,left=" + xx + ",top=" + yy);
}

function f_myValidateSearchForm()   // 040720
{
    // validates the form and returns either true or false.
    // If the return value is true, <B>javascript:document.myform.submit()</B> is executed,
    return true;
}

function fWriteNewsletter(strLang, hSpaceBefore)
{
    document.write("      <table width='100%' border='0' cellpadding='0' cellspacing='0' >");
    document.write("        <tr><td>");
    document.write("          <img src='icon/spacer.gif' width='10' height='" + hSpaceBefore + "' border='0'>");
    document.write("        </td></tr>");
    document.write("        <tr><td  style='text-align:center;'>");
    document.write("          <a href='newsletter.php' >");  //  <a href='#' >
    document.write("            <img border='0' height='40' width='150' src='icon/newsletter_link" + strLang + ".gif' alt='Newsletter'>");
    document.write("          </a>");
    document.write("        </td></tr>");
    document.write("      </table>");
}





function fWriteMenuBottom(strLang)
{
    /* Try to do in php instead of strLang as parameter! */
    document.write("<p align='center'>");
    document.write("  <img border='0' height='20' width='1' src='icon/spacer.gif'>");
    document.write("  </br>");
    document.write("  <span class='bannerBottom'>");
    if (strLang == "en")
    {
        document.write("<a class='bannerBottom' href='index.php?lang=en' target='_top' >Home</a>");
        document.write(" | ");
        document.write("<a class='bannerBottom' href='#' onClick='javascript:winOpenDoc(\"respect_privee_" + strLang + ".html\")' >Privacy Policy</a>");
        document.write(" | ");
        document.write("<a class='bannerBottom' href='#' onClick='javascript:winOpenDoc(\"aspects_juridiques_" + strLang + ".html\")' >Terms of Use</a>");
        document.write(" | ");
        document.write("<a class='bannerBottom' href='contact_us.php?language=_" + strLang + "' target='_top' >Contact</a>");
        document.write(" | ");
        document.write("<a class='bannerBottom' href='index.php?lang=fr' target='_top' >Fran&ccedil;ais</a>");
    }
    else if (strLang == "fr")
    {
        document.write("<a class='bannerBottom' href='index.php?lang=fr' target='_top' >Accueil</a>");
        document.write(" | ");
        document.write("<a class='bannerBottom' href='#' onClick='javascript:winOpenDoc(\"respect_privee_" + strLang + ".html\")' >Charte</a>");
        document.write(" | ");
        document.write("<a class='bannerBottom' href='#' onClick='javascript:winOpenDoc(\"aspects_juridiques_" + strLang + ".html\")' >Aspects Juridiques</a>");
        document.write(" | ");
        document.write("<a class='bannerBottom' href='contact_us.php?language=_" + strLang + "' target='_top' >Contact</a>");
        document.write(" | ");
        document.write("<a class='bannerBottom' href='index.php?lang=en' target='_top' >English</a>");
    }
    document.write("  </span>");
    document.write("</p>");
}

/* ----------------- slideOut 'Products' menu: ------------------------------------ */

var slideOut_hideDelay = 200;

function fSlideOut_hideMenu(objId)
{
    var obj = document.getElementById(objId);
    if (obj) {
        if (obj.hideTimer)
          window.clearTimeout(obj.hideTimer);
        obj.hideTimer = window.setTimeout("fSlideOut_hide('" + objId + "')", slideOut_hideDelay);
    }
}

function fSlideOut_hide(objId)
{
    var obj = document.getElementById(objId);
    if (obj)
      obj.style.visibility = "hidden";
}

function fSlideOut_showMenu(objId)
{
    var obj = document.getElementById(objId);
    if (obj) {
      obj.style.visibility = "visible";
      if (obj.hideTimer)
        window.clearTimeout(obj.hideTimer);
      obj.onmouseover = new Function("fSlideOut_showMenu('" + objId + "')");
      obj.onmouseout = new Function("fSlideOut_hideMenu('" + objId + "')");
    }
}

/* ----------------- slideOut 'Products' menu, till here. ------------------------- */


