/*
Author   : bieler batiste
Company  : doSimple : http://www.dosimple.ch
send me a mail for more informations : faden@PASDEPOURRIELaltern.org - remove ( PASDEPOURRIEL )

Short javascript function to create and handle a CSS navigation menu

Copyright (C) 2004  Bieler Batiste

This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.

This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
*/

// the timeout for the menu
var timeout = 1000;

// not very clean but simple
// the function can be run in the HTML for faster display
// window.onload=initMenu;

// creat timeout variables for list item
// it's for avoid some warning with IE
for( var i = 0; i < 100; i++ )
{
    eval("var timeoutli" + i + " = false;");
}

// this fonction apply the CSS style and the event
function initMenu()
{
    // a test to avoid some browser like IE4, Opera 6, and IE Mac
    if ( browser.isDOM1 
    && !( browser.isMac && browser.isIE ) 
    && !( browser.isOpera && browser.versionMajor < 7 )
    && !( browser.isIE && browser.versionMajor < 5 ) )
    {
        // get some element
        var menu = document.getElementById('menu'); // the root element
        var lis = menu.getElementsByTagName('li'); // all the li
        
        // change the class name of the menu, 
        // it's usefull for compatibility with old browser
        menu.className='menu';
        
        // i am searching for ul element in li element
        for ( var i=0; i<lis.length; i++ )
        {
            // is there a ul element ?
            if ( lis.item(i).getElementsByTagName('ul').length > 0 )
            {        
                // improve IE key navigation
                if ( browser.isIE )
                {
                    addAnEvent(lis.item(i),'keyup',show);
                }
                // link events to list item
                addAnEvent(lis.item(i),'mouseover',show);
                addAnEvent(lis.item(i),'mouseout',timeoutHide);
                addAnEvent(lis.item(i),'blur',timeoutHide);
                addAnEvent(lis.item(i),'focus',show);
                
                // add an id to list item
                lis.item(i).setAttribute( 'id', "li"+i );
            }
        }
    }
}

function addAnEvent( target, eventName, functionName )
{
    // apply the method to IE
    if ( browser.isIE )
    {
        //attachEvent dont work properly with this
        eval('target.on'+eventName+'=functionName');
    }
    // apply the method to DOM compliant browsers
    else
    {
        target.addEventListener( eventName , functionName , true ); // true is important for Opera7
    }
}
    
// hide the first ul element of the current element
function timeoutHide()
{
    // start the timeout
    eval( "timeout" + this.id + " = window.setTimeout('hideUlUnder( \"" + this.id + "\" )', " + timeout + " );");
}

// hide the ul elements under the element identified by id
function hideUlUnder( id )
{   
    document.getElementById(id).getElementsByTagName('ul')[0].style['visibility'] = 'hidden';
}

// show the first ul element found under this element
function show()
{
    // show the sub menu
    this.getElementsByTagName('ul')[0].style['visibility'] = 'visible';
    var currentNode=this;
    while(currentNode)
    {
            if( currentNode.nodeName=='LI')
            {
                currentNode.getElementsByTagName('a')[0].className = 'linkOver';
            }
            currentNode=currentNode.parentNode;
    }
    // clear the timeout
    eval ( "clearTimeout( timeout"+ this.id +");" );
    hideAllOthersUls( this );
}

// hide all ul on the same level of  this list item
function hideAllOthersUls( currentLi )
{
    var lis = currentLi.parentNode;
    for ( var i=0; i<lis.childNodes.length; i++ )
    {
        if ( lis.childNodes[i].nodeName=='LI' && lis.childNodes[i].id != currentLi.id )
        {
            hideUlUnderLi( lis.childNodes[i] );
        }
    }
}

// hide all the ul wich are in the li element
function hideUlUnderLi( li )
{
    var as = li.getElementsByTagName('a');
    for ( var i=0; i<as.length; i++ )
    {
        as.item(i).className="";
    }
    var uls = li.getElementsByTagName('ul');
    for ( var i=0; i<uls.length; i++ )
    {
        uls.item(i).style['visibility'] = 'hidden';
    }
} 



function interdire()
{
	if(event.button == 2)
	{
	alert('Clic droit contrôlé !');
// Entrez ci-dessus le message à afficher en cas de clic droit

	}
}
document.onmousedown=interdire;
// on crée la liste des messages relatifs aux images

