alto = 400;
ancho = 780;
arr = screen.height/2 - alto/2;
izq = screen.width/2 - ancho/2;

function vercompra(){
	    newopen = window.open ("tienda/cesta.php?codigo=ver", "cestacompra", "height="+alto+",width="+ancho+",top="+arr+",left="+izq+", scrollbars");
		newopen.focus();
}

function comprar(referencia,precio){
	    newopen = window.open ("../tienda/cesta.php?c=1&codigo="+referencia+"&precio="+precio, "cestacompra", "height="+alto+",width="+ancho+",top="+arr+",left="+izq+", scrollbars");
		newopen.focus();
}
function presupuesto(referencia){
	    newopen = window.open ("../presupuesto/cesta.php?c=1&codigo="+referencia, "cestacompra", "height="+alto+",width="+ancho+",top="+arr+",left="+izq+", scrollbars");
		newopen.focus();
}

function comprarbus(referencia,precio){
	    newopen = window.open ("tienda/cesta.php?codigo="+referencia+"&precio="+precio, "cestacompra", "height="+alto+",width="+ancho+",top="+arr+",left="+izq+", scrollbars");
		newopen.focus();
}
function comprarbuspresu(referencia){
	    newopen = window.open ("presupuesto/cesta.php?codigo="+referencia, "cestacompra", "height="+alto+",width="+ancho+",top="+arr+",left="+izq+", scrollbars");
		newopen.focus();
}
function comprarofe(referencia,precio){
	    newopen = window.open ("ofertas/cesta.php?codigo="+referencia+"&precio="+precio, "cestacompra", "height="+alto+",width="+ancho+",top="+arr+",left="+izq+", scrollbars");
		newopen.focus();
}
function comprarofepresu(referencia,precio){
	    newopen = window.open ("ofertas/cesta.php?codigo="+referencia+"&precio="+precio, "cestacompraofe", "height="+alto+",width="+ancho+",top="+arr+",left="+izq+", scrollbars");
		newopen.focus();
}

function fotoamedida(cual,ancho, alto){
		arr = screen.height/2 - alto/2;
		izq = screen.width/2 - ancho/2;
	    newopen = window.open ("fotoamedida.php?cual="+cual+"&an="+ancho+"&al="+alto, "fotoamedida", "height="+alto+",width="+ancho+",top="+arr+",left="+izq+", scrollbars=no");
		newopen.focus();
}



function inactivo(referencia,precio,descripcion,opcion1,opcion2){
 alert ("Inactivo temporalmente");
}

