// INITIALIZATION FADED DIVS
		// animatedcollapse.addDiv('footer', 'fade=0')
		// animatedcollapse.addDiv('logo', 'fade=0')
		// animatedcollapse.addDiv('cercle_start', 'fade=0')
		// animatedcollapse.addDiv('left_menu', 'fade=0')
		// animatedcollapse.addDiv('left_music_container', 'fade=0')
		// animatedcollapse.addDiv('left_photos_container', 'fade=0')
		// animatedcollapse.addDiv('embed', 'fade=1')
		//animatedcollapse.ontoggle=function($, divobj, state){ 
		//fires each time a DIV is expanded/contracted
			//$: Access to jQuery
			//divobj: DOM reference to DIV being expanded/ collapsed. Use "divobj.id" to get its ID
			//state: "block" or "none", depending on state
		//		}
		
		//animatedcollapse.init()
		
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////
//LOAD IMAGES
function precharger_image(url)
{
        var img = new Image();
    img.src=url;
        return img;
}
/////////////////////////////////////
//FADE IN & OUT EFFECT 
var TimeToFade = 1000.0;

function fade(eid)
{
  var element = document.getElementById(eid);
  if(element == null)
    return;
   
  if(element.FadeState == null)
  {
    if(element.style.opacity == null
        || element.style.opacity == ''
        || element.style.opacity == '1')
    {
      element.FadeState = 2;
    }
    else
    {
      element.FadeState = -2;
    }
  }
   
  if(element.FadeState == 1 || element.FadeState == -1)
  {
    element.FadeState = element.FadeState == 1 ? -1 : 1;
    element.FadeTimeLeft = TimeToFade - element.FadeTimeLeft;
  }
  else
  {
    element.FadeState = element.FadeState == 2 ? -1 : 1;
    element.FadeTimeLeft = TimeToFade;
    setTimeout("animateFade(" + new Date().getTime() + ",'" + eid + "')", 33);
  }  
}

function animateFade(lastTick, eid)
{  
  var curTick = new Date().getTime();
  var elapsedTicks = curTick - lastTick;
 
  var element = document.getElementById(eid);
 
  if(element.FadeTimeLeft <= elapsedTicks)
  {
    element.style.opacity = element.FadeState == 1 ? '1' : '0';
    element.style.filter = 'alpha(opacity = '
        + (element.FadeState == 1 ? '100' : '0') + ')';
    element.FadeState = element.FadeState == 1 ? 2 : -2;
    return;
  }
 
  element.FadeTimeLeft -= elapsedTicks;
  var newOpVal = element.FadeTimeLeft/TimeToFade;
  if(element.FadeState == 1)
    newOpVal = 1 - newOpVal;

  element.style.opacity = newOpVal;
  element.style.filter = 'alpha(opacity = ' + (newOpVal*100) + ')';
 
  setTimeout("animateFade(" + curTick + ",'" + eid + "')", 33);
}
////////////////////////////////////



function home_in()
{
fade('bgd');
comp=(setTimeout('home_in_2()',800));
}
	function home_in_2()
	{
    //document.getElementById('bgd').style.display = 'none';
	fade('bgd_logo');
	comp=(setTimeout('home_in_3()',800));
	}
	function home_in_3()
	{
	fade('lang');
	}	

function submenu_collections(){
fade('smenu1');fade('smenu2');
if ( document.getElementById('smenu3').style.opacity == 1){submenu_accessoires()}
//if ( document.getElementById('smenu5').style.opacity == 1){submenu_experimentations()}
if ( document.getElementById('smenu7').style.opacity == 1){submenu_about()}
//comp=(setTimeout('close_submenu_collections()',8000));
}
function submenu_accessoires(){
fade('smenu3');fade('smenu4');
if ( document.getElementById('smenu1').style.opacity == 1){submenu_collections()}
//if ( document.getElementById('smenu5').style.opacity == 1){submenu_experimentations()}
if ( document.getElementById('smenu7').style.opacity == 1){submenu_about()}
//comp=(setTimeout('close_submenu_collections()',8000));
}

