var shopoon = {};
shopoon.shoppingBoxes = new Array();
shopoon.shoppingBox = function(name, flagOP, width, height, src, parentId){
this.name = name;
this.flagOP = flagOP;
this.width = width;
this.height = height;
this.src = src;
this.parentId = parentId;
this.init();
shopoon.shoppingBoxes.push(this);};
//Méthodes publiques
shopoon.shoppingBox.prototype =
{
init: function()
{
this.expand = false;
if(this.height > 250)
this.expand = true;
},
writeIframe: function()
{
return "<iframe name=\"shopoon-bs\" src=\""+this.src+"\" width=\""+this.width+"\" height=\""+this.height+"\" scrolling=\"no\" marginheight=\"0\" marginwidth=\"0\" frameborder=\"0\"></iframe>";
},
loadIframe: function()
{
	top.frames["shopoon-bs"].location.href=this.src;
},
toString: function()
{
return "shoppingBox Object";
}
};
//Méthodes statiques
shopoon.shoppingBox.getByName = function(name)
{
for (var i = 0; shopoon.shoppingBoxes[i]; i++)
{
if (shopoon.shoppingBoxes[i].name == name)
{
return shopoon.shoppingBoxes[i];
}
}
return false;
};
if(!shopoon.shoppingBox.getByName("mainShoppingBox"))
{
var mainShoppingBox = new shopoon.shoppingBox("mainShoppingBox", "notredeco", 300,250, "http://box.shopoon.fr/notredeco/v3/ShopBox.aspx?css=notredeco&mod=bestof", "shoppingBox");
}

function writeShoppingBox()
{
if(mainShoppingBox.parentId != undefined && mainShoppingBox.parentId != "")
{
    if(document.getElementById(mainShoppingBox.parentId))
	{
        document.getElementById(mainShoppingBox.parentId).innerHTML = mainShoppingBox.writeIframe();
		mainShoppingBox.loadIframe();
	}
    else
	{
        document.write(mainShoppingBox.writeIframe());
		mainShoppingBox.loadIframe();
	}
}
else
{
    document.write(mainShoppingBox.writeIframe());
	mainShoppingBox.loadIframe();
}
}
writeShoppingBox();