var Sacha_data = [ {"nom7bit": "Miu Miu", "id": "1303", "nom": "Miu Miu", "items": [{ "type" : "Top", "marque" : "Miu Miu" }, { "type" : "Shorts", "marque" : "Abercrombie" }, { "type" : "High heels", "marque" : "Miu Miu" }] }, 
{"nom7bit": "Miu Miu1", "id": "1304", "nom": "Miu Miu1", "items": [{ "type" : "Dress", "marque" : "Miu Miu" }] }, 
{"nom7bit": "Swimwear1", "id": "1315", "nom": "Swimwear1", "items": [{ "type" : "Swimsuit top", "marque" : "Abercrombie" }, { "type" : "Swimsuit", "marque" : "Abercrombie" }] }, 
{"nom7bit": "Barbes Style", "id": "1344", "nom": "Barbes Style", "items": [{ "type" : "Ankle boots", "marque" : "Barbes...^^" }] }, 
{"nom7bit": "Glam Rock", "id": "1371", "nom": "Glam' Rock", "items": [{ "type" : "Blouse", "marque" : "Emilie Casiez" }, { "type" : "Jeans", "marque" : "Cheap Monday" }, { "type" : "Sandals", "marque" : "Ellio Pitti (marque espagnole)" }, { "type" : "Make-up", "marque" : "Make up For Ever" }] }, 
{"nom7bit": "Ibiza Summer 2007", "id": "1388", "nom": "Ibiza Summer 2007", "items": [{ "type" : "Blouse", "marque" : "American Vintage" }, { "type" : "Jeans", "marque" : "Cheap Monday" }, { "type" : "Sandals", "marque" : "Ellio pitti" }] }, 
{"nom7bit": "GoinOut1", "id": "1430", "nom": "Goin'Out1", "items": [{ "type" : "Jacket", "marque" : "Comptoire des Cotoniers" }, { "type" : "Jeans", "marque" : "Diesel" }, { "type" : "Bag / Purse", "marque" : "H&M" }, { "type" : "Make-up", "marque" : "Rouge M.A.C" }] }, 
{"nom7bit": "Commissaire Pony1", "id": "1609", "nom": "Commissaire Pony1", "items": [{ "type" : "Trench coat", "marque" : "Comptoire des Cotoniers" }, { "type" : "Thigh highs", "marque" : "Dim'Up" }, { "type" : "Sling-backs", "marque" : "Mango" }] }, 
{"nom7bit": "Ecolo Arty", "id": "1655", "nom": "Ecolo Arty", "items": [{ "type" : "T-shirt", "marque" : "YSASU" }, { "type" : "Jeans", "marque" : "Zara" }] }, 
{"nom7bit": "Maman Je T Aime", "id": "1656", "nom": "Maman Je T' Aime", "items": [{ "type" : "Blouse", "marque" : "Ysasu" }, { "type" : "Jeans", "marque" : "Zara" }, { "type" : "Bag / Purse", "marque" : "L'oeuf" }] }, 
{"nom7bit": "Dead Candy", "id": "1719", "nom": "Dead Candy", "items": [{ "type" : "Dress", "marque" : "Marc Jacobs" }, { "type" : "Sling-backs", "marque" : "Barbès" }] }, 
{"nom7bit": "UpsidedowN", "id": "1764", "nom": "UpsidedowN", "items": [{ "type" : "Blouse", "marque" : "Zara" }, { "type" : "Jeans", "marque" : "Mango" }, { "type" : "Three quarter boots", "marque" : "Comptoir des cotonniers" }] }, 
{"nom7bit": "I Love Terry", "id": "1832", "nom": "I Love Terry", "items": [{ "type" : "T-shirt", "marque" : "American Apparel" }, { "type" : "Jeans", "marque" : "Mango" }, { "type" : "Bracelet", "marque" : "Hermes" }] }, 
{"nom7bit": "Kate Moss 2006", "id": "1890", "nom": "Kate Moss 2006", "items": [{ "type" : "Tunic", "marque" : "Zara" }, { "type" : "Three quarter boots", "marque" : "Barbes for Ever" }] }, 
{"nom7bit": "Blue Monday", "id": "1891", "nom": "Blue Monday", "items": [{ "type" : "Dress", "marque" : "Mango by Mila" }, { "type" : "Platforms", "marque" : "Miu Miu" }] }, 
{"nom7bit": "Blue Magik", "id": "2130", "nom": "Blue Magik", "items": [{ "type" : "Dress", "marque" : "Zara" }, { "type" : "Tights", "marque" : "Wolford" }, { "type" : "Sling-backs", "marque" : "Ellio Pitti" }] }, 
{"nom7bit": "La Classe Americaine1", "id": "2234", "nom": ""La Classe Américaine"1", "items": [{ "type" : "Foulard", "marque" : "Hermes" }, { "type" : "Sling-backs", "marque" : "Y S L" }] }];