function submenu_experimentations(){
fade('smenu5');fade('smenu6');
if ( document.getElementById('smenu1').style.opacity == 1){submenu_collections()}
if ( document.getElementById('smenu3').style.opacity == 1){submenu_accessoires()}
if ( document.getElementById('smenu7').style.opacity == 1){submenu_about()}
}

function submenu_about(){
fade('smenu7');
if ( document.getElementById('smenu1').style.opacity == 1){submenu_collections()}
//if ( document.getElementById('smenu5').style.opacity == 1){submenu_experimentations()}
if ( document.getElementById('smenu3').style.opacity == 1){submenu_accessoires()}
}
//////////////////////////////////////:

function fade_news_image(){
fade('main_news');

comp=(setTimeout('fade_news_image_2()',100));
}
function fade_news_image_2(){
fade('news_1');
comp=(setTimeout('fade_news_image_3()',100));
}
function fade_news_image_3(){
fade('news_2');
comp=(setTimeout('fade_news_image_4()',100));
}
function fade_news_image_4(){
fade('news_3');
}

function fading_gallery(){
fade('pg_container');
fade('table_projet');
fade('wall_static');
//fade('wall');fade('wall_static');
}


function main_news_display(){
fade('main_news');
//fade('main_news_color');
fade('main_news_title');
document.getElementById('transition_bgd_main').style.backgroundImage = 'url(http://www.coppeliapique.com/beta/rsc/img/thumb/thumb_color.jpg)';
}

function main_news_display_off(){
fade('main_news');fade('main_news_color');fade('main_news_title');
document.getElementById('transition_bgd_main').style.backgroundImage = 'url(http://www.coppeliapique.com/beta/rsc/img/thumb/thumb_color.jpg)';
}


function news_1_display(){
fade('news_1');
fade('news_1_title');
document.getElementById('transition_bgd').style.backgroundImage = 'url(http://www.coppeliapique.com/beta/rsc/img/thumb/miniThumb_color.jpg)';
}

function news_1_display_off(){
fade('news_1');
document.getElementById('transition_bgd').style.backgroundImage = 'url("http://www.coppeliapique.com/beta/rsc/img/thumb/miniThumb_color.jpg")';
fade('news_1_title');
}

function news_2_display(){
fade('news_2');
fade('news_2_title');
document.getElementById('transition_bgd_2').style.backgroundImage = 'url(http://www.coppeliapique.com/beta/rsc/img/thumb/miniThumb_color_.jpg)';
}

function news_2_display_off(){
fade('news_2');
fade('news_2_title');
document.getElementById('transition_bgd_2').style.backgroundImage = 'url(http://www.coppeliapique.com/beta/rsc/img/thumb/miniThumb_color_.jpg)';
}

function news_3_display(){
fade('news_3');
fade('news_3_title');
document.getElementById('transition_bgd_3').style.backgroundImage = 'url(http://www.coppeliapique.com/beta/rsc/img/thumb/lastMiniThumb_color.jpg)';
}

function news_3_display_off(){
fade('news_3');fade('news_3_color');
fade('news_3_title');
document.getElementById('transition_bgd_3').style.backgroundImage = 'url(http://www.coppeliapique.com/beta/rsc/img/thumb/lastMiniThumb_color.jpg)';
}

function fullscreen(){
document.getElementById('header').style.display='none';
document.getElementById('footer').style.display='none';
document.getElementById('wall').style.paddingTop='0px';
	var i=0;
	for (i=1;i<=27;i++)
	{
		document.getElementById(i).style.height='525px';
	}	
document.getElementById('description').style.top='525px';
document.getElementById('pg_photos').style.height='800px';
}

