
function getE(name) {
    if (document.getElementById)
        var elem = document.getElementById(name);
    else if (document.all)
        var elem = document.all[name];
    else if (document.layers)
        var elem = document.layers[name];
    return elem;
}

function OpenWindow(query, w, h, scroll) {
    var l = (screen.width - w) / 2;
    var t = (screen.height - h) / 2;

    winprops = 'resizable=0, height=' + h + ',width=' + w + ',top=' + t + ',left=' + l + 'w';
    if (scroll) winprops += ',scrollbars=1';
    var f = window.open(query, "_blank", winprops);
}

function setLocation(url) {
    window.location.href = url;
}



(function () {
    function async_load() {
        var s = document.createElement('script');
        s.type = 'text/javascript';
        s.async = true;
        //Modif NICO script asynchrone
        s.src = 'http://static.3dcoiffure.com/Scripts/public-async.min.js';
        var x = document.getElementsByTagName('script')[0];
        x.parentNode.insertBefore(s, x);
    } 
    if (window.attachEvent)
        window.attachEvent('onload', async_load);
    else
        window.addEventListener('load', async_load, false);
})();


/* jqFancyTransitions */ 
(function ($) { var opts = new Array; var level = new Array; var img = new Array; var links = new Array; var order = new Array; var imgInc = new Array; var inc = new Array; var stripInt = new Array; var imgInt = new Array; $.fn.jqFancyTransitions = $.fn.jqfancytransitions = function (options) { init = function (el) { opts[el.id] = $.extend({}, $.fn.jqFancyTransitions.defaults, options); img[el.id] = new Array(); links[el.id] = new Array(); order[el.id] = new Array(); imgInc[el.id] = 0; inc[el.id] = 0; params = opts[el.id]; if (params.effect == "zipper") { params.direction = "alternate"; params.position = "alternate"; } if (params.effect == "wave") { params.direction = "alternate"; params.position = "top"; } if (params.effect == "curtain") { params.direction = "alternate"; params.position = "curtain"; } stripWidth = parseInt(params.width / params.strips); gap = params.width - stripWidth * params.strips; stripLeft = 0; $.each($("#" + el.id + " img"), function (i, item) { img[el.id][i] = $(item).attr("src"); links[el.id][i] = $(item).next().attr("href"); $(item).hide(); }); $("#" + el.id).css({ "background-image": "url(" + img[el.id][0] + ")", "width": params.width, "height": params.height, "position": "relative", "background-position": "top left" }); if (params.navigation) { $.navigation(el); } odd = 1; for (j = 1; j < params.strips + 1; j++) { if (gap > 0) { tstripWidth = stripWidth + 1; gap--; } else { tstripWidth = stripWidth; } if (params.links) { $("#" + el.id).append("<a href='" + links[el.id][0] + "' class='ft-" + el.id + "' id='ft-" + el.id + j + "' style='width:" + tstripWidth + "px; height:" + params.height + "px; float: left; position: absolute;outline:none;'></a>"); } else { $("#" + el.id).append("<div class='ft-" + el.id + "' id='ft-" + el.id + j + "' style='width:" + tstripWidth + "px; height:" + params.height + "px; float: left; position: absolute;'></div>"); } $("#ft-" + el.id + j).css({ "background-position": -stripLeft + "px top", "left": stripLeft }); stripLeft += tstripWidth; if (params.position == "bottom") { $("#ft-" + el.id + j).css("bottom", 0); } if (j % 2 == 0 && params.position == "alternate") { $("#ft-" + el.id + j).css("bottom", 0); } if (params.direction == "fountain" || params.direction == "fountainAlternate") { order[el.id][j - 1] = parseInt(params.strips / 2) - (parseInt(j / 2) * odd); order[el.id][params.strips - 1] = params.strips; odd *= -1; } else { order[el.id][j - 1] = j; } } $(".ft-" + el.id).mouseover(function () { opts[el.id].pause = true; }); $(".ft-" + el.id).mouseout(function () { opts[el.id].pause = false; }); clearInterval(imgInt[el.id]); imgInt[el.id] = setInterval(function () { $.transition(el); }, params.delay + params.stripDelay * params.strips); }; $.transition = function (el, direction) { if (opts[el.id].pause == true) { return; } stripInt[el.id] = setInterval(function () { $.strips(order[el.id][inc[el.id]], el); }, opts[el.id].stripDelay); $("#" + el.id).css({ "background-image": "url(" + img[el.id][imgInc[el.id]] + ")" }); if (typeof (direction) == "undefined") { imgInc[el.id]++; } else { if (direction == "prev") { imgInc[el.id]--; } else { imgInc[el.id] = direction; } } if (imgInc[el.id] == img[el.id].length) { imgInc[el.id] = 0; } if (imgInc[el.id] == -1) { imgInc[el.id] = img[el.id].length - 1; } inc[el.id] = 0; if (opts[el.id].direction == "random") { $.fisherYates(order[el.id]); } if ((opts[el.id].direction == "right" && order[el.id][0] == 1) || opts[el.id].direction == "alternate" || opts[el.id].direction == "fountainAlternate") { order[el.id].reverse(); } }; $.strips = function (itemId, el) { temp = opts[el.id].strips; if (inc[el.id] == temp) { clearInterval(stripInt[el.id]); return; } $(".ft-" + el.id).attr("href", links[el.id][imgInc[el.id]]); if (opts[el.id].position == "curtain") { currWidth = $("#ft-" + el.id + itemId).width(); $("#ft-" + el.id + itemId).css({ width: 0, opacity: 0, "background-image": "url(" + img[el.id][imgInc[el.id]] + ")" }); $("#ft-" + el.id + itemId).animate({ width: currWidth, opacity: 1 }, 1000); } else { $("#ft-" + el.id + itemId).css({ height: 0, opacity: 0, "background-image": "url(" + img[el.id][imgInc[el.id]] + ")" }); $("#ft-" + el.id + itemId).animate({ height: opts[el.id].height, opacity: 1 }, 1000); } inc[el.id]++; }; $.navigation = function (el) { $("#" + el.id).append("<a href='#' id='ft-prev-" + el.id + "' class='ft-prev'></a>"); $("#" + el.id).append("<a href='#' id='ft-next-" + el.id + "' class='ft-next'></a>"); $("#ft-prev-" + el.id).css({ "position": "absolute", "z-index": 1001 }).click(function (e) { e.preventDefault(); $.transition(el, "prev"); clearInterval(imgInt[el.id]); imgInt[el.id] = setInterval(function () { $.transition(el); }, params.delay + params.stripDelay * params.strips); }); $("#ft-next-" + el.id).css({ "position": "absolute", "z-index": 1001 }).click(function (e) { e.preventDefault(); $.transition(el); clearInterval(imgInt[el.id]); imgInt[el.id] = setInterval(function () { $.transition(el); }, params.delay + params.stripDelay * params.strips); }); }; $.fisherYates = function (arr) { var i = arr.length; if (i == 0) { return false; } while (--i) { var j = Math.floor(Math.random() * (i + 1)); var tempi = arr[i]; var tempj = arr[j]; arr[i] = tempj; arr[j] = tempi; } }; this.each(function () { init(this); }); }; $.fn.jqFancyTransitions.defaults = { width: 500, height: 332, strips: 10, delay: 5000, stripDelay: 50, position: "alternate", direction: "fountainAlternate", effect: "", navigation: false, links: false }; })(jQuery);


