
function MM_findObj(n, d) 
{ 
  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() 
{ 
  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; }
}

var IEx = (document.all)?1:0;
var NS4 = (document.layers)?1:0
var NS6 = (document.getElementById)?1:0

var vBkgColor_margin = "#000000";
var vBkgColor_cell = "#ffffff";
var vBkgColor_hcell = "#ff0000";

var arMenuTop0 = new Array();

arMenuTop0[0] = new Array('Photos - Residential', 'photos.php?album=Residential');
arMenuTop0[1] = new Array('Photos - Commercial', 'photos.php?album=Commercial');
arMenuTop0[2] = new Array('Photos - Fireplaces', 'photos.php?album=Fireplaces');

var arMenuTop1 = new Array();
arMenuTop1[0] = new Array('Cultured Stone', 'http://www.culturedstone.com/');
arMenuTop1[1] = new Array('Builders Series', 'http://www.ebuild.com/ImgRepos%5CBrochure_Cultured%20Stone_Builder_Series_2007.pdf_12182008_133258Builder%20Series%20by%20Cultured%20Stone%C2%AE%20Brochure%5CBrochure_Cultured%20Stone_Builder_Series_2007.pdf');
arMenuTop1[2] = new Array('Previous Cultured Stone Products (2007)', 'http://www.ebuild.com/ImgRepos/Brochure_Cultured%20Stone_ProdSelectGuide_2007.pdf_12182008_133710Product%20Selection%20Guide/Brochure_Cultured%20Stone_ProdSelectGuide_2007.pdf');