function back_from_fullscreen(){
document.getElementById('header').style.display='block';
document.getElementById('footer').style.display='block';
document.getElementById('wall').style.paddingTop='40px';
document.getElementById('01').style.height='420px';
}


    function utf8_encode ( string ) {  
        // Encodes an ISO-8859-1 string to UTF-8    
        //   
        // version: 812.316  
        // discuss at: http://phpjs.org/functions/utf8_encode  
        // +   original by: Webtoolkit.info (http://www.webtoolkit.info/)  
        // +   improved by: Kevin van Zonneveld (http://kevin.vanzonneveld.net)  
        // +   improved by: sowberry  
        // +    tweaked by: Jack  
        // +   bugfixed by: Onno Marsman  
        // +   improved by: Yves Sucaet  
        // +   bugfixed by: Onno Marsman  
        // *     example 1: utf8_encode('Tom van Mikes');  
        // *     returns 1: 'Tom van Mikes'  
        string = (string+'').replace(/\r\n/g, "\n").replace(/\r/g, "\n");  
      
        var utftext = "";  
        var start, end;  
        var stringl = 0;  
      
        start = end = 0;  
        stringl = string.length;  
        for (var n = 0; n < stringl; n++) {  
            var c1 = string.charCodeAt(n);  
            var enc = null;  
      
            if (c1 < 128) {  
                end++;  
            } else if((c1 > 127) && (c1 < 2048)) {  
                enc = String.fromCharCode((c1 >> 6) | 192) + String.fromCharCode((c1 & 63) | 128);  
            } else {  
                enc = String.fromCharCode((c1 >> 12) | 224) + String.fromCharCode(((c1 >> 6) & 63) | 128) + String.fromCharCode((c1 & 63) | 128);  
            }  
            if (enc != null) {  
                if (end > start) {  
                    utftext += string.substring(start, end);  
                }  
                utftext += enc;  
                start = end = n+1;  
            }  
        }  
      
        if (end > start) {  
            utftext += string.substring(start, string.length);  
        }  
      
        return utftext;  
    }  




