// JavaScript Luna Lunera  - IAR&IGG 2007 v3.0
AnchoPantalla = screen.availWidth;
AltoPantalla = screen.availHeight;

function AbrirVentana(URL, Ancho, Alto)
{
	PosX = (AnchoPantalla - Ancho) / 2;
	PosY = (AltoPantalla - Alto) / 2;

	vent = window.open(URL, "", "toolbar=no, scrollbars=no, left=" + PosX + ", top=" + PosY + ", width=" + Ancho + ", height=" + Alto);
}
function AbrirVentanaScroll(URL, Ancho, Alto, scrollbars)
{
	PosX = (AnchoPantalla - Ancho) / 2;
	PosY = (AltoPantalla - Alto) / 2;

	vent = window.open(URL, "", "toolbar=no, scrollbars="+scrollbars+", left=" + PosX + ", top=" + PosY + ", width=" + Ancho + ", height=" + Alto);
}
function AbrirVentanaModal(URL, Ancho, Alto, Centrado)
{ 
	Centrado ? Centrado = "yes" : Centrado = "no";
	showModalDialog(URL, "", "dialogWidth:" + Ancho + "px; dialogHeight:" + Alto + "px; center:" + Centrado)
}

function TramitarPedido(importe, minimo)
{
	window.location = "Pedido1.asp";
	/*
	if (importe >= minimo)
	{
		window.location = "Pedido1.asp";
	}
	else
	{
		alert("Debe hacer un pedido mínimo de " + minimo + " euros");	
	}
	*/
}
function Favoritos(IdArticulo)
{
	URL = "Favoritos.asp";
	if (IdArticulo!=null)
	{
		URL += "?IdArticulo=" + IdArticulo;
	}
	AbrirVentanaScroll(URL, 450, 300, "yes");
}