<?xml version="1.0"?>
<ZopeData>
  <record id="1" aka="AAAAAAAAAAE=">
    <pickle>
      <tuple>
        <global name="ZopePageTemplate" module="Products.PageTemplates.ZopePageTemplate"/>
        <tuple/>
      </tuple>
    </pickle>
    <pickle>
      <dictionary>
        <item>
            <key> <string>_Cacheable__manager_id</string> </key>
            <value> <string>http_cache</string> </value>
        </item>
        <item>
            <key> <string>_bind_names</string> </key>
            <value>
              <object>
                <klass>
                  <global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
                </klass>
                <tuple/>
                <state>
                  <dictionary>
                    <item>
                        <key> <string>_asgns</string> </key>
                        <value>
                          <dictionary>
                            <item>
                                <key> <string>name_subpath</string> </key>
                                <value> <string>traverse_subpath</string> </value>
                            </item>
                          </dictionary>
                        </value>
                    </item>
                  </dictionary>
                </state>
              </object>
            </value>
        </item>
        <item>
            <key> <string>_text</string> </key>
            <value> <string encoding="cdata"><![CDATA[

var loading_deferred = undefined;\n
\n
function replaceContent(req) {\n
  if (loading_deferred) {\n
    loading_deferred.cancel();\n
    loading_deferred = undefined;\n
  }\n
\n
  var container = $(\'container\');\n
  container.innerHTML = req.responseText;\n
\n
  addOnClickEventsToTabs(req);\n
}\n
\n
function showServerSideError(req) {\n
  if (loading_deferred) {\n
    loading_deferred.cancel();\n
    loading_deferred = undefined;\n
  }\n
\n
  var container = $(\'container\');\n
  container.innerHTML = \'Server side error.\';\n
\n
  addOnClickEventsToTabs(req);\n
}\n
\n
function showLoadingMessage() {\n
  var container = $(\'container\');\n
  container.innerHTML = \'<div><p style="text-align: left; vertical-align: middle; font-size: large;">Loading...</p></div>\';\n
  loading_deferred = undefined;\n
}\n
\n
function selectTab(e) {\n
  var tab_box = $(\'tab_box\');\n
  var item_list = tab_box.getElementsByTagName(\'li\');\n
  for (var i = 0; i < item_list.length; i++) {\n
    var item = item_list[i];\n
    var node = item.getElementsByTagName(\'a\')[0];\n
    if (this == node) {\n
      if (getNodeAttribute(item, \'class\') != \'selected\') {\n
        setNodeAttribute(item, \'class\', \'selected\');\n
      }\n
      node.blur();\n
    } else {\n
      if (getNodeAttribute(item, \'class\') != \'non_selected\') {\n
        setNodeAttribute(item, \'class\', \'non_selected\');\n
      }\n
    }\n
    disconnectAll(node, \'onclick\');\n
    connect(node, \'onclick\', function (e) { e.stop(); });\n
  }\n
\n
  var mapping = {\n
  <tal:block \n
  tal:replace="structure python: \',\\n\'.join([\'%s: \\x22%s\\x22\' %(x[\'id\'], x[\'renderer\']) for x in context.ERP5Site_getTabList(add_all_tabs=1)])"></tal:block>\n
  };\n
\n
  var url = mapping[this.parentNode.id];\n
  var d = doSimpleXMLHttpRequest(url);\n
  d.addCallbacks(replaceContent, showServerSideError);\n
  e.stop();\n
\n
  loading_deferred = callLater(0.3, showLoadingMessage);\n
\n
  // Set a cookie.\n
  document.cookie = \'erp5_site_selected_tab=\' + escape(this.parentNode.id);\n
}\n
\n
function addOnClickEventsToTabs(e) {\n
  var tab_box = $(\'tab_box\');\n
  var item_list = tab_box.getElementsByTagName(\'li\');\n
  for (var i = 0; i < item_list.length; i++) {\n
    //connect(item_list[i], \'onclick\', function(e){e.stop();})\n
    var node = item_list[i].getElementsByTagName(\'a\')[0];\n
    disconnectAll(node, \'onclick\');\n
    connect(node, \'onclick\', selectTab);\n
  }\n
  return true;\n
}\n
\n
connect(window, \'onload\', addOnClickEventsToTabs);

]]></string> </value>
        </item>
        <item>
            <key> <string>content_type</string> </key>
            <value> <string>text/html</string> </value>
        </item>
        <item>
            <key> <string>expand</string> </key>
            <value> <int>0</int> </value>
        </item>
        <item>
            <key> <string>id</string> </key>
            <value> <string>erp5_tabber.js</string> </value>
        </item>
        <item>
            <key> <string>title</string> </key>
            <value> <string></string> </value>
        </item>
      </dictionary>
    </pickle>
  </record>
</ZopeData>
