/***************************************************\
Javascripts for Yzarcoaz
\***************************************************/

// Definition of variables

var h = new Array();
var hpic = new Image();
var comment = new Array();
var select = new Image();
select.src = "gfx/bt_accueil_clk.gif";
s_img = "accueil";
s_num = "2";

// array of images (menu)

h[0] = new Image();
	h[0].src = "gfx/bt_accueil_off.gif";
	comment[0] = "";
h[1] = new Image();
	h[1].src = "gfx/bt_accueil_on.gif";
	comment[1] = "Accueil de la principauté d'Yzarcoaz";
h[2] = new Image();
	h[2].src = "gfx/bt_accueil_clk.gif";
	comment[2] = "";
h[3] = new Image();
	h[3].src = "gfx/bt_histoire_off.gif";
	comment[3] = "";
h[4] = new Image();
	h[4].src = "gfx/bt_histoire_on.gif";
	comment[4] = "Découvrez l'histoire de la principauté d'Yzarcoaz";
h[5] = new Image();
	h[5].src = "gfx/bt_histoire_clk.gif";
	comment[5] = "";
h[6] = new Image();
	h[6].src = "gfx/bt_citoyen_off.gif";
	comment[6] = "";
h[7] = new Image();
	h[7].src = "gfx/bt_citoyen_on.gif";
	comment[7] = "Vous êtes citoyen ou souhaitez le devenir";
h[8] = new Image();
	h[8].src = "gfx/bt_citoyen_clk.gif";
	comment[8] = "";
h[9] = new Image();
	h[9].src = "gfx/bt_politic_off.gif";
	comment[9] = "";
h[10] = new Image();
	h[10].src = "gfx/bt_politic_on.gif";
	comment[10] = "La politique de la principauté";
h[11] = new Image();
	h[11].src = "gfx/bt_politic_clk.gif";
	comment[11] = "";
h[12] = new Image();
	h[12].src = "gfx/bt_bourse_off.gif";
	comment[12] = "";
h[13] = new Image();
	h[13].src = "gfx/bt_bourse_on.gif";
	comment[13] = "Investissez à la bourse";
h[14] = new Image();
	h[14].src = "gfx/bt_bourse_clk.gif";
	comment[14] = "";
h[15] = new Image();
	h[15].src = "gfx/bt_chat_off.gif";
	comment[15] = "";
h[16] = new Image();
	h[16].src = "gfx/bt_chat_on.gif";
	comment[16] = "Discutez en direct avec les Yzarcoaziens";
h[17] = new Image();
	h[17].src = "gfx/bt_chat_clk.gif";
	comment[17] = "";
	
// roll function
function roll(img,num) {
	hpic = eval(document.images[img]);
	select = eval(document.images[s_img]);
	if (hpic.src != select.src) {
		hpic.src = h[num].src;
	}
	window.status = comment[num];
}

// click function
function clk(img,num) {
	if (img != s_img) {
		reset();
		roll(img,num);
		s_img = img;
		s_num = num;
	}
}

// reset function
function reset() {
	document.images['accueil'].src = h[0].src;
	document.images['histoire'].src = h[3].src;
	document.images['citoyen'].src = h[6].src;
	document.images['politic'].src = h[9].src;
	document.images['bourse'].src = h[12].src;
	document.images['chat'].src = h[15].src;
}

function nopub(){
}