/*
Watermark v3.1.3 (March 22, 2011) plugin for jQuery
http://jquery-watermark.googlecode.com/
*/
(function (a, h, y) { var w = "function", v = "password", j = "maxLength", n = "type", b = "", c = true, u = "placeholder", i = false, t = "watermark", g = t, f = "watermarkClass", q = "watermarkFocus", l = "watermarkSubmit", o = "watermarkMaxLength", e = "watermarkPassword", d = "watermarkText", k = /\r/g, s = "input:data(" + g + "),textarea:data(" + g + ")", m = "input:text,input:password,input[type=search],input:not([type]),textarea", p = ["Page_ClientValidate"], r = i, x = u in document.createElement("input"); a.watermark = a.watermark || { version: "3.1.3", runOnce: c, options: { className: t, useNative: c, hideBeforeUnload: c }, hide: function (b) { a(b).filter(s).each(function () { a.watermark._hide(a(this)) }) }, _hide: function (a, r) { var p = a[0], q = (p.value || b).replace(k, b), l = a.data(d) || b, m = a.data(o) || 0, i = a.data(f); if (l.length && q == l) { p.value = b; if (a.data(e)) if ((a.attr(n) || b) === "text") { var g = a.data(e) || [], c = a.parent() || []; if (g.length && c.length) { c[0].removeChild(a[0]); c[0].appendChild(g[0]); a = g } } if (m) { a.attr(j, m); a.removeData(o) } if (r) { a.attr("autocomplete", "off"); h.setTimeout(function () { a.select() }, 1) } } i && a.removeClass(i) }, show: function (b) { a(b).filter(s).each(function () { a.watermark._show(a(this)) }) }, _show: function (g) { var p = g[0], u = (p.value || b).replace(k, b), h = g.data(d) || b, s = g.attr(n) || b, t = g.data(f); if ((u.length == 0 || u == h) && !g.data(q)) { r = c; if (g.data(e)) if (s === v) { var m = g.data(e) || [], l = g.parent() || []; if (m.length && l.length) { l[0].removeChild(g[0]); l[0].appendChild(m[0]); g = m; g.attr(j, h.length); p = g[0] } } if (s === "text" || s === "search") { var i = g.attr(j) || 0; if (i > 0 && h.length > i) { g.data(o, i); g.attr(j, h.length) } } t && g.addClass(t); p.value = h } else a.watermark._hide(g) }, hideAll: function () { if (r) { a.watermark.hide(m); r = i } }, showAll: function () { a.watermark.show(m) } }; a.fn.watermark = a.fn.watermark || function (p, o) { var t = "string"; if (!this.length) return this; var s = i, r = typeof p === t; if (r) p = p.replace(k, b); if (typeof o === "object") { s = typeof o.className === t; o = a.extend({}, a.watermark.options, o) } else if (typeof o === t) { s = c; o = a.extend({}, a.watermark.options, { className: o }) } else o = a.watermark.options; if (typeof o.useNative !== w) o.useNative = o.useNative ? function () { return c } : function () { return i }; return this.each(function () { var B = "dragleave", A = "dragenter", z = this, i = a(z); if (!i.is(m)) return; if (i.data(g)) { if (r || s) { a.watermark._hide(i); r && i.data(d, p); s && i.data(f, o.className) } } else { if (x && o.useNative.call(z, i) && (i.attr("tagName") || b) !== "TEXTAREA") { r && i.attr(u, p); return } i.data(d, r ? p : b); i.data(f, o.className); i.data(g, 1); if ((i.attr(n) || b) === v) { var C = i.wrap("<span>").parent(), t = a(C.html().replace(/type=["']?password["']?/i, 'type="text"')); t.data(d, i.data(d)); t.data(f, i.data(f)); t.data(g, 1); t.attr(j, p.length); t.focus(function () { a.watermark._hide(t, c) }).bind(A, function () { a.watermark._hide(t) }).bind("dragend", function () { h.setTimeout(function () { t.blur() }, 1) }); i.blur(function () { a.watermark._show(i) }).bind(B, function () { a.watermark._show(i) }); t.data(e, i); i.data(e, t) } else i.focus(function () { i.data(q, 1); a.watermark._hide(i, c) }).blur(function () { i.data(q, 0); a.watermark._show(i) }).bind(A, function () { a.watermark._hide(i) }).bind(B, function () { a.watermark._show(i) }).bind("dragend", function () { h.setTimeout(function () { a.watermark._show(i) }, 1) }).bind("drop", function (e) { var c = i[0], a = e.originalEvent.dataTransfer.getData("Text"); if ((c.value || b).replace(k, b).replace(a, b) === i.data(d)) c.value = a; i.focus() }); if (z.form) { var w = z.form, y = a(w); if (!y.data(l)) { y.submit(a.watermark.hideAll); if (w.submit) { y.data(l, w.submit); w.submit = function (c, b) { return function () { var d = b.data(l); a.watermark.hideAll(); if (d.apply) d.apply(c, Array.prototype.slice.call(arguments)); else d() } } (w, y) } else { y.data(l, 1); w.submit = function (b) { return function () { a.watermark.hideAll(); delete b.submit; b.submit() } } (w) } } } } a.watermark._show(i) }) }; if (a.watermark.runOnce) { a.watermark.runOnce = i; a.extend(a.expr[":"], { data: function (c, d, b) { return !!a.data(c, b[3]) } }); (function (c) { a.fn.val = function () { var e = this; if (!e.length) return arguments.length ? e : y; if (!arguments.length) if (e.data(g)) { var f = (e[0].value || b).replace(k, b); return f === (e.data(d) || b) ? b : f } else return c.apply(e, arguments); else { c.apply(e, arguments); a.watermark.show(e); return e } } })(a.fn.val); p.length && a(function () { for (var b, c, d = p.length - 1; d >= 0; d--) { b = p[d]; c = h[b]; if (typeof c === w) h[b] = function (b) { return function () { a.watermark.hideAll(); return b.apply(null, Array.prototype.slice.call(arguments)) } } (c) } }); a(h).bind("beforeunload", function () { a.watermark.options.hideBeforeUnload && a.watermark.hideAll() }) } })(jQuery, window);