function display_info(a){
var a;
var x;
if (a == 1){x = "<i>SIAMOI<br>Ref M1 HC07 Kimono &agrave; larges pans, soie, brocard de soie, jacquard de soie Sur-mesure uniquement</i>"; }
if (a == 2){x = "<i>ANIMALS<br>Ref FD1 foulard en duvet de cygne<br>Ref MA 1 coiffe-masque << chat >> plumes d'h&eacuterons et cheveux</i>"; }
if (a == 3){x = "<i>ANIMALS<br>Ref CTR 10 bol&eacutero en cr&ecirc;pe et mousseline de soie pliss&eacutee<br>Coloris disponible :  bleu nuit et noir<br>Ref CH10 Chapeau melon en plume d'h&eacuteron rebrod&eacute de perles</i>";}
if (a == 4){x = "<i>L'ENVOL<br>Ref C1 HC07 corset rebrod&eacute de perles de jais et d'argent, plumes, tresses de cheveux, sur mesure uniquement<br>Ref CH3 C07 chapeau recouvert de plume assorti</i>"; }
if (a == 5){x = "<i>DAME DE COEUR<br>Ref C2 HC07 Corset de soie, dentelle Chantilly incrust&eacutee, broderies, sur mesure uniquement</i>";}
if (a == 6){x = "<i>OISEAU DE NUIT<br>Ref CH1 C07 chapeau haut de forme g&eacuteant, soie, moire , broderies, horloge</i>";}
if (a == 7){x = "<i>OISEAU DE NUIT<br>Ref V1 C07 robe-veste en moire et jacquard de soie, pan en mousseline de soie, coloris disponibles: noir, blanc, bleu nuit, gris anthracite<br>Ref B1 C07 longs sautoirs en macram&eacute et chapelets, horloge 19?me si?cle, plumes, m&eacutedailles<br>Ref A4 C07 longue &eacutetole rebrod&eacutee d'horloge du 19?me si?cle<br>Ref A5 C07 peigne recouvert de tulle de soie rebrod&eacute</i>";}
if (a == 8){x = "<i>OISEAU DE NUIT<br>Ref CH1 C07 chapeau haut de forme g&eacuteant, soie, moire , broderies, horloge<br>Ref v1 C07 robe-veste assortie en moire et jacquard de soie, pan en mousseline de soie<br>Coloris disponible : noir, blanc, bleu nuit, gris anthracite</i>";}
if (a == 9){x = "<i>LE TAMBOUR &nbsp;Ref C3 HC07corset <<tutu>> en jacquard de soie, rebrod&eacute<br>Ref J1HC07 jupe <<tutu>> &agrave; crinoline de grande ampleur, satin duchesse, organza de soie, pocard moir&eacute, dor&eacute &agrave; la main, rouille r&eacutealis&eacutee par le peintre Ax?lle Kriloff, sur mesure uniquement </i>";}
if (a == 10){x = "<i>SOLDAT DE PLOMB &nbsp;Ref V2 HC07 veste satin&eacutee, organzas de soie, boutons de nacre<br>Ref S1 C07 short assorti &agrave; gros revers<br>Ref CH2 HC07 casquette en galucha, soie moir&eacutee, plumes, fleur, broderies, coloris disponibles: noir satin&eacute, noir mat, chocolat, blanc, gris anthracite</i>";}
if (a == 11){x = "<i>SOLDAT DE PLOMB<br>Ref V2 HC07 veste satin&eacutee organzas de soie, boutons de nacre<br>Ref S1 C07 short assorti &agrave; gros revers<br>Ref CH2 HC07 casquette en galucha, soie moir&eacutee, plumes, fleur, broderies, coloris disponibles: noir satin&eacute, noir mat, chocolat, blanc, gris anthracite</i>";}
if (a == 12){x = "<i>SIAMOI<br>Ref B1 C07 long sautoir en macram&eacute, horloge 19?me si?cle, plumes, m&eacutedailles<br>Bottes asym&eacutetriques recouverte de plumes<br>Vicente Rey</i>"; }
if (a == 13){x = "<i>SIAMOI<br>Ref M1 HC07 Kimono &agrave; larges pans, soie, brocard de soie, jacquard de soie, sur-mesure uniquement<br>Ref A1 C07 Ceinture Obi en laiton oxid&eacute, noeud en m&eacutetal g&eacuteant, coloris disponibles: bronze, argent, dor&eacute, cuivr&eacute<br>OISEAU DE NUIT<br>Ref V1 C07 robe-veste en moire et jacquard de soie, pan en mousseline de soie, coloris disponibles: noir, blanc, bleu nuit, gris anthracite</i>";}
if (a == 14){x = "<i>SIAMOI<br>Ref M1 HC07 Kimono &agrave; larges pans, soie,<br>brocard de soie, jacquard de soie<br> Sur-mesure uniquement<br>Ref A1 C07 Ceinture Obi en laiton oxid&eacute, noeud en m&eacutetal g&eacuteant, coloris disponibles: bronze, argent, dor&eacute, cuivr&eacute<br>Bottes en tartan Vicente Rey</i>";}
if (a == 15){x = "<i>SIAMOI<br>Ref M1 HC07 Kimono &agrave; larges pans, soie,<br>brocard de soie, jacquard de soie<br> Sur-mesure uniquement<br>Ref A1 C07 Ceinture Obi en laiton oxid&eacute, noeud en m&eacutetal g&eacuteant, coloris disponibles: bronze, argent, dor&eacute, cuivr&eacute<br>Bottes en tartan Vicente Rey</i>";}
if (a == 16){x = "<i>DAME DE COEUR<br>Ref C2 HC07 Cordet de soie, dentelle Chantilly incrust&eacutee, broderies<br> Sur-mesure uniquement</i>"; }
if (a == 17){x = "<i>DION&EacuteE<br>Ref A9 C07 sac carnivore en serpent et anguille, boucles en bronze, motifs incrust&eacutes en feuille d'or<br> coloris disponibles: blanc, noir, rouge vermillon</i>";}
if (a == 18){x = "<i>INNOCENCE<br>Ref V2 C07 robe-veste &agrave; larges pans, coton de soie, lam&eacutes aux fils d'argent, organza de soie, cuir<br> Coloris au choix: blanc, noir, rouge vermillon<br>Ref A6 C07 noeud en m&eacutetal g&eacuteant coloris au choix: argent, dor&eacute, noir, blanc, bleu, rouge, cuivr&eacute, bronze<br>Ref A7 C07 pochette en brocard de soie, doublure soie, poches int&eacuterieures et miroir int&eacutegr&eacute<br> coloris disponibles: blanc nacr&eacute/motifs argent, noir/motifs vieil or</i>";}
if (a == 19){x = "<i>DAME DE COEUR<br>Ref L1 HC07 combin&eacute en dentelle de Calais et dentelle Chantilly<br> coloris disponibles: noir, blanc cass&eacute, rose p&acirc;le<br>Ref A2 C07 Serre-t&ecirc;te souple en dentelle et soie rebrod&eacutees de perles de jais<br>Ref A3 C07 mantille asym&eacutetrique rebrod&eacutee de perles de jais</i>";}
if (a == 20){x = "<i>DAME DE COEUR<br>Ref L1 HC07 combin&eacute en dentelle de Calais et dentelle Chantilly<br> coloris disponibles: noir, blanc cass&eacute, rose p&acirc;le<br>Ref A2 C07 Serre-t&ecirc;te souple en dentelle et soie rebrod&eacutees de perles de jais<br>Ref A3 C07 mantille asym&eacutetrique rebrod&eacutee de perles de jais<br>Mules en dentelle Chantilly Vicente Rey</i>";}
if (a == 21){x = "<i>INNOCENCE<br>Ref V2 C07 robe-veste &agrave; larges pans, coton de soie, lam&eacutes aux fils d'argent, organza de soie, cuir<br> Coloris au choix: blanc, noir, rouge vermillon"; }
if (a == 22){x = "<i>OBI<br>Ref A1 C07 <br>Ceinture en laiton oxid&eacute, noeud en m&eacutetal g&eacuteant<br> Coloris disponibles: bronze, argent, dor&eacute, cuivr&eacute</i>";}
if (a == 23){x = "<i>INNOCENCE<br>Ref V2 C07 robe-veste &agrave; larges pans, coton de soie, lam&eacutes aux fils d'argent, organza de soie, cuir<br> Coloris au choix: blanc, noir, rouge vermillon";}
if (a == 24){x = "<i>INNOCENCE<br>Ref V2 C07 robe-veste &agrave; larges pans, coton de soie, lam&eacutes aux fils d'argent, organza de soie, cuir<br> Coloris au choix: blanc, noir, rouge vermillon";}
if (a == 25){x = "<i>INNOCENCE<br>Ref V2 C07 robe-veste &agrave; larges pans, coton de soie, lam&eacutes aux fils d'argent, organza de soie, cuir<br> Coloris au choix: blanc, noir, rouge vermillon";}
if (a == 26){x = "<i>ENFANCE<br>Ref V3 C07 robe-veste en moire et jacquard de soie, boutons de nacres<br> coloris disponibles: noir, blanc, rouge vermillon, gris anthracite";}
if (a == 27){x = "<i>ENFANCE<br>Ref V3 C07 robe-veste en moire et jacquard de soie, boutons de nacres<br> coloris disponibles: noir, blanc, rouge vermillon, gris anthracite<br>Ref CH3 C07 Chapeau recouvert de plume assorti</i>";}

document.getElementById('gallery_info').innerHTML = utf8_encode(x) ; 
}

