var CESTMOI_data = [ {"nom7bit": "Au soleil", "id": "247", "nom": "Au soleil", "items": [{ "type" : "Longline bra", "marque" : "Ange" }] }, 
{"nom7bit": "Naturel", "id": "249", "nom": "Naturel", "items": [{ "type" : "Cache-coeur", "marque" : "Sandro" }] }, 
{"nom7bit": "noir", "id": "382", "nom": "noir", "items": [{ "type" : "Dress", "marque" : "Zara" }, { "type" : "Socks", "marque" : "Monoprix" }, { "type" : "Three quarter boots", "marque" : "fuil tuil" }] }, 
{"nom7bit": "Annees 40", "id": "544", "nom": "Années 40", "items": [{ "type" : "Dress", "marque" : "Sinequanone" }] }, 
{"nom7bit": "A la Campagne", "id": "589", "nom": "A la Campagne...", "items": [{ "type" : "Top", "marque" : "Petit Bateau" }] }, 
{"nom7bit": "Vegas", "id": "592", "nom": "Vegas", "items": [{ "type" : "Top", "marque" : "Bel air" }, { "type" : "Jeans", "marque" : "Diesel" }] }, 
{"nom7bit": "Marie a la soiree Cloziz le 314", "id": "734", "nom": "Marie a la soiree Cloziz "le 31"4", "items": [{ "type" : "Top", "marque" : "Zara" }, { "type" : "Jeans", "marque" : "Mango" }, { "type" : "Belt", "marque" : "Chanel" }] }, 
{"nom7bit": "Cool", "id": "1152", "nom": "Cool", "items": [{ "type" : "Tank", "marque" : "Princesse tam tam" }, { "type" : "Jeans", "marque" : "Dolce &Gabana" }] }, 
{"nom7bit": "Paris Paris", "id": "1153", "nom": "Paris Paris", "items": [{ "type" : "Blouse", "marque" : "Zara" }, { "type" : "Shorts", "marque" : "Mango" }] }, 
{"nom7bit": "Black Cat", "id": "1431", "nom": "Black Cat", "items": [{ "type" : "Combinaison", "marque" : "Les Petites" }] }, 
{"nom7bit": "Vacanciere", "id": "1432", "nom": "Vacancière", "items": [{ "type" : "Blouse", "marque" : "Bel air" }, { "type" : "Skirt", "marque" : "Jus d'orange" }, { "type" : "Thongs", "marque" : "Havaianas" }] }, 
{"nom7bit": "Papillon Noir", "id": "2567", "nom": "Papillon Noir", "items": [{ "type" : "Top", "marque" : "Hiro" }, { "type" : "Skirt", "marque" : "Zara" }] }, 
{"nom7bit": "Gipsy", "id": "2568", "nom": "Gipsy", "items": [{ "type" : "Blouse", "marque" : "American Apparel" }, { "type" : "Jeans", "marque" : "Gap" }] }, 
{"nom7bit": "Safari", "id": "2569", "nom": "Safari", "items": [{ "type" : "T-shirt", "marque" : "Agnès b" }, { "type" : "Shorts", "marque" : "H&M" }, { "type" : "Sneakers", "marque" : "Rebook" }] }];

var CESTMOI_tofindex = 2;

function CESTMOI_updatetof() {
  var tag = document.getElementById('look_CESTMOI');
  var dbgstr = CESTMOI_tofindex + "\n" + tag.src + "\n";
  var new_src = 'http://www.cloziz.com/look/thumb/lookid/' + CESTMOI_data[CESTMOI_tofindex].id;
  var new_link = 'http://www.cloziz.com/look/show/lookid/' + CESTMOI_data[CESTMOI_tofindex].id;
  if (tag) {
    tag.setAttribute("src", new_src);
    tag.setAttribute("alt", CESTMOI_data[CESTMOI_tofindex].nom);
  }
  dbgstr += tag.src + "\n";
  tag = document.getElementById('nomlook_CESTMOI');
  if (tag) {
    tag.innerHTML = CESTMOI_data[CESTMOI_tofindex].nom;
    tag.href = new_link;
  }
  tag = document.getElementById('detaillook_CESTMOI');
  if (tag) {
    var items = CESTMOI_data[CESTMOI_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_CESTMOI');
  if (tag) tag.href = new_link;
  tag = document.getElementById('link2_CESTMOI');
  if (tag) tag.href = new_link;
  return true;
}

function CESTMOI_nexttof() {
  CESTMOI_tofindex++;
  if(CESTMOI_tofindex == CESTMOI_data.length)
    CESTMOI_tofindex = 0;
  return CESTMOI_updatetof();
}

function CESTMOI_prevtof() {
  if(CESTMOI_tofindex==0)
    CESTMOI_tofindex = CESTMOI_data.length;
  CESTMOI_tofindex--;
  return CESTMOI_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://www.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://www.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://www.cloziz.com">');
document.write('<img style="border: 0; padding: 0;" src="http://www.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://www.cloziz.com/images/widget/widget_mid_bg_top.gif) repeat-x bottom #C5C5C5;">'); // mid mcontent
document.write('<div style="height: 5px; background: url(http://www.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://www.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_CESTMOI" href="http://www.cloziz.com/CESTMOI/look/Au+soleil"><img id="look_CESTMOI" alt="Au soleil" style="border: 1px solid #313131; padding: 0; margin: 0;" src="http://www.cloziz.com/look/thumb/lookid/247" /></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="CESTMOI_prevtof(); return false;">');
document.write('<img style="margin: 0; padding: 0; width: 25px; height: 60px; border: 0; background: url(http://www.cloziz.com/images/widget/widget_mid_nav_prev.gif) top no-repeat;" src="http://www.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="CESTMOI_nexttof(); return false;">');
document.write('<img style="margin: 0; padding: 0; width: 25px; height: 60px; border: 0; background: url(http://www.cloziz.com/images/widget/widget_mid_nav_next.gif) top no-repeat;" src="http://www.cloziz.com/images/widget/void.gif" alt="next" onmouseover="style.background=\'url(http://www.cloziz.com/images/widget/widget_mid_nav_next.gif) bottom no-repeat;\'" onmouseout="style.background=\'url(http://www.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_CESTMOI" 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_CESTMOI">');
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://www.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://www.cloziz.com" style="font-size: 10px; text-decoration: none; color: #910134;" onmouseover="style.color=\'#5d0122\'" onmouseout="style.color=\'#910134\'" id="link2_CESTMOI">Le reste sur cloziz.com</a>');
document.write('</div>');
document.write('<div style="height: 5px; font-size: 0px; background: url(http://www.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://www.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://www.cloziz.com/images/widget/widget_btm_bg-left.gif) left top no-repeat;">'); // wbtm bleft
document.write('<div style="height: 10px; background: url(http://www.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>');

CESTMOI_updatetof();


