function MM_jumpMenu(targ,selObj,restore){ //v3.0
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}

function fullscreen(URL){
   bName = navigator.appName; 
   bVer = parseInt(navigator.appVersion);
   bPlat = navigator.platform;

   if (bPlat == "Win32" && bName == "Microsoft Internet Explorer" && bVer > 3) {
      if (confirm) {
         window.open(URL, 'mapa', 'type=fullWindow,fullscreen=yes');
      }
   }
   else if (bPlat == "Win16" && bName == "Microsoft Internet Explorer" && bVer > 3) {
      if (confirm) {
         window.open(URL, 'mapa', 'type=fullWindow,fullscreen=yes');
      }
   }
   else if (confirm) {
         window.open(URL, 'mapa', 'type=fullWindow,fullscreen=yes');
   }
}

function abre(url,janela,larg,alt,scroll,pos1,pos2){
 window.open(url,janela,"toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars='+scroll+',resizable=no,copyhistory=no,top="+pos1+",left="+pos2+",screenY="+pos1+",screenX="+pos2+",width="+larg+",height="+alt);
}

function noscroll(param,w,h,nome) {
        var nomearq=param;
        var windowvar = window.open(nomearq,nome,"scrollbars=no,location=no,directories=no,status=no,menubar=no,resizable=no,toolbar=no,width="+ w + ",height="+h );
}

function janela(param,w,h,nome) {
        var nomearq=param;
        var windowvar = window.open(nomearq,nome,"scrollbars=yes,location=no,directories=no,status=no,menubar=no,resizable=no,toolbar=no,width="+ w + ",height="+h );
}

function showFoto(codfoto) {
	var win = window.open("", "win", "scrollbars=yes,location=no,directories=no,status=no,menubar=no,resizable=no,toolbar=no,width=740,height=450"); // a window object
	var ab = tbImg[codfoto].split("|") ;
       var tBox =  ab[2];
	var tBox1 = ab[3];
	var tBox2 = ab[4];

	
	win.document.open("text/html", "replace");
	win.document.write("<html><head><title>Arquitetura &amp; Construção</title><link rel='stylesheet' type='text/css' href='/arquitetura/css/padrao.css' /><link rel='stylesheet' type='text/css' href='/arquitetura/css/fontes.css' /></head>");
	win.document.write("<body bgcolor='#E2E2E2' topmargin='0' leftmargin='0' marginheight='0' marginwidth='0'>");
	win.document.write("<div style='width:680px; _width:700px; background-color:white; padding: 10px; margin:10px 10px 0px 10px; float: left; display: inline;'>");
	win.document.write("<div style='width: 680px; margin: 0px 0px 10px 0px; float: left; display: inline;'>");
	win.document.write("<img src='/arquitetura/imagem/padrao/lg_peq.gif' width='115' height='36' alt='' border='0'></div>");
	win.document.write("<div style='margin: 0 5px 0 0; float: left; display: inline;'>");
	win.document.write("<img src='/" + tBox +"' alt='" + tBox1 + "' border='0'></div>");

	win.document.write("<span class='texto'>" + tBox2 + "<br></span></div>");
	win.document.write("<div style='width:700px; height:10px; margin:0px; float: left; display: inline;'>&nbsp;<br></div></body></html>");
	win.document.close();
	
}

