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; }
}
function belgardpavers()
{
wBgP = window.open("showroom_belgard/_showroom.htm?showroom","wBgP","width=745,height=490,left=17,top=17,statusbar=no,toolbar=no,scrollbars=never,navbar=no");
wBgP.focus();
}
function pavestone()
{
wBgPS = window.open("http://www.pavestone.com","","");
wBgPS.focus();
}
var IEx = (document.all)?1:0;
var NS4 = (document.layers)?1:0
var NS6 = (document.getElementById)?1:0
var panou=0;
var nr_meniuri=1;
var aratat=0;
var se_ascunde=0;
function arata(nr){
ascunde_pan1();
//arata
aratat=1;
nume_meniu='menu'+nr;
     if(NS4) meniu = eval('document.'+nume_meniu);
else if(NS6) meniu = eval('document.getElementById("'+nume_meniu+'").style');
else  meniu = eval('document.all.'+nume_meniu+'.style');
meniu.visibility="visible";
}
function arata_pan(nr){
aratat=1;
nume_meniu='menu'+nr;
     if(NS4) meniu = eval('document.'+nume_meniu);
else if(NS6) meniu = eval('document.getElementById("'+nume_meniu+'").style');
else  meniu = eval('document.all.'+nume_meniu+'.style');
meniu.visibility="visible";
}
function ascunde(){
	aratat=0;
	timerAscunde=setTimeout('ascunde_pan1()',2000);
}
function ascunde_pan1(){
if(!aratat){
for(i=0;i<nr_meniuri;i++){
	nume_meniu='menu'+i;
	     if(NS4) meniu = eval('document.'+nume_meniu);
	else if(NS6) meniu = eval('document.getElementById("'+nume_meniu+'").style');
	else  meniu = eval('document.all.'+nume_meniu+'.style');
	meniu.visibility="hidden";
	aratat=0;
	}
}
if(window.timerAscunde)clearTimeout(timerAscunde);
}
var  arMenuTop0 = new Array();
arMenuTop0[0] = new Array('Belgard Paver', 'belgardpavers();return(false);');
arMenuTop0[1] = new Array('Utah Pavers', 'utah_pavers.htm');
	
var cellBg = "#cccccc";
var cellBgw = "#999999";
var rowBg = "#666666";
function changeImage(img, src) {
  img.src = src;
}
function fWriteLayers() {
  if(!NS4) {
// layer1 - Products
if(NS4)
	menu1 = new Layer;
	
    document.write("<div id='menu0' style='position:absolute; left:350px; top:100px; width:140px; height:0px; z-index:10; visibility: hidden' onMouseOver=\"arata_pan(0)\" onMouseOut=\"ascunde()\">"); 
    document.write("<table width=100% border=0 cellspacing=0 cellpadding=0>");
    document.write("<tr><td width='*'>");
    document.write("<table width=100% border=0 cellspacing=0 cellpadding=0  bgcolor='" + rowBg + "'><tr><td>");
    document.write("<table width=100% border=0 cellspacing=1 cellpadding=1>");
    for (i=0;i<arMenuTop0.length;i++) {
     	document.write("<tr bgcolor="+ cellBg +" height=16>");
      document.write("<td nowrap width='*' style='cursor:hand;' onmouseover=\"this.style.backgroundColor='"
	      + cellBgw + "'\" onmouseout=\"this.style.backgroundColor='" + cellBg
  	    + "'\" onclick=\"" + arMenuTop0[i][1] + "\" >");
      document.write("<table width=100% border=0 cellspacing=0 cellpadding=0><tr height=16>");
      document.write("<td width=14 align=right><img src=images/arrow_l3.gif width=11 height=12 border=0></td>");
      document.write("<td width=5><img src=images/space.gif width=5 height=1 border=0></td>");
    		document.write("<td nowrap width='*'><a href='" 
	      + arMenuTop0[i][1] + "' class=menulevel2 >" + arMenuTop0[i][0] + "</a></td>");
    		document.write("</tr></table></td></tr>");
    }
    document.write("</table>");
    document.write("</td></tr></table>");
    document.write("</td><td width=1 bgcolor='#000000'><img src='images/space.gif' width=1 height=1></td></tr>");
    document.write("<tr><td colSpan=2 width='*' bgcolor='#000000'><img src='images/space.gif' width=1 height=1></td></tr>");
    document.write("</table>");	
    document.write("</div>");
 }
}
var pos =     new Array(270, 215);
var heights = new Array(125, 386);
var menu0;
if(NS6 || IEx)
{
	menu0 = document.getElementById('menu0');
}
function MM_setPosition() {
  var theight = 50;
  if(!NS4) {
   	for (var i=0; i<nr_meniuri; i++)	{
    		if(IEx) { 
     			document.all("menu" + i).style.left = xy.offsetLeft+pos[i];
     			document.all("menu" + i).style.top = xy.offsetTop+heights[i];
    		} 
    		else if(NS4) {
     			document("menu" + i).left = xy.offsetLeft+pos[i];
     			document("menu" + i).top = xy.offsetTop+heights[i];
    		}
    		else if(NS6) {
     			str = "document.getElementById('menu"+i+"').style.left = document.getElementById('xy').offsetLeft + pos["+i+"]";
     			eval(str);
     			str = "document.getElementById('menu"+i+"').style.top = document.getElementById('xy').offsetTop+heights["+i+"]";		
	     		eval(str);
    		}
    }
  }
}
