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);};shopoon.shoppingBox.prototype={init:function(){this.expand=false;if(this.height > 250)this.expand=true;},writeIframe:function(){return "";},loadIframe:function(){if(top.frames["shopoon"]){try{top.frames["shopoon"].location.href=this.src;}catch(e){}}},setFLAG:function(flag){this.flag=flag;this.src=this.src.replace(/FLAGREP/gi,this.flag);},setMOD:function(mod){this.mod=mod;this.src=this.src.replace(/MODREP/gi,this.mod);},setCSS:function(css){this.css=css;this.src=this.src.replace(/CSSREP/gi,this.css);},setEXTCSS:function(css){this.extcss=css;this.src=this.src.replace(/EXTREP/gi,'extcss='+this.extcss);},setBRAND:function(brdId){this.brdId=brdId;this.src=this.src.replace(/BRDIDREP/gi,this.brdId);if(this.brdId!=''){this.src=this.src.replace("/ShopBox.aspx","/brand/ShopBox.aspx")}},toString:function(){return "shoppingBox Object";}};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;};var mainShoppingBox;if(!shopoon.shoppingBox.getByName("mainShoppingBox")){mainShoppingBox=new shopoon.shoppingBox("mainShoppingBox","shopoon",0,0,"http://box.shopoon.fr/ShopBox.aspx?flag=FLAGREP&mod=MODREP&css=CSSREP&brandId=BRDIDREP&EXTREP","shoppingBox");}function WriteShoppingBox(flag,mod,css,width,height,brdId,extcss){if(mainShoppingBox.parentId!=undefined && mainShoppingBox.parentId!=""){mainShoppingBox.setFLAG(flag);mainShoppingBox.setMOD(mod);mainShoppingBox.setCSS(css);mainShoppingBox.setBRAND(brdId);mainShoppingBox.setEXTCSS(extcss);mainShoppingBox.width=width;mainShoppingBox.height=height;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("rue89","","noirgrisrouge",300,250,"","");