function slideFoto(codfoto) {
	var win = window.open("", "window", "scrollbars=yes,location=no,directories=no,status=no,menubar=no,resizable=no,toolbar=no,width=740,height=450"); // a window object
	var ab2 = tbImg[codfoto].split("|") ;
    var tBox3 =  ab2[2];
	var tBox4 = ab2[3];
	
	
	win.document.open("text/html", "replace");
	win.document.write("<html><head><title>Arquitetura &amp; Construção</title>");
	win.document.write("<link rel='stylesheet' type='text/css' href='/arquitetura/css/padrao.css' /><link rel='stylesheet' type='text/css' href='/arquitetura/css/fontes.css' /></head>");
	win.document.write("<body bgcolor='#E2E2E2' topmargin='0' leftmargin='0' marginheight='0' marginwidth='0'>");
	win.document.write("<div style='width: 680px; margin: 5px; float: left; display: inline;'>");
	win.document.write("<img src='/arquitetura/imagem/padrao/lg_peq.gif' width='115' height='36' alt='' border='0'></div>");
	win.document.write("<div id='img_grande' style='width: 500px; margin: 0px 5px 10px 5px; float: left; display: inline;'>");
	win.document.write("<center><img src='/" + tBox3 +"' alt='" + tBox4 + "' border='0'></center></div>");
	win.document.write("<div style='width: 210px; margin: 0px 0px 0px 0px; float: left; display: inline;'>");

	for (var i=0; i<tbImg.length; i++) {
		var imgMenu = "<div style='width:100px; margin:2px; float:left; display:inline;'><a onclick=\"document.getElementById('img_grande').innerHTML='<img src=/{nome_imagem2} alt=- border=0>';\" href=\"/arquitetura/livre/vejafotos.html\" target=\"hit\"><img src='/{nome_imagem}' alt='{txtalt}' border=0></a><br></div>";
		var imgArray = tbImg[i].split("|") ;
        var x =  imgMenu.replace("{nome_imagem}", imgArray[1]);
		x = x.replace("{nome_imagem2}", imgArray[2]);
		x = x.replace("{txtalt}", imgArray[3]);
		x = x.replace("{codfoto}", i);
		win.document.write(x);
	}
	win.document.write("<iframe width=1 height=1 marginwidth=0 marginheight=0 frameborder=0 scrolling=no name=\"hit\" src=\"/arquitetura/livre/vejafotos.html\"></iframe>");
	win.document.write("</div></body></html>");
	win.document.close();
	
}

function chFoto() {
  var tmpMat = document.getElementById('box_principal') ;
  var t = tmpMat.innerHTML ;
     var tmpBox= "<div class='img_thumb'><a href='javascript:showFoto({codfoto});' ><img src='/{nome_imagem}' alt='{txtalt}' border=0><br><img src='/arquitetura/imagem/padrao/btn_ampliar.gif' alt='clique aqui para ampliar' border=0></a></div>";
  
	for (var i=0;i<tbImg.length;i++) {
		var ax = tbImg[i].split("|") ;
        var tBox =  tmpBox.replace("{nome_imagem}", ax[1]);
		tBox = tBox.replace("{txtalt}", ax[3]);
		tBox = tBox.replace("{codfoto}", i);
    	t = t.replace (ax[0], tBox) ;
	}
	tmpMat.innerHTML = t ;
}

ns4 = (document.layers)? true:false 
dom = (document.getElementById) ? true : false; 
ie = (document.all)? true:false 
ie4 = ie && !dom

function hideAll() {  
	if (ns4) {
		document.layers['menu1'].visibility = "hide";
		document.layers['menu2'].visibility = "hide";
		document.layers['menu3'].visibility = "hide";
		document.layers['menu4'].visibility = "hide";
		document.layers['menu5'].visibility = "hide";
		document.layers['menu6'].visibility = "hide";
		document.layers['menu7'].visibility = "hide";
	}
	else if (ie4) {
		document.all['menu1'].style.visibility = "hidden";
		document.all['menu2'].style.visibility = "hidden";
		document.all['menu3'].style.visibility = "hidden";
		document.all['menu4'].style.visibility = "hidden";
		document.all['menu5'].style.visibility = "hidden";
		document.all['menu6'].style.visibility = "hidden";
		document.all['menu7'].style.visibility = "hidden";
	}
	else if (dom) {
		document.getElementById('menu1').style.visibility = 'hidden'
		document.getElementById('menu2').style.visibility = 'hidden'
		document.getElementById('menu3').style.visibility = 'hidden'
		document.getElementById('menu4').style.visibility = 'hidden'
		document.getElementById('menu5').style.visibility = 'hidden'
		document.getElementById('menu6').style.visibility = 'hidden'
		document.getElementById('menu7').style.visibility = 'hidden'
	}
}  
  
function show(id) {  
	if (ns4) {
		hideAll();
		document.layers[id].visibility = "show";	
	}
	else if (ie4) {
		hideAll();
		document.all[id].style.visibility = "visible";
	}
	else if (dom) {
		hideAll();
		document.getElementById(id).style.visibility = 'visible';
	}
}

function hide(id) {  
	if (ns4) document.layers[id].visibility = "hide"  
	else if (ie4) document.all[id].style.visibility = "hidden"  
	else if (dom) document.getElementById(id).style.visibility = 'hidden' 
} 
 