message0 = new Array();
message0[0] = "Hi, it's Chouchen! Click once on my photo and I'll do a small summary of my life.";
message0[1] = "Here my mummy, Queen From Bullshappiness who  currently lives at Oude Pekela, Netherlands ...";
message0[2] = "And my daddy, Mellowmood Full Monty, who returned in January 2008 in Britain.";
message0[3] = "There, I have 2 days and I am among my brothers and sisters. One of my brothers, Moonlight, began a successful career in South Africa ! ";
message0[4] = "Aged one month, I begin to hold out on my feet 4. I also like to be photographed! !";
message0[5] = "Mom kissed often me in the begining sessions to poses ...";
message0[6] = "With Annika Kregel, my auntie and.....";
message0[7] = "Uncle Daniel Steenhuis both professors very demanding. I'm still baby, just over a month! ";
message0[8] = "After work, the comfort .... ";
message0[9] = "but also, exits in the garden ...";
message0[10] = "and games with my brothers and sisters !";
message0[11] = "Being as stubborn as a Breton, and round like a barrel full of nectar of the gods but as soft as honey, I was nicknamed Chouchen !";
message0[12] = "As soon as I arrived in my new home, Aby and Charlie taught me a lot of mischiefs.... !";
message0[13] = "And after these manifold games I really needed a nap.";
message0[14] = "Aby watched over us as if we were her eyes’ pupils.";
message0[15] = "When I was 3 months old, Charlie and I saw the ocean for the very first time, and unlike Brice we didn’t wait for the wave to come !";
message0[16] = "The South East coasts are gorgeous......";
message0[17] = "I was the most beautiful at Seignosse beach...";
message0[18] = "Hair in the wind !";
message0[19] = "At the end of July we went to Corse. It was too hot, we needed a beach umbrella.";
message0[20] = "Calvi, then Cargèse and Bonifacio. That was great!";
message0[21] = "Mid-August and that’s us coming back in the suburb. I 4 months old then!";
message0[22] = "Aby, Charlie and I soon became inseparable!";
message0[23] = "Mid-August, and that’s us in the south of Brittany in the Fouesnant forest....";
message0[24] = "The weather wasn’t always fine, but the games in the wet weed, the walks by the ocean were great!";
message0[25] = "On this photography I’m a miss. Yes sir, I’m nearly 4 months old. I was allowed to attend to the long lasting belote games.";
message0[26] = "Patricia who’s here used to illuminate these evenings. I don’t forget the beautiful Corinne who is too shy to allow me to edit her photography.";
message0[27] = "When the game lasted till late at night, Charlie and I could bear no more and we used to fell asleep";
message0[28] = "End of August, and we are coming back in the Landes. It was hard to do without the beaches which extended endlessly.....";
message0[29] = "Making holes and having my muzzle shrouded with sand was cool, beside it was sunny ....";
message0[30] = "That was rather hard without glasses...";
message0[31] = "At the beginning of September, the holidays are off and it’s time to go back to school. Well, you must be beyond reproach in static!";
message0[32] = "Here I am aged 5 months.....";
message0[33] = "And when I reached 6 months old, I was allowed to pose on the sofa!";
message0[34] = "Here, I am 10 months old. I am beautiful, aren’t I ?";
message0[35] = "11 months old already, time really went by fast. In a month, I will go through the TNA (Test of Natural Abilities) and the Assent test.!";
message0[36] = "I did it, I have passed the assessment test done by Mrs Denis in Roifée. I even passed the TNA. Wonderful xperience !";

message1 = new Array();
message1[0] = "Click once on my picture ! I was, in National breeding of Roiffé, ranked 2nd among a 30ène of competitors equally beautiful!";
message1[1] = "I'm trying for the first time the ramp exposure to Limoges 2008: lasts lasts I am not reassured at all...";
message1[2] = "but brilliant, I finished 3rd excellent on fifteen competitors.";
message1[3] = "It's my first exposure to eurodogshow Kortrijk in Belgium (December 2007)... ";
message1[4] = "I had the honor of being ranked 2nd very Promising in puppy class.";

