function buildWipoUrl(symbol, subclass, level, language, full)
{
  var indexes       = "no";
  var printheader   = "yes";
  var deleted       = "yes";
  var notes         = "yes";
  var headings      = "yes";
  var fulltext      = "yes";
  var priorityorder = "no";
  var tabindex      = 0;
  var ipcVersionDisplayed = (level == "a") ? top.ipcVersion : "20060101";

  if (top.mode == "Expert")
  {
    return "http://ipcdev.wipo.int/ipc8earlypub/";
  }
  var wipoUrl = "http://www.wipo.int/ipcpub/";
  //var wipoUrl = "http://ipcdev.wipo.int/ipc8earlypub/ipcpub/";
  if (full == 0)
  {
    wipoUrl += "render.php";
    wipoUrl += "?xsl2=xslt/cleanup.xsl";
    wipoUrl += "&level=" + level;
  // wipoUrl += "&cxsl=http://localhost/IPC/xslt/ipcentry8.xsl";
    //  wipoUrl += "&cxsl=xslt/ipcentry8tacsy.xsl";
    wipoUrl += "&cxsl=xslt/ipcentry8.xsl";
    wipoUrl += "&indexes=" + indexes;
    wipoUrl += "&printheader=" + printheader;
    wipoUrl += "&deleted=" + deleted;
    wipoUrl += "&notes=" + notes;
    wipoUrl += "&headings=" + headings;
    wipoUrl += "&fulltext=" + fulltext;
    wipoUrl += "&priorityorder=" + priorityorder;
    wipoUrl += "&tabindex=" + tabindex;
    wipoUrl += "&lang=" + language.toLowerCase();
    wipoUrl += "&menulang=" + language.toUpperCase();
    wipoUrl += "&edition=" + ipcVersionDisplayed;


    if (symbol == "")
    {
      wipoUrl += "&xml=" + top.ipcVersion + "/index/" +  language.toLowerCase() + "/index.xml";
    }
    else
    {
      wipoUrl += "&xml=" + ipcVersionDisplayed + "/subclass/";
      wipoUrl += (level == "a") ? "advanced" : "core";
      wipoUrl += "/" +  language.toLowerCase() + "/xml/" + subclass + ".xml";
      wipoUrl += "&symbol=" + symbol;
      wipoUrl += "&hash=ipc" + symbol;
    }
  }
  else
  {
    wipoUrl += "?lang=" + language.toLowerCase();
    if (symbol != "")
    {
      wipoUrl += "&symbol=" + symbol;
    }
  }
  return wipoUrl;
}

