/*###############################################################################
#  Copyright © 2001-2010 NissR. All Rights Reserved                             #
#  nissr@nissr.com                                                              #
#  http://www.nissr.com                                                         #
#                                                                               #
#  This script is developed and owned by NissR. Any use, any copy, any way of   #
#  modification or redistribution of this script or any part of it without the  #
#  written consent of NissR is strictly prohibited.                             #
#  You may not remove any of these header notices.                              #
###############################################################################*/
function Initme(){
	var mycookie = document.cookie;
	var myindex=-1;
	if (mycookie.length > 0) {
	    myindex = mycookie.indexOf("nissrcookie");
	}
	objecttotalnumber=10;
	distduhaut=125;
	distdugauche=10;
	i=1;
	objet="object1";
	firstvisit=1;
	if (document.all) {
		brows=2 // MSIE 4 DOM
		lex1="";
		lex2=".style.pixelTop=";
		lex2g=".style.pixelLeft=";
	} else if(document.getElementById) {
		brows=3 // W3C DOM
		lex1="document.getElementById('";
		lex2="').style.top=";
		lex2g="').style.left=";
	} else if (document.layers) {
		brows=1 // NN 4 DOM
		lex1="document.";
		lex2=".top=";
		lex2g=".left=";
	}
	if (myindex != -1) {
		firstvisit=0;
	}
}

function reInitialiser() {
	Initme();
	firstvisit=0;
}

function Initialiser(){
	Initme();
	if (firstvisit==1) {
		var today = new Date();
		var expiry = new Date(today.getTime() + 3600000); // plus 1 hour
		document.cookie="nissrcookie=menudone; PATH=/; EXPIRES=" + expiry.toGMTString();
		maxdugauche=450;
		harrive=0;
		garrive=0;
		vstep=60;
		hstep=50;
		x=0;
		y=-60;
	}
}
function AnimerMenu() {
	if (firstvisit==0) {
		normalmenu();
		return;
	}
	if (i<objecttotalnumber ) {
		y+=vstep;
		if (y < distduhaut){
			eval(lex1 + objet + lex2 + y);
		}
		else {
			harrive=1;
		}
		x += hstep;
		if (x < distdugauche){
			garrive=1;
		}
		else {
			if (x > maxdugauche) hstep= -hstep;
			eval(lex1 + objet + lex2g + x);			
		}
		if ((garrive==1) && (harrive==1)) {
			eval(lex1 + objet + lex2 + distduhaut);
			eval(lex1 + objet + lex2g + distdugauche);
			harrive=0;
			garrive=0;
			hstep=90;
			x=0;
			y=-60;
			distduhaut+=33;
			i++;
			objet="object"+i;
		}
		setTimeout("AnimerMenu()",40);
	}
}

function normalmenu() {
	if (i<objecttotalnumber ) {
		eval(lex1 + objet + lex2 + distduhaut);
		eval(lex1 + objet + lex2g + distdugauche);
		distduhaut+=33;
		i++;
		objet="object"+i;
	}
	setTimeout("normalmenu()",0);
}


/*###############################################################################
#  Copyright © 2001-2010 NissR. All Rights Reserved                             #
#  nissr@nissr.com                                                              #
#  http://www.nissr.com                                                         #
#                                                                               #
#  This script is developed and owned by NissR. Any use, any copy, any way of   #
#  modification or redistribution of this script or any part of it without the  #
#  written consent of NissR is strictly prohibited.                             #
#  You may not remove any of these header notices.                              #
###############################################################################*/

