var Shopaholic_data = [ {"nom7bit": "Look fleurie", "id": "2143", "nom": "Look fleurie", "items": [{ "type" : "Tunique", "marque" : "Promod" }, { "type" : "Jeans", "marque" : "Denim chez Etam" }] }, 
{"nom7bit": "Bleu  ", "id": "2144", "nom": "Bleu & argenté", "items": [{ "type" : "Robe", "marque" : "Promod" }, { "type" : "Sandales", "marque" : "La Redoute" }, { "type" : "Boucles d'oreilles", "marque" : "Promod" }, { "type" : "Sac à main", "marque" : "Promod" }] }, 
{"nom7bit": "Bleu  blanc", "id": "2145", "nom": "Bleu & blanc", "items": [{ "type" : "Chemisier", "marque" : "?" }, { "type" : "Jupe", "marque" : "NafNaf" }] }, 
{"nom7bit": "Look taf", "id": "2193", "nom": "Look taf", "items": [{ "type" : "Chemise", "marque" : "Etam" }, { "type" : "Veste", "marque" : "H&M" }, { "type" : "Jeans", "marque" : "Denim Etam" }, { "type" : "Escarpins", "marque" : "Etam" }] }, 
{"nom7bit": "Noir et doree", "id": "2211", "nom": "Noir et dorée", "items": [{ "type" : "Blouse", "marque" : "Sinequanone" }, { "type" : "Jeans", "marque" : "Denim" }, { "type" : "Bottines", "marque" : "Morgan" }, { "type" : "Tailleur", "marque" : "H&M" }] }, 
{"nom7bit": "Chaussure", "id": "2212", "nom": "Chaussure", "items": [{ "type" : "Bottines", "marque" : "Morgan" }] }, 
{"nom7bit": "look fleurie et colore", "id": "2221", "nom": "look fleurie et coloré", "items": [{ "type" : "T-shirt", "marque" : "Camaieu" }, { "type" : "Gilet", "marque" : "?" }, { "type" : "Jeans", "marque" : "Denim" }, { "type" : "Chaussures", "marque" : "?" }] }, 
{"nom7bit": "Pendentif", "id": "2340", "nom": "Pendentif", "items": [{ "type" : "Collier", "marque" : "Thomas Sabo" }] }];

var Shopaholic_tofindex = 3;

function Shopaholic_updatetof() {
  var tag = document.getElementById('look_Shopaholic');
  var dbgstr = Shopaholic_tofindex + "\n" + tag.src + "\n";
  var new_src = 'http://fr.cloziz.com/look/thumb/lookid/' + Shopaholic_data[Shopaholic_tofindex].id;
  var new_link = 'http://fr.cloziz.com/look/show/lookid/' + Shopaholic_data[Shopaholic_tofindex].id;
  if (tag) {
    tag.setAttribute("src", new_src);
    tag.setAttribute("alt", Shopaholic_data[Shopaholic_tofindex].nom);
  }
  dbgstr += tag.src + "\n";
  tag = document.getElementById('nomlook_Shopaholic');
  if (tag) {
    tag.innerHTML = Shopaholic_data[Shopaholic_tofindex].nom;
    tag.href = new_link;
  }
  tag = document.getElementById('detaillook_Shopaholic');
  if (tag) {
    var items = Shopaholic_data[Shopaholic_tofindex].items;
    tag.innerHTML = "";
    for(var i=0; i<items.length; i++) {
      tag.innerHTML += '<li style="display: inline;">';
      tag.innerHTML += items[i].type + " : " + items[i].marque;
      if(i<items.length-1)
        tag.innerHTML += ',';
      tag.innerHTML += "</li>  ";
    }
  }
  tag = document.getElementById('link1_Shopaholic');
  if (tag) tag.href = new_link;
  tag = document.getElementById('link2_Shopaholic');
  if (tag) tag.href = new_link;
  return true;
}

function Shopaholic_nexttof() {
  Shopaholic_tofindex++;
  if(Shopaholic_tofindex == Shopaholic_data.length)
    Shopaholic_tofindex = 0;
  return Shopaholic_updatetof();
}

function Shopaholic_prevtof() {
  if(Shopaholic_tofindex==0)
    Shopaholic_tofindex = Shopaholic_data.length;
  Shopaholic_tofindex--;
  return Shopaholic_updatetof();
}

document.write('<div style="margin: 0 auto; width: 230px; font-family: Arial, sans-serif;">');
document.write('<div style="height: 40px; margin: 0 5px; background: url(http://fr.cloziz.com/images/widget/widget_top_bg-left.gif) left top no-repeat;">');
document.write('<div style="height: 40px; margin: 0 auto; background: url(http://fr.cloziz.com/images/widget/widget_top_bg-right.gif) right top no-repeat;">');
document.write('<div style="padding: 2px 0 0 5px;">');
document.write('<a href="http://fr.cloziz.com">');
document.write('<img style="border: 0; padding: 0;" src="http://fr.cloziz.com/images/widget/widget_top_clozizlogo.gif" alt="" /></a>');
document.write('</div></div></div>');