function Layers() 
{
  if(!NS4) 
  {

	// layer0
    if(NS4)
    {
     	menu0 = new Layer;
    }
    document.write("<div id='menu0' style='position:absolute; left:150px; top:0px; width:160px; height:0px; z-index:10; visibility: hidden' onMouseOver=\"MM_showHideLayers('menu0','','show','menu1','','hide')\" onMouseOut=\"MM_showHideLayers('menu0','','hide','menu1','','hide')\"> "); 
    document.write("<table width=160 border=0 cellspacing=0 cellpadding=0 bgcolor=" + vBkgColor_margin + "><tr><td>"); 
    document.write("<table width='160' border=0 cellspacing=1 cellpadding=3 >");

    for (i=0;i<3;i++) 
    {
     	document.write("<tr bgcolor=" + vBkgColor_cell + " > ");
	     document.write("<td nowrap style='cursor:hand;' width='160' onmouseover=\"this.style.backgroundColor='"
     	 + vBkgColor_hcell + "'\" onmouseout=\"this.style.backgroundColor='" + vBkgColor_cell 
     	 + "'\" onclick=\"location.href='" + arMenuTop0[i][1] + "'\"  ><a href='" 
     	 + arMenuTop0[i][1] + "' class=menu>" + arMenuTop0[i][0] + "</a></td>");
     	document.write("</tr>");
    }
    document.write("</table>");
    document.write("</td></tr></table>");
    document.write("</div>");

	// layer1
    if(NS4)
    {
     	menu1 = new Layer;
    }
    document.write("<div id='menu1' style='position:absolute; left:150px; top:0px; width:160px; height:0px; z-index:10; visibility: hidden' onMouseOver=\"MM_showHideLayers('menu0','','hide','menu1','','show')\" onMouseOut=\"MM_showHideLayers('menu0','','hide','menu1','','hide')\"> "); 
    document.write("<table width=160 border=0 cellspacing=0 cellpadding=0 bgcolor=" + vBkgColor_margin + "><tr><td>"); 
    document.write("<table width='160' border=0 cellspacing=1 cellpadding=3 >");

    for (i=0;i<3;i++) 
    {
     	document.write("<tr bgcolor=" + vBkgColor_cell + " > ");
	     document.write("<td nowrap style='cursor:hand;' width='160' onmouseover=\"this.style.backgroundColor='"
     	 + vBkgColor_hcell + "'\" onmouseout=\"this.style.backgroundColor='" + vBkgColor_cell 
     	 + "'\" onclick=\"location.href='" + arMenuTop0[i][1] + "'\"  ><a href='" 
     	 + arMenuTop0[i][1] + "' class=menu>" + arMenuTop0[i][0] + "</a></td>");
     	document.write("</tr>");
    }
    document.write("</table>");
    document.write("</td></tr></table>");
    document.write("</div>");

	// Added Layers 2 and 3 for new menu item
	// layer2
    if(NS4)
    {
     	menu2 = new Layer;
    }
    document.write("<div id='menu2' style='position:absolute; left:150px; top:0px; width:160px; height:0px; z-index:10; visibility: hidden' onMouseOver=\"MM_showHideLayers('menu0','','hide','menu1','','hide','menu2','','show','menu3','','hide')\" onMouseOut=\"MM_showHideLayers('menu0','','hide','menu1','','hide','menu2','','hide','menu3','','hide')\"> "); 
    document.write("<table width=160 border=0 cellspacing=0 cellpadding=0 bgcolor=" + vBkgColor_margin + "><tr><td>"); 
    document.write("<table width='160' border=0 cellspacing=1 cellpadding=3 >");

    for (i=0;i<3;i++) 
    {
     	document.write("<tr bgcolor=" + vBkgColor_cell + " > ");
	     document.write("<td nowrap style='cursor:hand;' width='160' onmouseover=\"this.style.backgroundColor='"
     	 + vBkgColor_hcell + "'\" onmouseout=\"this.style.backgroundColor='" + vBkgColor_cell 
     	 + "'\" ><a href='" 
     	 + arMenuTop1[i][1] + "' target=cs class=menu>" + arMenuTop1[i][0] + "</a></td>");
     	document.write("</tr>");
    }
    document.write("</table>");
    document.write("</td></tr></table>");
    document.write("</div>");

	// layer3
    if(NS4)
    {
     	menu3 = new Layer;
    }
    document.write("<div id='menu3' style='position:absolute; left:150px; top:0px; width:160px; height:0px; z-index:10; visibility: hidden' onMouseOver=\"MM_showHideLayers('menu0','','hide','menu1','','hide','menu2','','hide','menu3','','show')\" onMouseOut=\"MM_showHideLayers('menu0','','hide','menu1','','hide','menu2','','hide','menu3','','hide')\"> "); 
    document.write("<table width=160 border=0 cellspacing=0 cellpadding=0 bgcolor=" + vBkgColor_margin + "><tr><td>"); 
    document.write("<table width='160' border=0 cellspacing=1 cellpadding=3 >");

    for (i=0;i<3;i++) 
    {
     	document.write("<tr bgcolor=" + vBkgColor_cell + " > ");
	     document.write("<td nowrap style='cursor:hand;' width='160' onmouseover=\"this.style.backgroundColor='"
     	 + vBkgColor_hcell + "'\" onmouseout=\"this.style.backgroundColor='" + vBkgColor_cell 
     	 + "'\" ><a href='" 
     	 + arMenuTop1[i][1] + "' target=cs class=menu>" + arMenuTop1[i][0] + "</a></td>");
     	document.write("</tr>");
    }
    document.write("</table>");
    document.write("</td></tr></table>");
    document.write("</div>");
  }
}

var pos = new Array(600,600,80,80);
var heights = new Array(520,96,96,520);

var menu0, menu1;
if(NS6 || IEx) 
{
 	menu0 = document.getElementById('menu0');
	menu1 = document.getElementById('menu1');
	menu2 = document.getElementById('menu2');
	menu3 = document.getElementById('menu3');
}

function MM_setPosition() 
{
  if(!NS4) 
  {
   	for (var i=0; i<=3; i++)	
   	{
    		if(IEx) 
    		{ 
     			document.all("menu" + i).style.left = abc.offsetLeft+pos[i];
     			document.all("menu" + i).style.top = abc.offsetTop+heights[i];
    		} 
     		else if(NS6) 
     		{
     			str = "document.getElementById('menu"+i+"').style.left = document.getElementById('abc').offsetLeft+pos["+i+"]";
     			eval(str);
     			str = "document.getElementById('menu"+i+"').style.top = document.getElementById('abc').offsetTop+heights["+i+"]";
	     		eval(str);
    		}
    }
  }
}