message2 = new Array();
message2[0] = "To display a caesarian operation with an English bulldog, click once one the photography. Be careful, some pictures might shock.";
message2[1] = "The lab bench and the equipment used to liven up the puppies.";
message2[2] = "The expectant mother is put under general anaesthetic, then, under artificial respiration.";
message2[3] = "The bulldog then breathes enriched oxygen.";
message2[4] = "The dog is placed on his back.";
message2[5] = "The electrodes, that you can see on the bulldog’s left side, will allow to display the heart activity on a screen.";
message2[6] = "The veterinary assistant then practises the antiseptiae in the area where the skin incision is.";
message2[7] = "In order to practise it, she employs an antiseptic.";
message2[8] = "This operation is repeated several times...";
message2[9] = "in order to be sure that the skin is freed from any sources of infections.";
message2[10] = "The veterinary and his assistant are working together....";
message2[11] = "and they are complementary.";
message2[12] = "When the assistant veterinary finishes to take care of the expectant mother...";
message2[13] = "she helps the veterinary to wear on single use sterile clothes.";
message2[14] = "A sterile operatory area is put on the mother’s belly...";
message2[15] = "and the tray on which the tools will be is settled...";
message2[16] = "to receive the surgical sterile tools.";
message2[17] = "Pliers are used to fix the sterile area to the skin.";
message2[18] = "During that time, the assistant is putting her sterile clothes on and she is getting ready to receive the puppies.";
message2[19] = "The veterinary starts to incise the skin at the level of the abdomen.";
message2[20] = "The uterus is delicately and totally taken from the abdomen...";
message2[21] = "then, it is placed on the dog’s belly.";
message2[22] = "A little incision is practised on the uterine muscle..";
message2[23] = "The puppies and their placenta are delicately taken from...";
message2[24] = "The uterus through this way.";
message2[25] = "The puppies are freed from the annexes and from anything that might disturb their breathing.";
message2[26] = "The veterinary or his assistant is going to do a pendulum movement from top to bottom and from back and forth.";
message2[27] = "While the veterinary takes the puppies out of the uterus, the assistant takes care of those that are given to her.";
message2[28] = "Towels are employed to rub and to clean them. ";
message2[29] = "After he gave birth to the puppies... ";
message2[30] = "The veterinary works at closing the cut again....";
message2[31] = "With stitches. The threads will be taken out 15 days later.";
message2[32] = "While the happy mother, still under watch, is resuscitating,";
message2[33] = "the puppies are settled in the warm incubators.";
message2[34] = "When the mother awakens, the babies are taken from their first feeding.";

message3 = new Array();
message3[0] = "This night, Datcha left us, a victim of the disease. His joy of living, his energy and gentleness will be missed. Rest in peace. 27/12/08 - 01/06/09";
message3[1] = "c2 3";
message3[2] = "J'ai ouvert les yeux et suis curieux de tout.";
message3[3] = "Quel fatigue, haaargh! Il est temps de faire dodo ";
message3[4] = "Je fais la star devant ce paparazzi!";
message3[5] = "Et voilà, premiers jours en Corse, je découvre mon nouvel environnement";

message4 = new Array();
message4[0] = "For view a artificial insemination with an English bulldog, click once one the photography. Be careful, some pictures might shock.";
message4[1] = "La chienne est endormie à l'aide d'un anesthésique à action brève...";
message4[2] = "et cela, afin de permettre intubation de l'animal et pour le placer sous respirateur artificiel.";
message4[3] = "La chienne est préparée pour l'opération c-a-d, placée en position de décubitus dorsal, les pattes immobilisées et l'abdomen rasée. ";
message4[4] = "L'abdomen est drapé d'un champ opératoire. N'apparait que la zone où sera réalisée l'incision, à mi-chemin entre le pubis et l'ombilic. ";
message4[5] = "L'incision est faite dans la peau, la graisse sous-cutanée, le long de la linea alba.";
message4[6] = "Les cornes utérines sont identifiés et élevées à la surface, à travers l'incision.";
message4[7] = "L'insémination artificielle par voie chirurgicale permet aussi de mettre en évidence des malformations au niveau des cornes utérines.";
message4[8] = "Un cathetère est placé au niveau d'une des cornes utérines.";
message4[9] = "Le chirurgien insère l'aiguille de la seringue au niveau du cathetère.";
message4[10] = "Le sperme est injecté lentement dans l'utérus. Le sperme doit s'écouler aisément à l'intérieur des cornes de l'utérus.";
message4[11] = "L'utérus est ensuite remplacé dans l'abdomen.";
message4[12] = "La fascia, le muscle, la peau.......";
message4[13] = "ainsi que le tissu sous-cutané sont suturés.";
message4[14] = "L'arrière de la chienne peut-être surélevée car elle récupère de l'anesthésie.";
message4[15] = "La pression intra-utérine peut provoquer une légère refoulement de sperme par le col de l'utérus, vers la cavité vaginale";
message4[16] = "Si le chirurgien a un doute sur le fait que le sperme ait été placé dans la lumière de l'utérus,";
message4[17] = "Un frottis vaginal post-opératoire pourra être réalisé pour confirmer la présence de spermatozoïdes.";

