
var bgcolor_margin = "#9D9FB0";
var bgcolor_cell = "#6B6B7F";
var bgcolor_hcell = "#75768B";
var background_cell = "";
var background_hcell = "";
var class_name = "menu_dropdown";
var cell_spacing = 1;
var cell_padding = 5;
var height = 23;

var arMenu = 
[
 // Bricks
  [
    [
      ['Belden', 'show_belden.htm'],
	  ['Glen Gery', 'show_glengerybrick.htm'],
      ['Nitterhouse Masonry', 'show_nitterhouse.htm'],
      ['Redland', 'show_redlandbrick.htm'],
      ['Sioux City Brick', 'show_siouxcitybrick.htm'],
      ['Bowerston Brick', 'show_bowerstonshale.htm'],
      ['Watsontown Brick', 'show_watsontownbrick.htm']
    ],
	233, 100, 130
  ],

// Pavers
  [
    [
      ['Belgard', 'show_belgard.htm'],
	  ['Techo-Bloc', 'show_techo-bloc.htm'],
      ['Glen Gery', 'show_glengerybrick.htm'],
      ['Pine Hall', 'show_pinehallbrick.htm'],
	  ['Belden', 'show_belden.htm'],
      ['Redland', 'show_redland.htm'],
      ['Watsontown', 'show_watsontown.htm']
    ],
	233, 124, 130
  ],

// Retaining Walls
  [
    [
      ['Belgard', 'walls.htm'],
	  ['Versa-Lok', 'show_versalok.htm'],
      ['Techo-Bloc', 'show_techo-bloc.htm']
    ],
	233, 148, 130
  ],

// Natural Stone
  [
    [
      ['Pattern Stone', 'pattern_stone.htm'],
	  ['Irregular Stone', 'irregular.htm'],
      ['Natural Wallstones', 'natural_wallstones.htm'],
	  ['Boulders', 'boulders.htm'],
	  ['Steps', 'steps.htm'],
      ['Treads', 'treads.htm'],
	  ['Pier Caps', 'pier_caps.htm'],
      ['Belgium Blocks', 'belgium_blocks.htm']
    ],
	233, 172, 130
  ],

// Veneer Stone
  [
    [
	  ['Dutch Quality Stone','javascript:site("http://www.dutchqualitystone.com/");'],
	  ['Heritage Stone','javascript:site("http://www.heritagestone.com/");'],
	  ['Cultured Stone by Owens Corning','javascript:site("http://www.culturedstone.com/");'],
	  ['Quarry Cut Natural Thin Stone','javascript:site("http://www.quarrycut.com/");'],
	  ['Pinnacle Stone Products','javascript:site("http://www.pinnaclestoneproducts.com/");'],
	  ['Natural Stone Solutions','javascript:site("http://www.nssthinstone.com/");'],
	  ['Glen Gery Thin Brick','javascript:site("http://www.glengerybrick.com/");'],
	  ['KF Thin Brick','javascript:site("http://www.redlandbrick.com/thinbrick.asp/");'],
	  ['Marion Ceramics Vee Brick','javascript:site("http://www.marionceramics.com/");'],
	  ['Summitville Thin Brick','javascript:site("http://www.summitville.com/");']
	  
	  /*['Dutch Quality Stone', 'show_dutchqualitystone.htm'],
	  ['Cultured Stone by Owens Corning', 'show_culturedstone.htm'],
	  ['Quarry Cut Natural Thin Stone', 'show_quarrycutnatural.htm'],
	  ['Glen Gery Thin Brick', 'show_glengerybrick.htm'],
	  ['Marion Ceramics Vee Brick', 'show_marionceramics.htm'],
	  ['Summitville Thin Brick', 'show_summitville.htm'],
	  ['KF Thin Brick', 'show_KFthinbrick.htm']*/

    ],
	233, 196, 175
  ],
  // Commercial Masonry Accessories
  [
    [
	  ['Hyload Flashings','javascript:site("http://www.hyloadflashing.com/");'],	  
	  ['Wire-Bond','javascript:site("http://www.wirebond.com/");'],	  
	  ['Dayton Superior','javascript:site("http://www.daytonsuperior.com/");'],	  
	  ['Hohmann Barnard Inc','javascript:site("http://www.h-b.com/");'],	  
	  ['Mortar Net','javascript:site("http://www.mortarnet.com/");'],	  
	  ['Sandell Construction Products','javascript:site("http://www.sandellmfg.com/");'],	  
	  ['Advanced Building Products','javascript:site("http://www.advancedflashing.com/");'],
	  ['York Manufacturing','javascript:site("http://www.yorkmfg.com/");']

    ],
	233, 316, 175
  ],

// Fireplace / Chimney
  [
    [
      ['Rumford Fireplaces', 'show_rumford.htm'],
	  ['Vestal Mfg. Products', 'show_vestalmfg.htm',
        [
          [
            ['Dampers', 'show_vestalmfg.htm'],
            ['Vestal-Aire Circulator Fireplace Units', 'show_vestalmfg.htm'],
            ['Ash Dump', 'show_vestalmfg.htm'],
            ['Cleanout Doors', 'show_vestalmfg.htm'],
            ['Dutch Oven Door', 'show_vestalmfg.htm']
          ],
          362, 364, 130
        ],
      ],
	  ['Superior Clay Products', 'show_superiorclay.htm',
        [
          [
            ['Clay Flue Liners', 'javascript:;'],
            ['Clay Chimney Pots', 'javascript:;']
          ],
          362, 388, 130
        ],
      ],
      ['Fire Bricks', 'javascript:;'],
      ['Stainless Steel Chimney Caps', 'show_hyccompany.htm']
    ],
	233, 340, 160
  ]

]