function display_info_presse(a){
var a;
var x;
if (a == 1){x = "TEEN VOGUE"; }
if (a == 2){x = "TEEN VOGUE"; }
if (a == 3){x = "TEEN VOGUE";}
if (a == 4){x = "TEEN VOGUE"; }
if (a == 5){x = "TEEN VOGUE";}
if (a == 6){x = "TEEN VOGUE";}
if (a == 7){x = "ELEGY EDITO";}
if (a == 8){x = "ELEGY EDITO";}
if (a == 9){x = "ELEGY EDITO";}
if (a == 10){x = "DÉCLIC PHOTO MAGAZINE";}
if (a == 11){x = "DÉCLIC PHOTO MAGAZINE";}
if (a == 12){x = "DÉCLIC PHOTO MAGAZINE"; }
if (a == 13){x = "C- HEADS MAGAZINE";}
if (a == 14){x = "C- HEADS MAGAZINE";}
if (a == 15){x = "C- HEADS MAGAZINE";}
if (a == 16){x = "C- HEADS MAGAZINE"; }
if (a == 17){x = "C- HEADS MAGAZINE";}
if (a == 18){x = "SAMOURAÏ FLOWER<br>PASCAL OBISPO";}
if (a == 19){x = "SAMOURAÏ FLOWER<br>PASCAL OBISPO";}
if (a == 20){x = "SAMOURAÏ FLOWER<br>PASCAL OBISPO";}
if (a == 21){x = "SAMOURAÏ FLOWER<br>PASCAL OBISPO";}
if (a == 22){x = "FASHION IS DEAD MAGAZINE";}
if (a == 23){x = "FASHION IS DEAD MAGAZINE";}
if (a == 24){x = "FASHION IS DEAD MAGAZINE";}
if (a == 25){x = "FASHION IS DEAD MAGAZINE";}
if (a == 26){x = "FASHION IS DEAD MAGAZINE";}
if (a == 27){x = "NUANCE MAGAZINE";}
if (a == 28){x = "NUANCE MAGAZINE";}
if (a == 29){x = "NUANCE MAGAZINE";}
if (a == 30){x = "NUANCE MAGAZINE";}
if (a == 31){x = "NUANCE MAGAZINE";}
if (a == 32){x = "NUANCE MAGAZINE";}
if (a == 33){x = "NUANCE MAGAZINE";}
if (a == 34){x = "NUANCE MAGAZINE";}

document.getElementById('gallery_info').innerHTML = utf8_encode(x) ; 
}