var Sacha_tofindex = 12;

function Sacha_updatetof() {
  var tag = document.getElementById('look_Sacha');
  var dbgstr = Sacha_tofindex + "\n" + tag.src + "\n";
  var new_src = 'http://en.cloziz.com/look/thumb/lookid/' + Sacha_data[Sacha_tofindex].id;
  var new_link = 'http://en.cloziz.com/look/show/lookid/' + Sacha_data[Sacha_tofindex].id;
  if (tag) {
    tag.setAttribute("src", new_src);
    tag.setAttribute("alt", Sacha_data[Sacha_tofindex].nom);
  }
  dbgstr += tag.src + "\n";
  tag = document.getElementById('nomlook_Sacha');
  if (tag) {
    tag.innerHTML = Sacha_data[Sacha_tofindex].nom;
    tag.href = new_link;
  }
  tag = document.getElementById('detaillook_Sacha');
  if (tag) {
    var items = Sacha_data[Sacha_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_Sacha');
  if (tag) tag.href = new_link;
  tag = document.getElementById('link2_Sacha');
  if (tag) tag.href = new_link;
  return true;
}

function Sacha_nexttof() {
  Sacha_tofindex++;
  if(Sacha_tofindex == Sacha_data.length)
    Sacha_tofindex = 0;
  return Sacha_updatetof();
}

function Sacha_prevtof() {
  if(Sacha_tofindex==0)
    Sacha_tofindex = Sacha_data.length;
  Sacha_tofindex--;
  return Sacha_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://en.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://en.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://en.cloziz.com">');
document.write('<img style="border: 0; padding: 0;" src="http://en.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://en.cloziz.com/images/widget/widget_mid_bg_top.gif) repeat-x bottom #C5C5C5;">'); // mid mcontent
document.write('<div style="height: 5px; background: url(http://en.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://en.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_Sacha" href="http://en.cloziz.com/Sacha/look/Miu+Miu"><img id="look_Sacha" alt="Miu Miu" style="border: 1px solid #313131; padding: 0; margin: 0;" src="http://en.cloziz.com/look/thumb/lookid/1303" /></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="Sacha_prevtof(); return false;">');
document.write('<img style="margin: 0; padding: 0; width: 25px; height: 60px; border: 0; background: url(http://en.cloziz.com/images/widget/widget_mid_nav_prev.gif) top no-repeat;" src="http://en.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="Sacha_nexttof(); return false;">');
document.write('<img style="margin: 0; padding: 0; width: 25px; height: 60px; border: 0; background: url(http://en.cloziz.com/images/widget/widget_mid_nav_next.gif) top no-repeat;" src="http://en.cloziz.com/images/widget/void.gif" alt="next" onmouseover="style.background=\'url(http://en.cloziz.com/images/widget/widget_mid_nav_next.gif) bottom no-repeat;\'" onmouseout="style.background=\'url(http://en.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_Sacha" 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_Sacha">');
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://en.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://en.cloziz.com" style="font-size: 10px; text-decoration: none; color: #910134;" onmouseover="style.color=\'#5d0122\'" onmouseout="style.color=\'#910134\'" id="link2_Sacha">Le reste sur cloziz.com</a>');
document.write('</div>');
document.write('<div style="height: 5px; font-size: 0px; background: url(http://en.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://en.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://en.cloziz.com/images/widget/widget_btm_bg-left.gif) left top no-repeat;">'); // wbtm bleft
document.write('<div style="height: 10px; background: url(http://en.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>');

Sacha_updatetof();


