<?php 
	include("encabezado.php");
	
	//ESTO PARA OCULTAR LOS PARÁMETROS GET
	if (!$_GET){
		$_SESSION['got'] = $_GET;
		$uri_parts = explode('?', $_SERVER['REQUEST_URI'], 2);
		$actual_link = "http://$_SERVER[HTTP_HOST]" . $uri_parts[0];
		echo $actual_link;
        header('Location: ' . $actual_link);
        die;
    }
    else{
		if (!empty($_SESSION['got'])){
			$_GET = $_SESSION['got'];
			unset($_SESSION['got']);
		}
		
		$piezaId = "342";
		if (isset($_GET['idPieza'])) {
		  $piezaId = $_GET['idPieza'];
		}
		$query_Recordset1 = sprintf("SELECT * FROM pieza WHERE pieza.id = '%s'", $piezaId);
		$Recordset1 = mysqli_query($catalogo, $query_Recordset1) or die(mysqli_error());
		$row_Recordset1 = $Recordset1->fetch_assoc();
		$totalRows_Recordset1 = $Recordset1->num_rows;
	}
?>
<div class="contenido">

    <p>&nbsp; </p>


        <div >
            <?php include("fragmento_tab_pieza.php"); ?>
        </div>


</div>


<?php include("pie.php"); ?>
</body>
<script type="text/javascript">
	var TabbedPanels1 = new Spry.Widget.TabbedPanels("TabbedPanels1");

	$(document).ready(function(){
		var elem = document.getElementById("nocopiar");
		elem.unselectable = "on";
	});
	
	function goBack(){
	  window.history.back()
  	}
</script>
<script type="text/javascript" src="//e.issuu.com/embed.js" async="true"></script>
<script type="text/javascript">
	function mostrarPopup(sel){
		var focus = $('.focus');
 		var container = $('.focus .container');
		container.empty();
		container.append('<img src=\"' + sel.src + '\" widht="500px" height="500px" style="background-color:#fff"/>');
		focus.fadeIn().addClass('enabled');
		$('.contenido').append('<div class="overlay" style="z-index:10000;"></div>');

	}
	function cerrarPopup(){
		var options = {};
		$( ".focus" ).hide( "fade", options, 300, null );
		
		setTimeout(function() {
			$('.focus').css('display', 'none').removeClass('enabled');
    		$('.contenido').removeClass('darken');
    		$('.overlay').remove();
      	}, 300 );
	}

</script>
</html>
