var Cool_data = [ {"nom7bit": "Cool Italiana3", "id": "997", "nom": "Cool Italiana3", "items": [{ "type" : "Top", "marque" : "Zara" }, { "type" : "Skirt", "marque" : "Capucine Puerari" }, { "type" : "Sling-backs", "marque" : "Dolce & Gabbana" }] }, 
{"nom7bit": "Cool Bag", "id": "998", "nom": "Cool Bag", "items": [{ "type" : "Shorts", "marque" : "Et Vous" }, { "type" : "Bag / Purse", "marque" : "Topshop" }] }, 
{"nom7bit": "Cool Pink", "id": "1020", "nom": "Cool Pink", "items": [{ "type" : "Jacket", "marque" : "Pepe jeans" }, { "type" : "Shirt", "marque" : "Vanessa Bruno" }, { "type" : "Jeans", "marque" : "Zara" }, { "type" : "Shoes", "marque" : "Dimanche à Venise" }] }, 
{"nom7bit": "Cool Nacre", "id": "1021", "nom": "Cool Nacre", "items": [{ "type" : "Pants", "marque" : "Benetton" }, { "type" : "Sling-backs", "marque" : "Dolce & Gabbana" }] }, 
{"nom7bit": "Cool Jeans", "id": "1023", "nom": "Cool Jeans", "items": [{ "type" : "Jeans", "marque" : "APC" }, { "type" : "Shirt", "marque" : "Maï" }] }, 
{"nom7bit": "Cool Maje", "id": "1076", "nom": "Cool Maje", "items": [{ "type" : "Top", "marque" : "Maje" }, { "type" : "Jeans", "marque" : "Dolce & Gabbana" }] }, 
{"nom7bit": "Les Petites Cool", "id": "1077", "nom": "Les Petites Cool", "items": [{ "type" : "Blouse", "marque" : "Zara" }, { "type" : "Jeans", "marque" : "Les Petites" }, { "type" : "Sling-backs", "marque" : "Zara" }] }, 
{"nom7bit": "Cool Green", "id": "1099", "nom": "Cool Green", "items": [] }, 
{"nom7bit": "Cool Pink1", "id": "1100", "nom": "Cool Pink1", "items": [] }, 
{"nom7bit": "Cool night", "id": "1102", "nom": "Cool night", "items": [] }, 
{"nom7bit": "Belle air1", "id": "1112", "nom": "Belle air1", "items": [{ "type" : "Dress", "marque" : "Bel air" }] }, 
{"nom7bit": "Cool Top", "id": "1162", "nom": "Cool Top", "items": [{ "type" : "Blouse", "marque" : "Zara" }] }, 
{"nom7bit": "Cool Black", "id": "1163", "nom": "Cool Black", "items": [{ "type" : "Top", "marque" : "Zara" }, { "type" : "Jeans", "marque" : "Armani" }] }, 
{"nom7bit": "Cool Zara1", "id": "1169", "nom": "Cool Zara1", "items": [{ "type" : "Dress", "marque" : "Zara" }, { "type" : "Sling-backs", "marque" : "Zara" }] }, 
{"nom7bit": "Veste so cool", "id": "1184", "nom": "Veste so cool", "items": [{ "type" : "Jacket", "marque" : "Zara" }] }, 
{"nom7bit": "Cool Rayures1", "id": "1199", "nom": "Cool Rayures1", "items": [{ "type" : "Dress", "marque" : "Benetton" }] }, 
{"nom7bit": "Cool Rouge", "id": "1219", "nom": "Cool Rouge", "items": [{ "type" : "Top", "marque" : "Sisley" }] }, 
{"nom7bit": "Cool Black1", "id": "1220", "nom": "Cool Black1", "items": [{ "type" : "Shirt", "marque" : "Bel air" }, { "type" : "Jeans", "marque" : "Diesel" }] }, 
{"nom7bit": "Cool Colors", "id": "1230", "nom": "Cool Colors", "items": [{ "type" : "Dress", "marque" : "BCBG" }] }, 
{"nom7bit": "Cool Dog", "id": "1234", "nom": "Cool Dog", "items": [{ "type" : "T-shirt", "marque" : "Zara" }, { "type" : "Pants", "marque" : "Comptoir des cotonniers" }] }, 
{"nom7bit": "Cool BW", "id": "1250", "nom": "Cool B&W", "items": [{ "type" : "Shirt", "marque" : "Zadig & Voltaire" }, { "type" : "Top", "marque" : "H&M" }] }, 
{"nom7bit": "Cool Canard", "id": "1281", "nom": "Cool Canard", "items": [{ "type" : "Sweater", "marque" : "Benetton" }, { "type" : "Bag / Purse", "marque" : "Fendi" }] }];

var Cool_tofindex = 2;

function Cool_updatetof() {
  var tag = document.getElementById('look_Cool');
  var dbgstr = Cool_tofindex + "\n" + tag.src + "\n";
  var new_src = 'http://www.cloziz.com/look/thumb/lookid/' + Cool_data[Cool_tofindex].id;
  var new_link = 'http://www.cloziz.com/look/show/lookid/' + Cool_data[Cool_tofindex].id;
  if (tag) {
    tag.setAttribute("src", new_src);
    tag.setAttribute("alt", Cool_data[Cool_tofindex].nom);
  }
  dbgstr += tag.src + "\n";
  tag = document.getElementById('nomlook_Cool');
  if (tag) {
    tag.innerHTML = Cool_data[Cool_tofindex].nom;
    tag.href = new_link;
  }
  tag = document.getElementById('detaillook_Cool');
  if (tag) {
    var items = Cool_data[Cool_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_Cool');
  if (tag) tag.href = new_link;
  tag = document.getElementById('link2_Cool');
  if (tag) tag.href = new_link;
  return true;
}

function Cool_nexttof() {
  Cool_tofindex++;
  if(Cool_tofindex == Cool_data.length)
    Cool_tofindex = 0;
  return Cool_updatetof();
}

function Cool_prevtof() {
  if(Cool_tofindex==0)
    Cool_tofindex = Cool_data.length;
  Cool_tofindex--;
  return Cool_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_Cool" href="http://www.cloziz.com/Cool/look/Cool+Italiana3"><img id="look_Cool" alt="Cool Italiana3" style="border: 1px solid #313131; padding: 0; margin: 0;" src="http://www.cloziz.com/look/thumb/lookid/997" /></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="Cool_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="Cool_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_Cool" 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_Cool">');
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_Cool">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>');

Cool_updatetof();