var delai=7000;




function diapo1(newi1)
{
	this.newi1=newi1;

	if ( this.newi1 == 37 ) {
		this.newi1=0;
		document.images["img0"].src = "english bulldog chouchen0" + this.newi1 + ".jpg";
 		document.forms["form0"].elements["legende0"].value=message0[this.newi1];
		return;
		}
	document.images["img0"].src = "english bulldog chouchen0" + this.newi1 + ".jpg";
 	document.forms["form0"].elements["legende0"].value=message0[this.newi1];

	this.newi1= this.newi1 + 1;
	setTimeout("diapo1(this.newi1)",delai);

}


function diapo2(newi2)
{
	this.newi2=newi2;

	if ( this.newi2 == 5 ) {
		this.newi2 = 0;
        document.images["img1"].src = "english bulldog chouchen1" + this.newi2 + ".jpg";
 	document.forms["form1"].elements["legende1"].value=message1[this.newi2];
		return;

		}
        document.images["img1"].src = "english bulldog chouchen1" + this.newi2 + ".jpg";
 	document.forms["form1"].elements["legende1"].value=message1[this.newi2];
	this.newi2=this.newi2 + 1;
	setTimeout("diapo2(this.newi2)",delai);

}

function caesarean(newi3)
{
	this.newi3=newi3;

	if ( this.newi3 == 35 ) {
		this.newi3 = 0;
        	document.images["img2"].src = "caesarean section in the" + this.newi3 + " English bulldog" + ".jpg";
 		document.forms["form2"].elements["legende2"].value=message2[this.newi3];
		return;
		}
        document.images["img2"].src = "caesarean section in the" + this.newi3 + " English bulldog" + ".jpg";
 	document.forms["form2"].elements["legende2"].value=message2[this.newi3];
	this.newi3=this.newi3 + 1;
	setTimeout("caesarean(this.newi3)",delai);



}

function datcha(newi4)
{
	this.newi4=newi4;

	if ( this.newi4 == 1 ) {
		this.newi4=0;
		document.images["img4"].src = "bulldog anglais datcha0" + this.newi4 + ".jpg";
 		document.forms["form4"].elements["legende4"].value=message3[this.newi4];
		return;
		}
	document.images["img4"].src = "bulldog anglais datcha0" + this.newi4 + ".jpg";
 	document.forms["form4"].elements["legende4"].value=message3[this.newi4];

	this.newi4= this.newi4 + 1;
	setTimeout("datcha(this.newi4)",delai);

}

function expodatcha(newi5)
{
	this.newi5=newi5;

	if ( this.newi5 == 3 ) {
		this.newi5=2;
		document.images["img5"].src = "bulldog anglais datcha1" + this.newi5 + ".jpg";
 		document.forms["form5"].elements["legende5"].value=message4[this.newi5];
		return;
		}
	document.images["img5"].src = "bulldog anglais datcha1" + this.newi5 + ".jpg";
 	document.forms["form5"].elements["legende5"].value=message4[this.newi5];

	this.newi5= this.newi5 + 1;
	setTimeout("expodatcha(this.newi5)",delai);


}
function Insemination(newi6)
{
	this.newi6=newi6;

	if ( this.newi6 == 18 ) {
		this.newi6 = 1;
        	document.images["img3"].src = "Artificial insemination surgically English" + this.newi6 + " bulldog" + ".jpg";
 		document.forms["form3"].elements["legende3"].value="For view a artificial insemination with an English bulldog, click once one the photography. Be careful, some pictures might shock..";
		return;
		}
        document.images["img3"].src = "Artificial insemination surgically English" + this.newi6 + " bulldog" + ".jpg";
 	document.forms["form3"].elements["legende3"].value=message4[this.newi6];
	this.newi6=this.newi6 + 1;
	setTimeout("Insemination(this.newi6)",delai);

}

var msg="MESSAGE";
var index=0;
var delay=100

function defil() {
	// Fonction récursive pour le décalage du texte du message
//	document.forms[0].elements[0].blur();
	var nb_char=msg.length;
	index++;
	if (index>nb_char) index=0;
	document.forms[0].elements[0].value=msg.substring(index)+msg;
	setTimeout("defil()",delay);
}

function defiler(txt,tps) {
	//Cette fonction est appelée pour déclencher le défilement.
	msg=txt + "       ";
	delay=tps;
	defil();
}