function set_onmouseevent(j){
	var i=0;
	for (i=1;i<=j;i++)
	{
		document.getElementById(i).style.opacity='0.6';
		document.getElementById(i).style.filter = 'alpha(opacity=60)';
		document.getElementById(i).onmouseover= function(){
		this.style.opacity= '1'; 
		this.style.filter = 'alpha(opacity=100)';
		}
		document.getElementById(i).onmouseout= function(){
		this.style.opacity= '0.6'; 
		this.style.filter = 'alpha(opacity=60)';
		}
	}	
}

function focus_opacity(b,j){
var b ;
	var i=0;
	for (i=1;i<=j;i++)
	{
		document.getElementById(i).style.opacity='0.6';
		document.getElementById(i).style.filter = 'alpha(opacity=60)';
		document.getElementById(i).onmouseover= function(){
		this.style.opacity= '1'; 
		this.style.filter = 'alpha(opacity=100)';
		}
		document.getElementById(i).onmouseout= function(){
		this.style.opacity= '0.6'; 
		this.style.filter = 'alpha(opacity=60)';
		}
	}	
document.getElementById(b).style.opacity = '1' ; 
document.getElementById(b).style.filter = 'alpha(opacity=100)';
document.getElementById(b).onmouseover= null;
document.getElementById(b).onmouseout= null;
}


function play_slider(){
var a ;
var b ; 
a = 1 ;
var fileName ;
var extractValue ;
fileName = document.location.href;
extractValue = fileName.split("#");

if (extractValue[1]){
a = extractValue[1];
}


if (play_slider.opt){
document.getElementById(a).click() ;
comp=(setTimeout('next_img(' + a + ')',4000));
}
}

function next_img(a){
var a ;
var b ;  
b = a + 1 ;
	if ((b < 27) && (play_slider.opt)){
	document.getElementById(b).click() ;
	comp=(setTimeout('next_img_(' + b + ')',4000));
	}
	else{
	play_slider();
	}
}

function next_img_(b){
var a ;
var b ;  
a = b + 1 ;
if (play_slider.opt){
document.getElementById(a).click() ;
comp=(setTimeout('next_img(' + a + ')',4000));
}
	else{
	comp = clearTimeout(comp);
	}
}

function pause_slider(){

}

function focus_onstart(){
var fileName ;
var extractValue ;
fileName = document.location.href;
extractValue = fileName.split("#");

if (extractValue[1]){
document.getElementById(extractValue[1]).click() ;
}
}

