

function at_display(x)
{
  var win = window.open();
  for (var i in x) win.document.write(i+' = '+x[i]+'<br>');
}
// ----- DropDown Control ------------------------------------------------------
var at_timeout = 50;
// ----- Show Aux -----
function at_show_aux(parent, child)
{
  var p = document.getElementById(parent);
  var c = document.getElementById(child);
  p.className        = "active";
  if (c.offsetWidth <= 0)
  {
    c.style.position   = "absolute";
    c.style.visibility = "visible";
    c.style.display    = "block";
  }
  var direction = undefined;
  if (p.parentNode && p.parentNode["at_position"] == "x")
    direction = p.parentNode["at_direction"];
  var top   = (c["at_position"] == "y") ?  p.offsetHeight+0 : 0;
  var left1 = (c["at_position"] == "x") ?  p.offsetWidth +0 : 0;
  var left2 = (c["at_position"] == "x") ? -c.offsetWidth -0 : 0;
  var left3 = (c["at_position"] == "x") ?  p.offsetWidth +0 : 0;
  for (; p; p = p.offsetParent)
  {
    if (p.style.position != 'absolute')
    {
      left1 += p.offsetLeft;
      left2 += p.offsetLeft;
      top   += p.offsetTop;
    }
    left3 += p.offsetLeft;
  }
  if (direction)
  {
    left = (direction == 'right') ? left1 : left2;
    c['at_direction'] = direction;
  }
  else
  {
    left = (left3+c.offsetWidth < document.body.offsetWidth) ? left1 : left2;
    c['at_direction'] = (left3+c.offsetWidth < document.body.offsetWidth) ? 'right' : 'left';
  }
  c.style.position   = "absolute";
  c.style.visibility = "visible";
  c.style.display    = "block";
  c.style.top        = top +'px';
  c.style.left       = left+'px';
}
// ----- Hide Aux -----
function at_hide_aux(parent, child)
{
  document.getElementById(parent).className        = "parent";
  document.getElementById(child ).style.visibility = "hidden";
  document.getElementById(child ).style.display    = "block";
}
// ----- Show -----
function at_show(e)
{
  var p = document.getElementById(this["at_parent"]);
  var c = document.getElementById(this["at_child" ]);
  at_show_aux(p.id, c.id);
  clearTimeout(c["at_timeout"]);
}
// ----- Hide -----
function at_hide()
{
  var c = document.getElementById(this["at_child"]);
  c["at_timeout"] = setTimeout("at_hide_aux('"+this["at_parent"]+"', '"+this["at_child" ]+"')", at_timeout);
}
// ----- Attach -----
function at_attach(parent, child, position)
{
  p = document.getElementById(parent);
  c = document.getElementById(child );
  p["at_child"]    = c.id;
  c["at_child"]    = c.id;
  p["at_parent"]   = p.id;
  c["at_parent"]   = p.id;
  c["at_position"] = position;
  p.onmouseover = at_show;
  p.onmouseout  = at_hide;
  c.onmouseover = at_show;
  c.onmouseout  = at_hide;
}
// ----- DropDown Menu ---------------------------------------------------------
// ----- Build Aux -----
function dhtmlmenu_build_aux(parent, child, position)
{
  document.getElementById(parent).className = "parent";
  document.write('<div class="vert_menu" id="'+parent+'_child">');
  var n = 0;
  for (var i in child)
  {
    if (i == '-')
    {
      document.getElementById(parent).href = child[i];
      continue;
    }
    if (typeof child[i] == "object")
    {
      document.write('<a class="parent" id="'+parent+'_'+n+'">'+i+'</a>');
      dhtmlmenu_build_aux(parent+'_'+n, child[i], "x");
    }
    else document.write('<a id="'+parent+'_'+n+'" href="'+child[i]+'">'+i+'</a>');
    n++;
  }
  document.write('</div>');
  at_attach(parent, parent+"_child", position);
}
// ----- Build -----
function dhtmlmenu_build(menu)
{
  for (var i in menu) dhtmlmenu_build_aux(i, menu[i], "y");
}
// ----- Building -----
						  
						  
	 var submenu_ss3b  = { "-" : "#",
    "DP (up to 70% solids)" : "../dp-submersible.html",
    "DL (up to 20% solids)" : "../dl-submersible.html",
    "DXL (up to 5% solids)" : "../dxl-submersible.html",
    "DEM (recessed impeller)" : "../dem-submersible.html"
   
   
  
                          };
						  
						  
						  
	var submenu_ss3c  = { "-" : "#",
    "DC (closed impeller - agitator option)" : "../cantilevers-pump-dc.html",
    "DEC (recessed impeller – agitator and chopper options)" : "../cantilevers-pump-dec.html"
     
  
                          };
       
	   
	   var submenu_ss3d  = { "-" : "#",
    "DBH (heavy-duty slurry pump)" : "../horizontal-dbh.html",
    "DEH (recessed impeller)" : "../horizontal-deh.html"
    
  
                          };
          var submenu_ss3e  = { "-" : "#",
    "‘O’ Series (easy maintenance, open column with water cutlass bearing) " : "../line-shafts1.html",
    "Standard (sealed column)" : "../line-shafts2.html"
    
  
                          };