/*
*/

var timerMenu;

function hideMenu() {
  timerMenu=setTimeout('hideMenuItems()', 200);
}

function hideMenuItems() {
  for (var i=0; i<arMenu.length; i++)
    hideMenuItem('menu_'+i, arMenu[i]);
}

function hideMenuItem(name, arr) {
  MM_showHideLayers(name,'','hide');
  for(var i=0;i<arr[0].length;i++)
    if ((arr[0][i][2]) && (arr[0][i][2].length>0))
      hideMenuItem(name+'_'+i, arr[0][i][2]);
}

function showMenu(name) {
  MM_setPosition();
  clearTimeout(timerMenu);
  hideMenuItems();

  MM_showHideLayers(name,'','show');
  while (name.indexOf("_")!=-1) {
	name = name.substring(0, name.lastIndexOf("_"));
    MM_showHideLayers(name,'','show');
  }
}

function fWriteLayers() {
  for (var i=0; i<arMenu.length; i++) {
	writeMenu('menu_'+i, arMenu[i])
  }
}

function writeMenu(name, arr) {
  document.write("<div id='"+name+"' style='position:absolute; left:0px; top:0px; width:"
   +arr[3]+"px; z-index:1; visibility: hidden' onMouseOver=\"clearTimeout(timerMenu);\" onMouseOut=\"hideMenu();\">"); 
  document.write("<table width='100%' border=0 cellspacing=0 cellpadding=0"
   +((bgcolor_margin!="")?" bgcolor='"+bgcolor_margin+"'":"")+"><tr><td>"); 
  document.write("<table width='100%' border=0 cellspacing="+cell_spacing+" cellpadding="+cell_padding+">");
  for (var j=0;j<arr[0].length;j++) {
    document.write("<tr>");
    document.write("<td "+((bgcolor_cell!="")?" bgcolor='"+bgcolor_cell+"'":"")
     +((background_cell!="")?" background='"+background_cell+"'":"")
	 +" onmouseover=\""+((bgcolor_hcell!="")?"this.style.backgroundColor='"+bgcolor_hcell+"';":"")
     +((background_hcell!="")?" this.style.background='url("+background_hcell+")';":"")
     +(((arr[0][j][2]) && (arr[0][j][2][0].length>0))?" showMenu('"+name+"_"+j+"');":" showMenu('"+name+"');")
	 +"\""
	 +" onmouseout=\""+((bgcolor_cell!="")?" this.style.backgroundColor='"+bgcolor_cell+"';":"")
   	 +((background_cell!="")?" this.style.background='url("+background_cell+")';":"")+"\""
//   	 +" onclick=\"location.href='"+arr[0][j][1]+"'\""
	 +" style='cursor: hand; height:"+height+"px;'>"
	 +"<a href='"+ arr[0][j][1]+"' class='"+class_name+"'>"+arr[0][j][0]+"</a></td>");
    document.write("</tr>");
  }
  document.write("</table>");
  document.write("</td></tr></table>");
  document.write("</div>");
  for(var j=0;j<arr[0].length;j++) {
    if ((arr[0][j][2]) && (arr[0][j][2][0].length>0)) {
	  writeMenu(name+'_'+j, arr[0][j][2]);
	}
  }
}

function MM_setPosition() {
  for (var i=0; i<arMenu.length; i++)
    setPosition('menu_'+i, arMenu[i])
}

function setPosition(name, arr) {
  if (IEx) {
    document.all(name).style.left = x.offsetLeft+arr[1];
    document.all(name).style.top = y.offsetTop+arr[2];
  }
  else if (NS6) {
    str = "document.getElementById('"+name+"').style.left = document.getElementById('x').offsetLeft+arr[1]";
    eval(str);
    str = "document.getElementById('"+name+"').style.top = document.getElementById('y').offsetTop+arr[2]";		
    eval(str);
  }	
  for(var i=0;i<arr[0].length;i++)
    if ((arr[0][i][2]) && (arr[0][i][2].length>0))
      setPosition(name+'_'+i, arr[0][i][2]);
}

//function 

var IEx = (document.all)?1:0;
var NS4 = (document.layers)?1:0
var NS6 = (document.getElementById)?1:0

function MM_findObj(n, d) { //v4.0
  var p,i,x;  
  if(!d) d=document; 
  if((p=n.indexOf("?"))>0&&parent.frames.length) 
  {
 	d=parent.frames[n.substring(p+1)].document; 
	n=n.substring(0,p);
  }
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && document.getElementById) x=document.getElementById(n); return x;
}

function MM_showHideLayers() { //v3.0
  var i,p,v,obj,args=MM_showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v='hide')?'hidden':v; }
    obj.visibility=v; }
}