document.write('<div style="margin: 0 5px; padding: 0 10px; background: url(http://fr.cloziz.com/images/widget/widget_mid_bg_top.gif) repeat-x bottom #C5C5C5;">'); // mid mcontent
document.write('<div style="height: 5px; background: url(http://fr.cloziz.com/images/widget/widget_mid_content_top_bg-left.gif) left bottom no-repeat;">'); // content-top left
document.write('<div style="height: 5px; background: url(http://fr.cloziz.com/images/widget/widget_mid_content_top_bg-right.gif) right bottom no-repeat;">'); // content-top right
document.write('</div></div>');
document.write('<div style="padding: 3px 0 6px 0; background: #fff; text-align: center;">'); // content
document.write('<div>'); // photo
document.write('<a target="_blank" id="link1_Shopaholic" href="http://fr.cloziz.com/Shopaholic/look/Look+fleurie"><img id="look_Shopaholic" alt="Look fleurie" style="border: 1px solid #313131; padding: 0; margin: 0;" src="http://fr.cloziz.com/look/thumb/lookid/2143" /></a>\n');
document.write('</div>');
document.write('</div>');
document.write('</div>');
document.write('<div style="width: 100%; height: 60px;">'); //mid nav
document.write('<div style="float: left; width: 25px; height: 60px;">');  // nav previous
document.write('<a href="#" onClick="Shopaholic_prevtof(); return false;">');
document.write('<img style="margin: 0; padding: 0; width: 25px; height: 60px; border: 0; background: url(http://fr.cloziz.com/images/widget/widget_mid_nav_prev.gif) top no-repeat;" src="http://fr.cloziz.com/images/widget/void.gif" alt="previous" onmouseover="style.backgroundPosition=\'bottom\'" onmouseout="style.backgroundPosition=\'top\'">');
document.write('</a>');
document.write('</div>');
document.write('<div style="float: right; width: 25px; height: 60px;">'); // nav next
document.write('<a href="#" onClick="Shopaholic_nexttof(); return false;">');
document.write('<img style="margin: 0; padding: 0; width: 25px; height: 60px; border: 0; background: url(http://fr.cloziz.com/images/widget/widget_mid_nav_next.gif) top no-repeat;" src="http://fr.cloziz.com/images/widget/void.gif" alt="next" onmouseover="style.background=\'url(http://fr.cloziz.com/images/widget/widget_mid_nav_next.gif) bottom no-repeat;\'" onmouseout="style.background=\'url(http://fr.cloziz.com/images/widget/widget_mid_nav_next.gif) top no-repeat;\'">');
document.write('</a>');
document.write('</div>');

document.write('<div style="margin: 0 25px; padding: 0 1px; text-align: center; background: #fff;">'); // lookdata
document.write('<h1 style="margin: 0; padding: 0; border: 0; height: 18px; font-size: 14px; font-weight: bold;">');
document.write('<a style="color: #d0517e; text-decoration: none;" href="#" id="nomlook_Shopaholic" onmouseover="style.color=\'#910134\'" onmouseout="style.color=\'#d0517e\'">Nomdulook</a>');
document.write('</h1>');
document.write('<ul style="margin: 0; padding: 0 10px; height: 42px; list-style: none; text-align: center; line-height: 10px; overflow: hidden; font-size: 10px; color: #000;" id="detaillook_Shopaholic">');
document.write('<li>detail</li>');
document.write('</ul>');
document.write('</div>');
document.write('</div>');
document.write('<div style="clear: both;">'); // clear
document.write('</div>');
document.write('<div style="margin: 0 5px; padding: 0 10px; height: 20px; background: url(http://fr.cloziz.com/images/widget/widget_mid_bg_btm.gif) repeat-x top #C5C5C5;">'); // mid links
document.write('<div style="padding: 2px 10px 0 10px; background: #fff; line-height: 16px; text-align: right;">'); // links
document.write('<a href="http://fr.cloziz.com" style="font-size: 10px; text-decoration: none; color: #910134;" onmouseover="style.color=\'#5d0122\'" onmouseout="style.color=\'#910134\'" id="link2_Shopaholic">Le reste sur cloziz.com</a>');
document.write('</div>');
document.write('<div style="height: 5px; font-size: 0px; background: url(http://fr.cloziz.com/images/widget/widget_mid_content_btm_bg-left.gif) left top no-repeat;">'); // content-btm left
document.write('<div style="height: 5px; font-size: 0px; background: url(http://fr.cloziz.com/images/widget/widget_mid_content_btm_bg-right.gif) right top no-repeat;">'); // content-btm right
document.write('</div>');
document.write('</div>');
document.write('</div>');
document.write('<div style="margin: 0 auto; height: 10px; font-size: 0px;">'); // wbtm
document.write('<div style="margin: 0 5px; height: 10px; background: url(http://fr.cloziz.com/images/widget/widget_btm_bg-left.gif) left top no-repeat;">'); // wbtm bleft
document.write('<div style="height: 10px; background: url(http://fr.cloziz.com/images/widget/widget_btm_bg-right.gif) right top no-repeat;">'); // wbtm bright
document.write('</div>');
document.write('</div>');
document.write('</div>');

document.write('</div>');

Shopaholic_updatetof();