var submenu_ss2a = { "-": "#",   
    "Submersibles" : submenu_ss3b,
    "Cantilevers"  : submenu_ss3c,
    "Horizontals" : submenu_ss3d,
    "Line-Shafts" : submenu_ss3e,
    "HHP (double hose diaphragm piston pump)" :  "../high-pressure.html"

    
            };
			
			
			
var submenu_ss2b ={// "-": "#",       
    //"Warranty Information" : "#",
   // "Service Centre Locator" : "#", 
    //"Professional Product Repair Status" : "#"    
            };
var submenu_ss = { 
    "Toyo Pumps" : submenu_ss2a,
    "Toyo Parts" :"../toyo-parts.html"
       };
       
var submenu_ce = { 
    ""    : "#",
    ""    : "#",
    ""    : "#",
    ""    : "#",
    ""    : "#",
    ""    : "#",
    ""    : "#",
    ""    : "#",
    ""    : "#",
    ""    : "#",
    ""    : "#"
     };
  
var submenu_bcs = { 
    " " : "#",
    ""    : "#",
    ""    : "#",
    ""    : "#",
    ""    : "#",
    ""    : "#",
    ""    : "#",
    ""    : "#",
    ""    : "#",
    ""    : "#",
    ""    : "#",
    ""    : "#",
    " "    : "#",
    ""    : "#"
     };
       
var submenu_wb2a = { "-"                          : "#",
    "" :  "#",
    "" : "#",    
    "" : "#"
         };
var submenu_wb2b = { "-"                          : "#",
    "" : "#"
         };
var submenu_wb = { 
    "": submenu_wb2a,
    " ": submenu_wb2b
      };

var submenu_cc1 = {"-"                          : "#",
     " " :  "#",
    "" : "#"
           };
var submenu_cc = { 
    "" : "#",
    "": "#",
    "" : submenu_cc1 ,
    "" : "#",
    "" : "#"
       };
var submenu_co3 = {"-"                          : "#",
    
    "" : "#",
    " " :  "#",
    "" :  "#"
       };
var submenu_co4 = {"-"                          : "#",
    "" : "#",
    "" : "#",             
    "" : "#"
    };
   
var submenu_co2 = {"-"                          : "#",
    " " :  "#",
    "" : "#",
    "" : "#",
    "" : "#"
    };
var submenu_co5 = {"-"                          : "#",
    "" : "#",
    "" : "#",
    "" : "#"
    };
var submenu_co = {"" : submenu_co2,
    "" : submenu_co5,
    "" : "#",
    " " :  "#",
    "" : submenu_co4,
    "" : submenu_co3,    
    "" : "#" ,
    "" : "#"                                            
       };

