ï»¿// Mise en version FranÃ§aise par Draeli Ys Hibernia et Zeta Archer 50 Ys Hibernia
// Contacte : draeli@draeli.com
// Site : www.draeli.com
// Merci de ne pas virer ces commentaires par reconnaissance pour le travail effectuÃ©

function doReset()
{
window.document.form1.g1effect.selectedIndex = 6;
window.document.form1.g2effect.selectedIndex = 6;
window.document.form1.g3effect.selectedIndex = 6;
window.document.form1.g4effect.selectedIndex = 6;
reCalc();
}

function reCalc(elementUsed)
{
var arrOptions = new Array('+ Statistique', '+ RÃ©sistance', '+ points de Vie', '+ Mana', '+ Focus', '+ CompÃ©tence', 'Pas utilisÃ©');
var arrSkills = new Array (1,	2,	3,	4,	5,	6,	7,	8, 9, 10);
var arrSkillsUsedAlb = new Array('AltÃ©ration', 'Chants', 'Attaque sournoise', 'ArbalÃ¨tes', 'Contondant', 'Servant Mort', 'Visio Mortis', 'Deux armes', 'Terre','BÃ©nÃ©dictions', 'Empoisonner', 'Flexible', 'Feu', 'Soins', 'Glace', 'Instruments', 'Arc Long', 'Manipulation', 'Mind Twisting', 'Painworking', 'Parade', 'Haste', 'Bouclier', 'Tranchant', 'ColÃ¨re divine', 'Soulrending', 'Simulacre', 'BÃ¢ton', 'FurtivitÃ©', 'Estoc', 'Armes Ã  deux mains', 'Air');
var arrSkillsAlbName = new Array('Glyphe d\'Ã©vocation brÃ»lant', 'Glyphe de ferveur terrestre', 'Joyau de Guerre brÃ»lant', 'Glyphe de Guerre Vaporeuse', 'Glyphe de Guerre incandescent', 'Glyphe de ferveur ashen', 'Glyphe de ferveur vacuous ', 'Glyphe de Guerre glacÃ©e', 'Glyphe d\'Ã©vocation Terrestre  ', 'Glyphe de ferveur AÃ©rÃ©e', 'Joyau de Bataille PoussiÃ©reux', 'Glyphe de Guerre molten magma', 'Glyphe d\'Ã©vocation Incandescente', 'Glyphe de ferveur Acqueuse', 'Glyphe d\'Ã©vocation glacÃ©e  ', 'Glyphe de ferveur Vaporeuse', 'Glyphe de Guerre AÃ©rÃ©e', 'Glyphe d\'Ã©vocation PoussiÃ©reuse', 'Glyphe d\'Ã©vocation Acqueuse', 'Glyphe de ferveur incrustÃ©e de sel', 'Joyau de Bataille Vaporeux', 'Glyphe de Guerre Terrestre', 'Joyau de Bataille Incandescent', 'Glyphe de Guerre Acqueuse', 'Glyphe de ferveur Incandescente', 'Glyphe de ferveur Vaporeuse', 'Glyphe d\'Ã©vocation Vaporeuse', 'Joyau de Bataille Terrestre',  'Joyau de Bataille AÃ©rÃ©', 'Glyphe de Guerre poussiÃ©reuse', 'Glyphe de Guerre brÃ»lante', 'Glyphe d\'Ã©vocation AÃ©rÃ©e');
var arrSkillsAlbMat1  = new Array(	'Cristal des cavernes en poudre',  
					'Os de mort vivant en poudre bÃ©ni', 
					'Terre sanglante de champs de bataille', 
					'Pierre de Caern en poudre', 
					'Os de mort vivant en poudre bÃ©ni', 
					'Os de mort vivant en poudre bÃ©ni',
					'Os de mort vivant en poudre bÃ©ni',
					'Pierre de Caern en poudre', 
					'Cristal des cavernes en poudre', 
					'Os de mort vivant en poudre bÃ©ni', 
					'Terre sanglante de champs de bataille', 
					'Pierre de Caern en poudre',
					'Cristal des cavernes en poudre', 
					'Os de mort vivant en poudre bÃ©ni', 
					'Cristal des cavernes en poudre', 
					'Os de mort vivant en poudre bÃ©ni', 
					'Pierre de Caern en poudre', 
					'Cristal des cavernes en poudre', 
					'Cristal des cavernes en poudre', 
					'Os de mort vivant en poudre bÃ©ni',
					'Terre sanglante de champs de bataille', 
					'Pierre de Caern en poudre', 
					'Terre sanglante de champs de bataille', 
					'Pierre de Caern en poudre', 
					'Os de mort vivant en poudre bÃ©ni', 
					'Os de mort vivant en poudre bÃ©ni',
					'Cristal des cavernes en poudre', 
					'Terre sanglante de champs de bataille', 
					'Terre sanglante de champs de bataille', 
					'Pierre de Caern en poudre', 
					'Pierre de Caern en poudre', 
					'Cristal des cavernes en poudre'); 
var arrSkillsAlbMat2  = new Array('Chaleur d\'un bÃ»cher d\'outre monde', 
					'Sang de fÃ©e', 
					'Chaleur d\'un bÃ»cher d\'outre monde', 
					'Brume de marais', 
					'Feu draconique', 
					'Cendre de mort et eau bÃ©nite',
					'Brume de marais',
					'Givre de terre dÃ©solÃ©e', 
					'Sang de fÃ©e', 
					'Essence d\'Ã©lÃ©mental d\'air', 
					'Cendre de mort et eau bÃ©nite', 
					'Sang de lÃ©viathan',
					'Feu draconique', 
					'Sang de lÃ©viathan', 
					'Givre de terre dÃ©solÃ©e', 
					'Brume de marais', 
					'Essence d\'Ã©lÃ©mental d\'air', 
					'Cendre de mort et eau bÃ©nite', 
					'Sang de lÃ©viathan', 
					'Cendre de mort et eau bÃ©nite',
					'Brume de marais', 
					'Sang de fÃ©e', 
					'Feu draconique', 
					'Sang de lÃ©viathan', 
					'Feu draconique', 
					'Chaleur d\'un bÃ»cher d\'outre monde',
					'Brume de marais', 
					'Sang de fÃ©e', 
					'Essence d\'Ã©lÃ©mental d\'air', 
					'Cendre de mort et eau bÃ©nite', 
					'Chaleur d\'un bÃ»cher d\'outre monde',
					'Essence d\'Ã©lÃ©mental d\'air' ); 



var arrSkillsUsedMid = new Array('AmÃ©lioration', 'Hache', 'Chants de bataille', 'Lien animal', 'ArmÃ©e Squelettique', 'Arc Composite', 'Attaque sournoise', 'SortilÃ¨ge', 'TÃ©nÃ¨bres', 'Empoisonner', 'Marteau', 'Contact', 'MalÃ©fice', 'Hache sÃ©nestre', 'Reconstitution', 'VolontÃ© d\'Odin', 'Parade', 'Rune d\'Odin', 'Bouclier', 'Lance', 'FurtivitÃ©', 'Ire de Thor', 'Magie Abyssale', 'Invocation', 'Affaiblissement', 'EpÃ©e', 'Toute mÃ©lÃ©e', 'Toute magie');
var arrSkillsMidName = new Array('Rune Chaotique AÃ©rÃ©e', 'Rune de Guerre Terrestre', 'Rune Primale AÃ©rÃ©e', 'Rune Primale terrestre', 'Rune Primale de Cendre', 'Rune de Guerre AÃ©rÃ©e', 'Joyau de Bataille BrÃ»lant', 'Rune Primale Corrompue', 'Rune Chaotique GlacÃ©e', 'Joyau de Bataille PoussiÃ©reux', 'Rune de Guerre Incandescente', 'Rune de Guerre d\'Eclair', 'Rune Primale Impie', 'Rune de Guerre Glaciale', 'Rune Chaotique Aqueuse', 'Rune Primale Vaillante', 'Joyau de Bataille Vaporeux', 'Rune Chaotique BrÃ»lante', 'Joyau de Bataille Incandescent', 'Rune de Guerre BrÃ»lante', 'Joyau de Bataille AÃ©rÃ©', 'Rune Primale Incandescente', 'Rune Chaotique Incandescente', 'Rune Chaotique Vaporeuse', 'Rune Chaotique PoussiÃ©reuse', 'Rune de Guerre Aqueuse', 'Rune de Guerre DÃ©licate', 'Rune Primale DÃ©licate');

var arrSkillsMidMat1  = new Array(	'Suie de Niflheim', 
					'Os de gÃ©ant en poudre', 
					'Os de Vendo en poudre', 
					'Os de Vendo en poudre', 
                    'Suie de Niflheim', 					
					'Os de gÃ©ant en poudre', 
					'Terre sanglante de champs de bataille', 
					'Suie de Niflheim',
					'Os de Vendo en poudre', 
					'Terre sanglante de champs de bataille', 
					'Os de gÃ©ant en poudre', 
					'Os de gÃ©ant en poudre',
					'Os de Vendo en poudre',
					'Os de gÃ©ant en poudre', 
					'Suie de Niflheim',
					'Os de Vendo en poudre', 
					'Terre sanglante de champs de bataille',					
					'Suie de Niflheim', 
					'Terre sanglante de champs de bataille', 
					'Os de gÃ©ant en poudre', 					
					'Terre sanglante de champs de bataille', 
					'Os de Vendo en poudre', 
					'Suie de Niflheim', 
					'Suie de Niflheim', 
					'Suie de Niflheim', 
					'Os de gÃ©ant en poudre',
					'Os de gÃ©ant en poudre', 
					'Os de gÃ©ant en poudre'); 
var arrSkillsMidMat2  = new Array(	'Essence d\'Ã©lÃ©mental d\'air', 
					'Sang de fÃ©e', 
					'Essence d\'Ã©lÃ©mental d\'air', 
					'Sang de fÃ©e', 
					'Cendre de mort et eau bÃ©nite',
					'Essence d\'Ã©lÃ©mental d\'air', 
					'Chaleur d\'un bÃ»cher d\'outre monde', 
					'Sang de fÃ©e',
					'Givre de terre dÃ©solÃ©e', 
					'Cendre de mort et eau bÃ©nite', 
					'Feu draconique', 
					'Sang de lÃ©viathan',
					'Givre de terre dÃ©solÃ©e', 
					'Essence d\'Ã©lÃ©mental d\'air',
					'Sang de lÃ©viathan', 
					'Brume de marais', 
					'Brume de marais', 
					'Chaleur d\'un bÃ»cher d\'outre monde', 
					'Feu draconique', 
					'Chaleur d\'un bÃ»cher d\'outre monde', 
					'Essence d\'Ã©lÃ©mental d\'air', 
					'Feu draconique', 
					'Feu draconique', 
					'Brume de marais', 
					'Cendre de mort et eau bÃ©nite', 
					'Sang de lÃ©viathan',
					'Feu draconique', 
					'Feu draconique'); 


var arrSkillsUsedHib = new Array('Voie arborÃ©ale', 'Lame', 'Contondant', 'Art de Combat', 'Lance Celtique', 'Attaque sournoise', 'Sylvestre', 'Enchantement', 'Empoisonner', 'Grands Armes', 'Soleil', 'Lune', 'Empathie', 'Musique', 'Symbiose', 'Croissance', 'Parade', 'Perforant', 'Arc recourbÃ©s', 'RÃ©gÃ©nÃ©ration', 'Faux', 'Bouclier', 'FurtivitÃ©', 'Vaillance', 'Voie de la verdure', 'Voie du vide','MaÃ®trise des Ombres','Etreinte SÃ©ide','DÃ©mence','DÃ©fense Spectral','Lamentation SÃ©pulcrale','Cri EthÃ©rÃ©');
var arrSkillsHibName = new Array('Pierre Magique de Nature Vaporeuse', 'Pierre Magique de Guerre Acqueuse', 'Pierre Magique de Guerre Incandescente', 'Pierre Magique de Guerre Glaciale', 'Pierre Magique de Guerre Terrestre', 'Pierre Magique de Bataille BrÃ»lante', 'Pierre Magique Nature Gluante', 'Pierre Magique des Arcanes Vaporeuse', 'Joyau de Bataille PoussiÃ©reux', 'Pierre Magique de Guerre BrÃ»lante', 'Pierre Magique des Arcanes Incandescente', 'Pierre Magique des Arcanes Aqueuse', 'Pierre Magique des Arcanes Terrestre', 'Pierre Magique Naturelle AÃ©rÃ©e', 'Pierre Magique Naturelle Terrestre', 'Pierre Magique Naturelle Incandescente', 'Joyau de Bataille Vaporeux',  'Pierre Magique de Guerre PoussiÃ©reuse', 'Pierre Magique de Guerre AÃ©rÃ©e', 'Pierre Magique Naturelle Aqueuse', 'Pierre Magique de Guerre LÃ©gÃ¨re', 'Joyau de Bataille Incandescent', 'Joyau de Bataille AÃ©rÃ©', 'Pierre Magique des Arcanes AÃ©rÃ©e', 'Pierre Magique Nature MinÃ©rale', 'Pierre Magique d\'Arcanes Glaciale','Rocher Magique des Arcanes TÃ©nÃ©breux','Rocher Magique des Arcanes Etreignant','Rocher Magique des Arcanes AliÃ©nant','Rocher Magique des Arcanes Spectral','Rocher Magique des Arcanes Fantasmatique','Rocher Magique des Arcanes EthÃ©rÃ©');

var arrSkillsHibMat1  = new Array('PoussiÃ¨re fÃ©erique',
                    'PoussiÃ¨re unseelie', 
					'PoussiÃ¨re unseelie', 
					'PoussiÃ¨re unseelie', 
					'PoussiÃ¨re unseelie', 
					'Terre sanglante de champs de bataille', 
					'PoussiÃ¨re fÃ©erique',
					'PoussiÃ¨re d\'outre monde', 
					'Terre sanglante de champs de bataille', 
					'PoussiÃ¨re unseelie', 
					'PoussiÃ¨re d\'outre monde', 
					'PoussiÃ¨re d\'outre monde', 
					'PoussiÃ¨re d\'outre monde', 
					'PoussiÃ¨re fÃ©erique', 
					'PoussiÃ¨re fÃ©erique', 
					'PoussiÃ¨re fÃ©erique', 
					'Terre sanglante de champs de bataille', 
					'PoussiÃ¨re unseelie', 
					'PoussiÃ¨re unseelie', 
					'PoussiÃ¨re fÃ©erique', 
					'PoussiÃ¨re unseelie',
					'Terre sanglante de champs de bataille', 
					'Terre sanglante de champs de bataille', 
					'PoussiÃ¨re d\'outre monde', 
					'PoussiÃ¨re fÃ©erique',
					'PoussiÃ¨re d\'outre monde',
					'PoussiÃ¨re d\'outre monde',
					'PoussiÃ¨re d\'outre monde',
					'PoussiÃ¨re d\'outre monde',
					'PoussiÃ¨re d\'outre monde',
					'PoussiÃ¨re d\'outre monde',
					'PoussiÃ¨re d\'outre monde'); 
var arrSkillsHibMat2  = new Array( 'Brume de marais',
                    'Sang de lÃ©viathan', 
					'Feu draconique', 
					'Givre de terre dÃ©solÃ©e', 
					'Sang de fÃ©e', 
					'Chaleur d\'un bÃ»cher d\'outre monde', 
					'Brume de marais',
					'Brume de marais', 
					'Cendre de mort et eau bÃ©nite', 
					'Chaleur d\'un bÃ»cher d\'outre monde', 
					'Feu draconique', 
					'Sang de lÃ©viathan', 
					'Sang de fÃ©e', 
					'Essence d\'Ã©lÃ©mental d\'air', 
					'Sang de fÃ©e', 
					'Feu draconique', 
					'Brume de marais', 
					'Cendre de mort et eau bÃ©nite', 
					'Essence d\'Ã©lÃ©mental d\'air', 
					'Sang de lÃ©viathan', 
					'rayon de soleil',
					'Feu draconique', 
					'Essence d\'Ã©lÃ©mental d\'air', 
					'Essence d\'Ã©lÃ©mental d\'air', 
					'Chaleur d\'un bÃ»cher d\'outre monde',
					'Givre de terre dÃ©solÃ©e',
					'Brume de marais',
					'Givre de terre dÃ©solÃ©e',
					'Sang de fÃ©e',
					'Essence d\'Ã©lÃ©mental d\'air',
					'Feu draconique',
					'Sang de lÃ©viathan'); 

var arrFocus = new Array (5, 10, 15, 20, 25, 30, 35, 40, 45, 50);
var arrFocusUsedHib = new Array('Voie arborÃ©ale', 'Sylvestre', 'Enchantement', 'Soleil', 'Lune', 'Empathie', 'Voie de la verdure', 'Voie du vide','DÃ©fense Spectral','Lamentation SÃ©pulcrale','Cri EthÃ©rÃ©');
var arrFocusHibName = new Array('Pierre Magique Vaporeuse', 'Pierre Magique Gluante', 'Pierre Magique de Vapeur', 'Pierre Magique de Feu', 'Pierre Magique d\'Eau', 'Pierre Magique de Terre', 'Pierre Magique MinÃ©ral', 'Pierre Magique de Glace','Rocher Magique Spectral','Rocher Magique Fantasmatique','Rocher Maqique EthÃ©rÃ©');

var arrFocusHibMat1 = new Array('Ecailles draconiques en poudre', 
				'Ecailles draconiques en poudre', 
				'Ecailles draconiques en poudre', 
				'Ecailles draconiques en poudre', 
				'Ecailles draconiques en poudre', 
				'Ecailles draconiques en poudre', 
				'Ecailles draconiques en poudre',				
				'Ecailles draconiques en poudre',
				'Ecailles draconiques en poudre',
				'Ecailles draconiques en poudre',
				'Ecailles draconiques en poudre'); 
var arrFocusHibMat2 = new Array('Brume de marais',
                 		'Sang de fÃ©e',
                 		'Brume de marais', 
				'Feu draconique',
				'Sang de lÃ©viathan', 
				'Sang de fÃ©e', 
				'Chaleur d\'un bÃ»cher d\'outre monde',
				'Givre de terre dÃ©solÃ©e',
				'Feu draconique',
				'Sang de lÃ©viathan',
				'Brume de marais'); 

var arrFocusUsedMid = new Array('ArmÃ©e Squelettique', 'TÃ©nÃ¨bre', 'Rune d\'Odin', 'Invocation', 'Affaiblissement', 'SortilÃ¨ge', 'Tout focus');
var arrFocusMidName = new Array('Rune de Cendre', 'Rune de Glace', 'Rune de Chaleur', 'Rune de Vapeur', 'Rune de PoussiÃ¨re','Rune Corrompue','Rune Eclatante');

var arrFocusMidMat1 = new Array('Ecailles draconiques en poudre', 
				'Ecailles draconiques en poudre', 
				'Ecailles draconiques en poudre', 
				'Ecailles draconiques en poudre',
				'Ecailles draconiques en poudre',
				'Ecailles draconiques en poudre', 				
				'Ecailles draconiques en poudre'); 
var arrFocusMidMat2 = new Array('Cendre de mort et eau bÃ©nite',
                		'Givre de terre dÃ©solÃ©e', 
				'Chaleur d\'un bÃ»cher d\'outremonde', 
				'Brume de marais', 
				'Cendre de mort et eau bÃ©nite',
				'Cendre de mort et eau bÃ©nite',
				'Feu draconique'); 

//var arrFocusUsedAlb = new Array('Terre', 'Glace', 'Feu', 'Air', 'Corps', 'MatiÃ¨re', 'Esprit', 'Mind');
var arrFocusUsedAlb = new Array('Corps', 'Glace','Servant Mort', 'Visio Mortis', 'Terre', 'Feu', 'Manipulation', 'Simulacre', 'Painworking' , 'Ame',  'Air' );
var arrFocusAlbName = new Array('Glyphe de Focus BrÃ»lante', 'Glyphe de Focus Glaciale', 'Glyphe de focus ashen',  'Glyphe de Focus vacuous', 'Glyphe de Focus Terrestre',  'Glyphe de Focus Incandescente', 'Glyphe de Focus PoussiÃ¨reuse',  'Glyphe de Focus Acqueuse',  'Glyphe de Focus IncrustÃ©e de sel', 'Glyphe de Focus Vaporeuse', 'Glyphe de Focus AÃ©rÃ©e');

var arrFocusAlbMat1 = new Array('Ecailles draconiques en poudre', 
				'Ecailles draconiques en poudre', 
				'Ecailles draconiques en poudre', 
				'Ecailles draconiques en poudre', 
				'Ecailles draconiques en poudre', 
				'Ecailles draconiques en poudre', 
				'Ecailles draconiques en poudre', 
				'Ecailles draconiques en poudre', 
				'Ecailles draconiques en poudre', 
				'Ecailles draconiques en poudre', 				
				'Ecailles draconiques en poudre'); 

var arrFocusAlbMat2 = new Array('Chaleur d\'un bÃ»cher d\'outre monde', 
                'Givre de terre dÃ©solÃ©e', 
				'Cendre de mort et eau bÃ©nite',
				'Brume de marais',
				'Sang de fÃ©e',
				'Feu draconique', 
				'Cendre de mort et eau bÃ©nite', 
				'Sang de lÃ©viathan', 
				'Ã©nergie mystique', 
				'Brume de marais', 
				'Essence d\'Ã©lÃ©mental d\'air'); 
								

var arrPower = new Array(1,	2,	3,	5,	7,	9,	11,	13,	15,	17);
var arrHits = new Array(4, 12, 20, 28, 36, 44, 52, 60, 68, 76);
var arrResist = new Array(1,	2,	3,	5,	7,	9,	11,	13,	15,	17);
var arrResistUsed = new Array('Corps', 'Froid', 'Chaleur', 'Energie', 'MatiÃ¨re', 'Esprit', 'Estoc', 'Contondant', 'Tranchant');
var arrResistName = new Array('Joyau Protecteur PoussiÃ©reux', 'Joyau Protecteur Glacial', 'Joyau Protecteur BrÃ»lant', 'Joyau Protecteur Lumineux', 'Joyau Protecteur Terrestre', 'Joyau Protecteur Vaporeux', 'Joyau Protecteur AÃ©rÃ©', 'Joyau Protecteur Incandescent', 'Joyau Protecteur Aqueux');

var arrResistMat1 = new Array(	'Ecailles draconiques en poudre', 
				'Ecailles draconiques en poudre', 
				'Ecailles draconiques en poudre', 
				'Ecailles draconiques en poudre', 
				'Ecailles draconiques en poudre', 
				'Ecailles draconiques en poudre', 
				'Ecailles draconiques en poudre', 
				'Ecailles draconiques en poudre', 
				'Ecailles draconiques en poudre'); 
var arrResistMat2 = new Array(	'Cendre de mort et eau bÃ©nite', 
				'Givre de terre dÃ©solÃ©e', 
				'Chaleur d\'un bÃ»cher d\'outre monde', 
				'rayon de soleil', 
				'Sang de fÃ©e', 
				'Brume de marais', 
				'Essence d\'Ã©lÃ©mental d\'air', 
				'Feu draconique', 
				'Sang de lÃ©viathan'); 

var arrStats = new Array(1,	3,	5,	7,	9,	11,	13,	15,	17,	19);
var arrStatsUsed = new Array('Force', 'DextÃ©ritÃ©', 'VivacitÃ©', 'Constitution', 'Intelligence', 'PiÃ©tÃ©', 'Empathie', 'Charisme');
var arrStatsName = new Array('Joyau d\'Essence Incandescente', 'Joyau d\'Essence Vaporeuse', 'Joyau d\'Essence AÃ©rÃ©e', 'Joyau d\'Essence Terrestre', 'Joyau d\'Essence PoussiÃ©reux', 'Joyau d\'Essence Aqueuse', 'Joyau d\'Essence BrÃ»lant', 'Joyau d\'Essence Glaciale');

var arrStatsMat1 = new Array(	'Essence de vie', 
				'Essence de vie', 
				'Essence de vie', 
				'Essence de vie', 
				'Essence de vie', 
				'Essence de vie', 
				'Essence de vie', 
				'Essence de vie'); 
var arrStatsMat2 = new Array(	'Feu draconique', 
				'Brume de marais', 
				'Essence d\'Ã©lÃ©mental d\'air', 
				'Sang de fÃ©e', 
				'Cendre de mort et eau bÃ©nite', 
				'Sang de lÃ©viathan', 
				'Chaleur d\'un bÃ»cher d\'outre monde', 
				'Givre de terre dÃ©solÃ©e'); 

var arrGemStrength = new Array('Brut', 'DÃ©grossi', 'Terne','FaussÃ©','Imparfait','Poli','TaillÃ©','PrÃ©cieux','Pur','Parfait')

var marrImbue = new Array( new Array("1","1","1","1","1","1","1"),
                           new Array("2","2","2","2","2","2","2"),
                           new Array("2","2","2","2","2","2","2"),
                           new Array("3","3","3","3","3","3","3"),
                           new Array("4","4","4","4","4","4","4"),
                           new Array("4","4","4","4","4","4","4"),
                           new Array("5","5","5","5","5","5","5"),
                           new Array("5","5","5","5","5","5","5"),
                           new Array("6","6","6","6","6","6","6"),
                           new Array("7","7","7","7","7","7","7"),
                           new Array("7","7","7","7","7","7","7"),
                           new Array("8","8","8","8","8","8","8"),
                           new Array("9","9","9","9","9","9","9"),
                           new Array("9","9","9","9","9","9","9"),
                           new Array("10","10","10","10","10","10","10"),
                           new Array("10","10","10","10","10","10","10"),
                           new Array("11","11","11","11","11","11","11"),
                           new Array("12","12","12","12","12","12","12"),
                           new Array("12","12","12","12","12","12","12"),
                           new Array("13","13","13","13","13","13","13"),
                           new Array("13","13","13","13","13","13","13"),
                           new Array("14","14","14","14","14","14","14"),
                           new Array("15","15","15","15","15","15","15"),
                           new Array("15","15","15","15","15","15","15"),
                           new Array("16","16","16","16","16","16","16"),
                           new Array("16","16","16","16","16","16","16"),
                           new Array("17","17","17","17","17","17","17"),
                           new Array("18","18","18","18","18","18","18"),
                           new Array("18","18","18","18","18","18","18"),
                           new Array("19","19","19","19","19","19","19"),
                           new Array("20","20","20","20","20","20","20"),
                           new Array("20","20","20","20","20","20","20"),
                           new Array("21","21","21","21","21","21","21"),
                           new Array("21","21","21","21","21","21","21"),
                           new Array("22","22","22","22","22","22","22"),
                           new Array("23","23","23","23","23","23","23"),
                           new Array("23","23","23","23","23","23","23"),
                           new Array("24","24","24","24","24","24","24"),
                           new Array("24","24","24","24","24","24","24"),
                           new Array("25","25","25","25","25","25","25"),
                           new Array("26","26","26","26","26","26","26"),
                           new Array("26","26","26","26","26","26","26"),
                           new Array("27","27","27","27","27","27","27"),
                           new Array("27","27","27","27","27","27","27"),
                           new Array("28","28","28","28","28","28","28"),
                           new Array("29","29","29","29","29","29","29"),
                           new Array("29","29","29","29","29","29","29"),
                           new Array("30","30","30","30","30","30","30"),
                           new Array("31","31","31","31","31","31","31"),
                           new Array("31","31","31","31","31","31","31"),
                           new Array("32","32","32","32","32","32","32") );

var arrGemStrGem   = new Array('Lo',  'Um',    'On',   'Ee',    'Pal',      'Mon',     'Ros',    'Zo',      'Kath',    'Ra') 
var arrSkilldigit1 = new Array('',     '1',     '2',    '3',     '4',        '5',       '6',      '7',       '8',       '9') 
var arrGemStrMat1a = new Array('1',    '5',     '9',   '13',    '17',       '21',      '25',     '29',      '33',      '37') 
var arrGemStrMat1b = new Array('1',    '6',    '11',   '16',    '21',       '26',      '31',     '36',      '41',      '46') 
var arrGemStrMat2  = new Array('1',    '2',     '3',    '4',     '5',        '6',       '7',      '8',       '9',      '10') 

function doOutputLine(element1, element2, element3, realm)
{
var tr = '';	
switch(element1) {
  case 0:
    tr = tr + '- ';
    switch(element3) {
     case 0:
       tr = tr + 'Force: ';
       break;
         case 1:
       tr = tr + 'DextÃ©ritÃ©: ';
       break;
            case 2:
       tr = tr + 'VivacitÃ©: ';
       break;
            case 3:
       tr = tr + 'Constitution: ';
       break;
            case 4:
       tr = tr + 'Intelligence: ';
       break;
            case 5:
       tr = tr + 'PiÃ©tÃ©: ';
       break;
            case 6:
       tr = tr + 'Empathie: ';
       break;
            case 7:
       tr = tr + 'Charisme: ';
       break;   
     }
     tr = tr + Math.floor(arrStats[element2] * 1.5) + '\n';  
  break;
  case 1:
     tr = '- ' + arrResistUsed[element3] + ': ' + arrResist[element2] + '%\n';
  break;
  case 2: 
     tr = '- ' + 'HP: ' + arrHits[element2] + '\n';     
  break;
  case 3:
     tr = '- ' + 'Mana: ' + arrPower[element2] + '\n';
  break;
  case 4:
    switch(realm) {
    case 0:	
     tr = '- ' + arrFocusUsedAlb[element3] + ': ' + arrFocus[element2] + ' niveaux\n';
     break;
    case 1:	
     tr = '- ' + arrFocusUsedHib[element3] + ': ' + arrFocus[element2] + ' niveaux\n';
     break;
    case 2:	
     tr = '- ' + arrFocusUsedMid[element3] + ': ' + arrFocus[element2] + ' niveaux\n';
     break;      
     }    
  break;
  case 5:
    switch(realm) {
    case 0:	
     tr = '- ' + arrSkillsUsedAlb[element3] + ': ' + arrSkills[element2] + '\n';
     break;
    case 1:	
     tr = '- ' + arrSkillsUsedHib[element3] + ': ' + arrSkills[element2] + '\n';
     break;
    case 2:	
     tr = '- ' + arrSkillsUsedMid[element3] + ': ' + arrSkills[element2] + '\n';
     break;      
     }   
  break;
}
return tr;
}




// remise à 0 liste gemme 1
var intSelect = 0;

if ((elementUsed == 1) || (elementUsed == 5)) {
while (window.document.form1.g1effect2.options.length>0)
    {
	 deleteIndex=window.document.form1.g1effect2.options.length-1;
	 window.document.form1.g1effect2.options[deleteIndex]=null;
	}
while (window.document.form1.line1.options.length>0)
    {
	 deleteIndex=window.document.form1.line1.options.length-1;
	 window.document.form1.line1.options[deleteIndex]=null;
	}	



switch (window.document.form1.g1effect.selectedIndex) {
case 0:
  for (i = 0; i < 10; i++)
  {
   myOption=new Option();
   myOption.text="+ " + Math.floor(arrStats[i] * 1.5);
   if (window.document.form1.g1effect2.selectedIndex > 0)
      {insertIndex=window.document.form1.g1effect2.selectedIndex;}
    else
     {
	 insertIndex=window.document.form1.g1effect2.options.length;
     window.document.form1.g1effect2.options[insertIndex]=myOption;
     } 
  }
  
  for (i = 0; i < 8; i++)
  {
   myOption=new Option();
   myOption.text= arrStatsUsed[i];
   if (window.document.form1.line1.selectedIndex > 0)
     {insertIndex=window.document.form1.line1.selectedIndex;}
    else
     { insertIndex=window.document.form1.line1.options.length;
       window.document.form1.line1.options[insertIndex]=myOption;
	 } 
  }  
  break;
case 1:
  for (i = 0; i < 10; i++) {
    myOption=new Option();
  myOption.text="+ " + arrResist[i];
  if (window.document.form1.g1effect2.selectedIndex > 0)
    { insertIndex=window.document.form1.g1effect2.selectedIndex; }
   else {
    insertIndex=window.document.form1.g1effect2.options.length;
   window.document.form1.g1effect2.options[insertIndex]=myOption;}
  }
    for (i = 0; i < 9; i++) {
  myOption=new Option();
  myOption.text= arrResistUsed[i];
  if (window.document.form1.line1.selectedIndex > 0)
    { insertIndex=window.document.form1.line1.selectedIndex; }
   else
    {insertIndex=window.document.form1.line1.options.length;
   window.document.form1.line1.options[insertIndex]=myOption;}
  }  
  break;  
case 2:
  for (i = 0; i < 10; i++) {
    myOption=new Option();
  myOption.text="+ " + arrHits[i];
  if (window.document.form1.g1effect2.selectedIndex > 0)
     {insertIndex=window.document.form1.g1effect2.selectedIndex;}
   else {
    insertIndex=window.document.form1.g1effect2.options.length;
   window.document.form1.g1effect2.options[insertIndex]=myOption; }
  }
    myOption=new Option();
  myOption.text= 'HP';
  if (window.document.form1.line1.selectedIndex > 0)
          { insertIndex=window.document.form1.line1.selectedIndex;}
       else
       {  insertIndex=window.document.form1.line1.options.length;
  window.document.form1.line1.options[insertIndex]=myOption; }
  break;  
case 3:
  for (i = 0; i < 10; i++) {
    myOption=new Option();
  myOption.text="+ " + arrPower[i];
  if (window.document.form1.g1effect2.selectedIndex > 0)
    { insertIndex=window.document.form1.g1effect2.selectedIndex;}
   else
    { insertIndex=window.document.form1.g1effect2.options.length;
   window.document.form1.g1effect2.options[insertIndex]=myOption;}
  }
  myOption=new Option();
  myOption.text= 'Mana';
  if (window.document.form1.line1.selectedIndex > 0)
        { insertIndex=window.document.form1.line1.selectedIndex; }
       else
        {  insertIndex=window.document.form1.line1.options.length;
  window.document.form1.line1.options[insertIndex]=myOption; }
  break;      
case 4:
  for (i = 0; i < 10; i++) {
    myOption=new Option();
  myOption.text="+ " + arrFocus[i];
  if (window.document.form1.g1effect2.selectedIndex > 0)
   { insertIndex=window.document.form1.g1effect2.selectedIndex; }
   else
    { insertIndex=window.document.form1.g1effect2.options.length;
   window.document.form1.g1effect2.options[insertIndex]=myOption; }
  }
  switch (window.document.form1.realm.selectedIndex) {
    case 0:
	  for (i = 0; i < 11; i++) {
       myOption=new Option();
       myOption.text= arrFocusUsedAlb[i];
       if (window.document.form1.line1.selectedIndex > 0)
        { insertIndex=window.document.form1.line1.selectedIndex; }
       else
        {
		 insertIndex=window.document.form1.line1.options.length;
         window.document.form1.line1.options[insertIndex]=myOption;
		}
      }  
	   break;
    case 1:
	  for (i = 0; i < 11; i++)
	  {
       myOption=new Option();
       myOption.text= arrFocusUsedHib[i];
       if (window.document.form1.line1.selectedIndex > 0)
         { insertIndex=window.document.form1.line1.selectedIndex; }
       else
        { 
		  insertIndex=window.document.form1.line1.options.length;
          window.document.form1.line1.options[insertIndex]=myOption;
	    }
      }  
	   break;
    case 2:
	  for (i = 0; i < 7; i++)
	  {
       myOption=new Option();
       myOption.text= arrFocusUsedMid[i];
       if (window.document.form1.line1.selectedIndex > 0)
        { insertIndex=window.document.form1.line1.selectedIndex; }
       else
         {
	      insertIndex=window.document.form1.line1.options.length;
          window.document.form1.line1.options[insertIndex]=myOption;
	     }
      }  
	   break;	   	   
	}
  break;  
case 5:
  for (i = 0; i < 8; i++) {
    myOption=new Option();
  myOption.text="+ " + arrSkills[i];
  if (window.document.form1.g1effect2.selectedIndex > 0)
   { insertIndex=window.document.form1.g1effect2.selectedIndex; }
   else
     {insertIndex=window.document.form1.g1effect2.options.length;
   window.document.form1.g1effect2.options[insertIndex]=myOption; }
  }
    switch (window.document.form1.realm.selectedIndex) {
    case 0:
	  for (i = 0; i < 31; i++)
	  {
       myOption=new Option();
       myOption.text= arrSkillsUsedAlb[i];
       if (window.document.form1.line1.selectedIndex > 0)
         { insertIndex=window.document.form1.line1.selectedIndex; }
       else
         {
		  insertIndex=window.document.form1.line1.options.length;
          window.document.form1.line1.options[insertIndex]=myOption;
		 }
      }  
	   break;
    case 1:
	  for (i = 0; i < 32; i++)
	  {
       myOption=new Option();
       myOption.text= arrSkillsUsedHib[i];
       if (window.document.form1.line1.selectedIndex > 0)
         { insertIndex=window.document.form1.line1.selectedIndex;}
       else
        {
		 insertIndex=window.document.form1.line1.options.length;
         window.document.form1.line1.options[insertIndex]=myOption;
        }
	  }  
	   break;
    case 2:
	  for (i = 0; i < 28; i++)
	  {
       myOption=new Option();
       myOption.text= arrSkillsUsedMid[i];
       if (window.document.form1.line1.selectedIndex > 0)
         { insertIndex=window.document.form1.line1.selectedIndex;}
       else
        {
		  insertIndex=window.document.form1.line1.options.length;
          window.document.form1.line1.options[insertIndex]=myOption;
		}
      }  
	   break;	   	   
	}
  break;    
  }
}

// remise à 0 liste gemme 2

if ((elementUsed == 2) || (elementUsed == 5)) {

	
while (window.document.form1.g2effect2.options.length>0)
    {
	 deleteIndex=window.document.form1.g2effect2.options.length-1;
	 window.document.form1.g2effect2.options[deleteIndex]=null;
	}
while (window.document.form1.line2.options.length>0)
    {
	 deleteIndex=window.document.form1.line2.options.length-1;
	 window.document.form1.line2.options[deleteIndex]=null;
	}		

switch (window.document.form1.g2effect.selectedIndex) {
case 0:
  for (i = 0; i < 10; i++) {
  myOption=new Option();
  myOption.text="+ " + Math.floor(arrStats[i] * 1.5);
  if (window.document.form1.g2effect2.selectedIndex > 0)
   { insertIndex=window.document.form1.g2effect2.selectedIndex; }
   else
     {insertIndex=window.document.form1.g2effect2.options.length;
   window.document.form1.g2effect2.options[insertIndex]=myOption; }
  }
  for (i = 0; i < 8; i++) {
  myOption=new Option();
  myOption.text= arrStatsUsed[i];
  if (window.document.form1.line2.selectedIndex > 0)
   { insertIndex=window.document.form1.line2.selectedIndex; }
   else
   { insertIndex=window.document.form1.line2.options.length;
   window.document.form1.line2.options[insertIndex]=myOption; }
  }  
  break;
case 1:
  for (i = 0; i < 10; i++) {
    myOption=new Option();
  myOption.text="+ " + arrResist[i];
  if (window.document.form1.g2effect2.selectedIndex > 0)
   { insertIndex=window.document.form1.g2effect2.selectedIndex; }
   else
   { insertIndex=window.document.form1.g2effect2.options.length;
   window.document.form1.g2effect2.options[insertIndex]=myOption; }
  }
    for (i = 0; i < 9; i++) {
  myOption=new Option();
  myOption.text= arrResistUsed[i];
  if (window.document.form1.line2.selectedIndex > 0)
   { insertIndex=window.document.form1.line2.selectedIndex; }
   else
   { insertIndex=window.document.form1.line2.options.length;
   window.document.form1.line2.options[insertIndex]=myOption; }
  }  
  break;  
case 2:
  for (i = 0; i < 10; i++) {
    myOption=new Option();
  myOption.text="+ " + arrHits[i];
  if (window.document.form1.g2effect2.selectedIndex > 0)
   { insertIndex=window.document.form1.g2effect2.selectedIndex; }
   else
   { insertIndex=window.document.form1.g2effect2.options.length;
   window.document.form1.g2effect2.options[insertIndex]=myOption;}
  }
    myOption=new Option();
  myOption.text= 'HP';
  if (window.document.form1.line2.selectedIndex > 0)
      {   insertIndex=window.document.form1.line2.selectedIndex; }
       else
        { insertIndex=window.document.form1.line2.options.length;
  window.document.form1.line2.options[insertIndex]=myOption; }
  break;  
case 3:
  for (i = 0; i < 10; i++) {
    myOption=new Option();
  myOption.text="+ " + arrPower[i];
  if (window.document.form1.g2effect2.selectedIndex > 0)
   { insertIndex=window.document.form1.g2effect2.selectedIndex; }
   else
   { insertIndex=window.document.form1.g2effect2.options.length;
   window.document.form1.g2effect2.options[insertIndex]=myOption; }
  }
  myOption=new Option();
  myOption.text= 'mana';
  if (window.document.form1.line2.selectedIndex > 0)
      {   insertIndex=window.document.form1.line2.selectedIndex; }
       else
      {   insertIndex=window.document.form1.line2.options.length;
  window.document.form1.line2.options[insertIndex]=myOption; }
  break;      
case 4:
  for (i = 0; i < 10; i++) {
    myOption=new Option();
  myOption.text="+ " + arrFocus[i];
  if (window.document.form1.g2effect2.selectedIndex > 0)
   { insertIndex=window.document.form1.g2effect2.selectedIndex; }
   else
   { insertIndex=window.document.form1.g2effect2.options.length;
   window.document.form1.g2effect2.options[insertIndex]=myOption;}
  }
  switch (window.document.form1.realm.selectedIndex) {
    case 0:
	  for (i = 0; i < 8; i++) {
       myOption=new Option();
       myOption.text= arrFocusUsedAlb[i];
       if (window.document.form1.line2.selectedIndex > 0)
        { insertIndex=window.document.form1.line2.selectedIndex;}
       else
        { insertIndex=window.document.form1.line2.options.length;
       window.document.form1.line2.options[insertIndex]=myOption;}
        }  
	   break;
    case 1:
	  for (i = 0; i < 8; i++) {
       myOption=new Option();
       myOption.text= arrFocusUsedHib[i];
       if (window.document.form1.line2.selectedIndex > 0)
        { insertIndex=window.document.form1.line2.selectedIndex; }
       else
        { insertIndex=window.document.form1.line2.options.length;
       window.document.form1.line2.options[insertIndex]=myOption; }
        }  
	   break;
    case 2:
	  for (i = 0; i < 4; i++) {
       myOption=new Option();
       myOption.text= arrFocusUsedMid[i];
       if (window.document.form1.line2.selectedIndex > 0)
         { insertIndex=window.document.form1.line2.selectedIndex; }
       else
        { insertIndex=window.document.form1.line2.options.length;
       window.document.form1.line2.options[insertIndex]=myOption; }
        }  
	   break;	   	   
	}
  break;  
case 5:
  for (i = 0; i < 8; i++) {
    myOption=new Option();
  myOption.text="+ " + arrSkills[i];
  if (window.document.form1.g2effect2.selectedIndex > 0)
    { insertIndex=window.document.form1.g2effect2.selectedIndex; }
   else
   { insertIndex=window.document.form1.g2effect2.options.length;
   window.document.form1.g2effect2.options[insertIndex]=myOption; }
  }
    switch (window.document.form1.realm.selectedIndex) {
    case 0:
	  for (i = 0; i < 31; i++) {
       myOption=new Option();
       myOption.text= arrSkillsUsedAlb[i];
       if (window.document.form1.line2.selectedIndex > 0)
        { insertIndex=window.document.form1.line2.selectedIndex;}
       else
         {insertIndex=window.document.form1.line2.options.length;
       window.document.form1.line2.options[insertIndex]=myOption;}
        }  
	   break;
    case 1:
	  for (i = 0; i < 26; i++) {
       myOption=new Option();
       myOption.text= arrSkillsUsedHib[i];
       if (window.document.form1.line2.selectedIndex > 0)
        { insertIndex=window.document.form1.line2.selectedIndex; }
       else
        { insertIndex=window.document.form1.line2.options.length;
       window.document.form1.line2.options[insertIndex]=myOption; }
        }  
	   break;
    case 2:
	  for (i = 0; i < 25; i++) {
       myOption=new Option();
       myOption.text= arrSkillsUsedMid[i];
       if (window.document.form1.line2.selectedIndex > 0)
        { insertIndex=window.document.form1.line2.selectedIndex; }
       else
        { insertIndex=window.document.form1.line2.options.length;
       window.document.form1.line2.options[insertIndex]=myOption; }
        }  
	   break;	   	   
	}
  break;    
  }
}

if ((elementUsed == 3) || (elementUsed == 5)) 
{
while (window.document.form1.g3effect2.options.length>0)
    {
	 deleteIndex=window.document.form1.g3effect2.options.length-1;
	 window.document.form1.g3effect2.options[deleteIndex]=null;
	}
while (window.document.form1.line3.options.length>0)
    {
	 deleteIndex=window.document.form1.line3.options.length-1;
	 window.document.form1.line3.options[deleteIndex]=null;
	}		

switch (window.document.form1.g3effect.selectedIndex) {
case 0:
  for (i = 0; i < 10; i++) {
  myOption=new Option();
  myOption.text="+ " + Math.floor(arrStats[i] * 1.5);
  if (window.document.form1.g3effect2.selectedIndex > 0)
    { insertIndex=window.document.form1.g3effect2.selectedIndex; }
   else
    { insertIndex=window.document.form1.g3effect2.options.length;
   window.document.form1.g3effect2.options[insertIndex]=myOption; }
  }
  for (i = 0; i < 8; i++) {
  myOption=new Option();
  myOption.text= arrStatsUsed[i];
  if (window.document.form1.line3.selectedIndex > 0)
   { insertIndex=window.document.form1.line3.selectedIndex; }
   else
   { insertIndex=window.document.form1.line3.options.length;
   window.document.form1.line3.options[insertIndex]=myOption; }
  }  
  break;
case 1:
  for (i = 0; i < 10; i++) {
    myOption=new Option();
  myOption.text="+ " + arrResist[i];
  if (window.document.form1.g3effect2.selectedIndex > 0)

    { insertIndex=window.document.form1.g3effect2.selectedIndex; }
   else
    { insertIndex=window.document.form1.g3effect2.options.length;
   window.document.form1.g3effect2.options[insertIndex]=myOption; }
  }
    for (i = 0; i < 9; i++) {
  myOption=new Option();
  myOption.text= arrResistUsed[i];
  if (window.document.form1.line3.selectedIndex > 0)
    { insertIndex=window.document.form1.line3.selectedIndex; }
   else
    { insertIndex=window.document.form1.line3.options.length;
   window.document.form1.line3.options[insertIndex]=myOption; }
  }  
  break;  
case 2:
  for (i = 0; i < 10; i++) {
    myOption=new Option();
  myOption.text="+ " + arrHits[i];
  if (window.document.form1.g3effect2.selectedIndex > 0)
   { insertIndex=window.document.form1.g3effect2.selectedIndex; }
   else
    { insertIndex=window.document.form1.g3effect2.options.length;
   window.document.form1.g3effect2.options[insertIndex]=myOption; }
  }
    myOption=new Option();
  myOption.text= 'HP';
  if (window.document.form1.line3.selectedIndex > 0)
      {   insertIndex=window.document.form1.line3.selectedIndex; }
       else
         { insertIndex=window.document.form1.line3.options.length;
  window.document.form1.line3.options[insertIndex]=myOption; }
  break;  
case 3:
  for (i = 0; i < 10; i++) {
    myOption=new Option();
  myOption.text="+ " + arrPower[i];
  if (window.document.form1.g3effect2.selectedIndex > 0)
   { insertIndex=window.document.form1.g3effect2.selectedIndex; }
   else
   { insertIndex=window.document.form1.g3effect2.options.length;
   window.document.form1.g3effect2.options[insertIndex]=myOption; }
  }
  myOption=new Option();
  myOption.text= 'mana';
  if (window.document.form1.line3.selectedIndex > 0)
        { insertIndex=window.document.form1.line3.selectedIndex; }
       else
        { insertIndex=window.document.form1.line3.options.length;
  window.document.form1.line3.options[insertIndex]=myOption; }
  break;      
case 4:
  for (i = 0; i < 10; i++) {
    myOption=new Option();
  myOption.text="+ " + arrFocus[i];
  if (window.document.form1.g3effect2.selectedIndex > 0)
   { insertIndex=window.document.form1.g3effect2.selectedIndex; }
   else
   { insertIndex=window.document.form1.g3effect2.options.length;
   window.document.form1.g3effect2.options[insertIndex]=myOption; }
  }
  switch (window.document.form1.realm.selectedIndex) {
    case 0:
	  for (i = 0; i < 8; i++) {
       myOption=new Option();
       myOption.text= arrFocusUsedAlb[i];
       if (window.document.form1.line3.selectedIndex > 0)
        {  insertIndex=window.document.form1.line3.selectedIndex; }
       else
        { insertIndex=window.document.form1.line3.options.length;
       window.document.form1.line3.options[insertIndex]=myOption;}
        }  
	   break;
    case 1:
	  for (i = 0; i < 8; i++) {
       myOption=new Option();
       myOption.text= arrFocusUsedHib[i];
       if (window.document.form1.line3.selectedIndex > 0)
        { insertIndex=window.document.form1.line3.selectedIndex; }
       else
        { insertIndex=window.document.form1.line3.options.length;
       window.document.form1.line3.options[insertIndex]=myOption; }
        }  
	   break;
    case 2:
	  for (i = 0; i < 4; i++) {
       myOption=new Option();
       myOption.text= arrFocusUsedMid[i];
       if (window.document.form1.line3.selectedIndex > 0)
        { insertIndex=window.document.form1.line3.selectedIndex; }
       else
        { insertIndex=window.document.form1.line3.options.length;
       window.document.form1.line3.options[insertIndex]=myOption; }
        }  
	   break;	   	   
	}
  break;  
case 5:
  for (i = 0; i < 8; i++) {
    myOption=new Option();
  myOption.text="+ " + arrSkills[i];
  if (window.document.form1.g3effect2.selectedIndex > 0)
   { insertIndex=window.document.form1.g3effect2.selectedIndex; }
   else
   { insertIndex=window.document.form1.g3effect2.options.length;
   window.document.form1.g3effect2.options[insertIndex]=myOption; }
  }

    switch (window.document.form1.realm.selectedIndex) {
    case 0:
	  for (i = 0; i < 31; i++) {
       myOption=new Option();
       myOption.text= arrSkillsUsedAlb[i];
       if (window.document.form1.line3.selectedIndex > 0)
        { insertIndex=window.document.form1.line3.selectedIndex; }
       else
        { insertIndex=window.document.form1.line3.options.length;
       window.document.form1.line3.options[insertIndex]=myOption; }
        }  
	   break;
    case 1:
	  for (i = 0; i < 26; i++) {
       myOption=new Option();
       myOption.text= arrSkillsUsedHib[i];
       if (window.document.form1.line3.selectedIndex > 0)
        { insertIndex=window.document.form1.line3.selectedIndex; }
       else
        { insertIndex=window.document.form1.line3.options.length;
       window.document.form1.line3.options[insertIndex]=myOption; }
        }  
	   break;
    case 2:
	  for (i = 0; i < 25; i++) {
       myOption=new Option();
       myOption.text= arrSkillsUsedMid[i];
       if (window.document.form1.line3.selectedIndex > 0)
        { insertIndex=window.document.form1.line3.selectedIndex; }
       else
        { insertIndex=window.document.form1.line3.options.length;
       window.document.form1.line3.options[insertIndex]=myOption; }
        }  
	   break;	   	   
	}
  break;    
  }
}

// remise à 0 liste gemme 4

if ((elementUsed == 4) || (elementUsed == 5)) {

	
while (window.document.form1.g4effect2.options.length>0)
    {
	 deleteIndex=window.document.form1.g4effect2.options.length-1;
	 window.document.form1.g4effect2.options[deleteIndex]=null;
	}
while (window.document.form1.line4.options.length>0)
    {
	 deleteIndex=window.document.form1.line4.options.length-1;
	 window.document.form1.line4.options[deleteIndex]=null;
	}		

switch (window.document.form1.g4effect.selectedIndex) {
case 0:
  for (i = 0; i < 10; i++) {
  myOption=new Option();
  myOption.text="+ " + Math.floor(arrStats[i] * 1.5);
  if (window.document.form1.g4effect2.selectedIndex > 0)
   { insertIndex=window.document.form1.g4effect2.selectedIndex; }
   else
   { insertIndex=window.document.form1.g4effect2.options.length;
   window.document.form1.g4effect2.options[insertIndex]=myOption; }
  }
  for (i = 0; i < 8; i++) {
  myOption=new Option();
  myOption.text= arrStatsUsed[i];
  if (window.document.form1.line4.selectedIndex > 0)
   { insertIndex=window.document.form1.line4.selectedIndex; }
   else
    { insertIndex=window.document.form1.line4.options.length;
   window.document.form1.line4.options[insertIndex]=myOption;}
  }  
  break;
case 1:
  for (i = 0; i < 10; i++) {
    myOption=new Option();
  myOption.text="+ " + arrResist[i];
  if (window.document.form1.g4effect2.selectedIndex > 0)
    { insertIndex=window.document.form1.g4effect2.selectedIndex; }
   else
   { insertIndex=window.document.form1.g4effect2.options.length;
   window.document.form1.g4effect2.options[insertIndex]=myOption; }
  }
    for (i = 0; i < 9; i++) {
  myOption=new Option();
  myOption.text= arrResistUsed[i];
  if (window.document.form1.line4.selectedIndex > 0)
   { insertIndex=window.document.form1.line4.selectedIndex; }
   else
   { insertIndex=window.document.form1.line4.options.length;
   window.document.form1.line4.options[insertIndex]=myOption; }
  }  
  break;  
case 2:
  for (i = 0; i < 10; i++) {
    myOption=new Option();
  myOption.text="+ " + arrHits[i];
  if (window.document.form1.g4effect2.selectedIndex > 0)
   { insertIndex=window.document.form1.g4effect2.selectedIndex; }
   else
   { insertIndex=window.document.form1.g4effect2.options.length;
   window.document.form1.g4effect2.options[insertIndex]=myOption; }
  }
    myOption=new Option();
  myOption.text= 'HP';
  if (window.document.form1.line4.selectedIndex > 0)
      {   insertIndex=window.document.form1.line4.selectedIndex; }
       else
        {  insertIndex=window.document.form1.line4.options.length;
  window.document.form1.line4.options[insertIndex]=myOption; }
  break;  
case 3:

  for (i = 0; i < 10; i++) {
    myOption=new Option();
  myOption.text="+ " + arrPower[i];
  if (window.document.form1.g4effect2.selectedIndex > 0)
    { insertIndex=window.document.form1.g4effect2.selectedIndex; }
   else
   { insertIndex=window.document.form1.g4effect2.options.length;
   window.document.form1.g4effect2.options[insertIndex]=myOption;}
  }
  myOption=new Option();
  myOption.text= 'Mana';
  if (window.document.form1.line4.selectedIndex > 0)
       {  insertIndex=window.document.form1.line4.selectedIndex; }
       else
        { insertIndex=window.document.form1.line4.options.length;
  window.document.form1.line4.options[insertIndex]=myOption; }
  break;      
case 4:
  for (i = 0; i < 10; i++) {
    myOption=new Option();
  myOption.text="+ " + arrFocus[i];
  if (window.document.form1.g4effect2.selectedIndex > 0)
    { insertIndex=window.document.form1.g4effect2.selectedIndex; }
   else
    { insertIndex=window.document.form1.g4effect2.options.length;
   window.document.form1.g4effect2.options[insertIndex]=myOption; }
  }
  switch (window.document.form1.realm.selectedIndex) {
    case 0:
	  for (i = 0; i < 8; i++) {
       myOption=new Option();
       myOption.text= arrFocusUsedAlb[i];
       if (window.document.form1.line4.selectedIndex > 0)
        { insertIndex=window.document.form1.line4.selectedIndex; }
       else
         { insertIndex=window.document.form1.line4.options.length;
       window.document.form1.line4.options[insertIndex]=myOption; }
        }  
	   break;
    case 1:
	  for (i = 0; i < 8; i++) {
       myOption=new Option();
       myOption.text= arrFocusUsedHib[i];
       if (window.document.form1.line4.selectedIndex > 0)
        { insertIndex=window.document.form1.line4.selectedIndex; }
       else
        { insertIndex=window.document.form1.line4.options.length;
       window.document.form1.line4.options[insertIndex]=myOption; }
        }  
	   break;
    case 2:
	  for (i = 0; i < 4; i++) {
       myOption=new Option();
       myOption.text= arrFocusUsedMid[i];
       if (window.document.form1.line4.selectedIndex > 0)
         { insertIndex=window.document.form1.line4.selectedIndex; }
       else
         { insertIndex=window.document.form1.line4.options.length;
       window.document.form1.line4.options[insertIndex]=myOption; }
        }  
	   break;	   	   
	}
  break;  
case 5:
  for (i = 0; i < 8; i++) {
    myOption=new Option();
  myOption.text="+ " + arrSkills[i];
  if (window.document.form1.g4effect2.selectedIndex > 0)
   { insertIndex=window.document.form1.g4effect2.selectedIndex; }
   else
   { insertIndex=window.document.form1.g4effect2.options.length;
   window.document.form1.g4effect2.options[insertIndex]=myOption; }
  }
    switch (window.document.form1.realm.selectedIndex) {
    case 0:
	  for (i = 0; i < 31; i++) {
       myOption=new Option();
       myOption.text= arrSkillsUsedAlb[i];
       if (window.document.form1.line4.selectedIndex > 0)
        { insertIndex=window.document.form1.line4.selectedIndex; }
       else
        { insertIndex=window.document.form1.line4.options.length;
       window.document.form1.line4.options[insertIndex]=myOption; }
        }  
	   break;
    case 1:
	  for (i = 0; i < 26; i++) {
       myOption=new Option();
       myOption.text= arrSkillsUsedHib[i];
       if (window.document.form1.line4.selectedIndex > 0)
        { insertIndex=window.document.form1.line4.selectedIndex; }
       else
        { insertIndex=window.document.form1.line4.options.length;
       window.document.form1.line4.options[insertIndex]=myOption; }
        }  
	   break;
    case 2:
	  for (i = 0; i < 25; i++) {
       myOption=new Option();
       myOption.text= arrSkillsUsedMid[i];
       if (window.document.form1.line4.selectedIndex > 0)
        { insertIndex=window.document.form1.line4.selectedIndex; }
       else
        { insertIndex=window.document.form1.line4.options.length;
       window.document.form1.line4.options[insertIndex]=myOption; }
        }  
	   break;	   	   
	}
  break;    
  }
}
var j = window.document.form1.material.selectedIndex;
var k = window.document.form1.material.options[j].text;
var l = eval(k);
var imbue_level = 52 - window.document.form1.material.selectedIndex;
imbue_level = imbue_level - 2;
var imbue_qual = window.document.form1.quality.selectedIndex;
var imbue_points = marrImbue[imbue_level][imbue_qual];
window.document.form1.itemcap.value = imbue_points;

var t1 = window.document.form1.itemname.value + '\nBonus Magiques:\n';
var itemStrength1 = 0;
var itemStrength2 = 0;
var itemStrength3 = 0;
var itemStrength4 = 0;
var iRD1 = 0;
var iRD2 = 0;
var iRD3 = 0;
var strOutput = '';
var strOutput2 = '';
var iC = window.document.form1.g1effect.selectedIndex;
if (window.document.form1.g1effect.selectedIndex < 6) {
iRD1 = window.document.form1.realm.selectedIndex;
iRD2 = window.document.form1.g1effect2.selectedIndex;
iRD3 = window.document.form1.line1.selectedIndex;
switch (iC) {
 case 0:
   strOutput = strOutput + arrStatsName[iRD3] + ' ' + arrGemStrength[iRD2] +'\n';
   strOutput2 = strOutput2 +'1 ' + arrGemStrGem[iRD2] + ' / ' + arrGemStrMat1a[iRD2] + ' ' + arrStatsMat1[iRD3] + ' / ' + arrGemStrMat2[iRD2] + ' ' + arrStatsMat2[iRD3] +'\n';
   break;
 case 1:
   strOutput = strOutput + arrResistName[iRD3] + ' ' + arrGemStrength[iRD2] +'\n';
   strOutput2 = strOutput2 +'1 ' + arrGemStrGem[iRD2] + ' / ' + arrGemStrMat1b[iRD2] + ' ' + arrResistMat1[iRD3] + ' / ' + arrGemStrMat2[iRD2] + ' ' + arrResistMat2[iRD3] +'\n';
   break;
 case 2:
   strOutput = strOutput + 'Joyau d\'Essence Sanguine ' + arrGemStrength[iRD2] + '\n';
   strOutput2 = strOutput2 + '1 ' + arrGemStrGem[iRD2] + ' / ' + arrGemStrMat1a[iRD2] + ' Essence de vie / ' + arrGemStrMat2[iRD2] + ' Sang de GÃ©ant\n';
   break;
 case 3:
   strOutput = strOutput + 'Joyau d\'essence Mystique ' + arrGemStrength[iRD2] + '\n';  
   strOutput2 = strOutput2 + '1 ' + arrGemStrGem[iRD2] + ' / ' + arrGemStrMat1a[iRD2] + ' Essence de vie / ' + arrGemStrMat2[iRD2] + ' Energie Mystique \n'; 
   break;
 case 4:
   switch (iRD1) {
     case 0:
     strOutput = strOutput + arrFocusAlbName[iRD3] + ' ' + arrGemStrength[iRD2] + '\n';
     strOutput2 = strOutput2 + '1 ' + arrGemStrGem[iRD2] + ' / ' + arrGemStrMat1b[iRD2] + ' ' + arrFocusAlbMat1[iRD3] + ' / ' + arrGemStrMat2[iRD2] + ' ' + arrFocusAlbMat2[iRD3] +'\n';
	 break;
     case 1:
     strOutput = strOutput + arrFocusHibName[iRD3] + ' ' + arrGemStrength[iRD2] + '\n';
     strOutput2 = strOutput2 + '1 ' + arrGemStrGem[iRD2] + ' / ' + arrGemStrMat1b[iRD2] + ' ' + arrFocusHibMat1[iRD3] + ' / ' + arrGemStrMat2[iRD2] + ' ' + arrFocusHibMat2[iRD3] +'\n';
	 break;
	 case 2:
     strOutput = strOutput + arrFocusMidName[iRD3] + ' ' + arrGemStrength[iRD2] + '\n';
     strOutput2 = strOutput2 + '1 ' + arrGemStrGem[iRD2] + ' / ' + arrGemStrMat1b[iRD2] + ' ' + arrFocusMidMat1[iRD3] + ' / ' + arrGemStrMat2[iRD2] + ' ' + arrFocusMidMat2[iRD3] +'\n';
	 break;	 
	 }
   break;
 case 5:
   switch (iRD1) {
     case 0:
     strOutput = strOutput + arrSkillsAlbName[iRD3] + ' ' + arrGemStrength[iRD2] +'\n';
     strOutput2 = strOutput2 + '1 ' + arrGemStrGem[iRD2] + ' / ' + arrGemStrMat1a[iRD2] + ' ' + arrSkillsAlbMat1[iRD3] + ' / ' + arrGemStrMat2[iRD2] + ' ' + arrSkillsAlbMat2[iRD3] +'\n';
	 break;
     case 1:
     strOutput = strOutput + arrSkillsHibName[iRD3] + ' ' + arrGemStrength[iRD2] +'\n';
     strOutput2 = strOutput2 + '1 ' + arrGemStrGem[iRD2] + ' / ' + arrGemStrMat1a[iRD2] + ' ' + arrSkillsHibMat1[iRD3] + ' / ' + arrGemStrMat2[iRD2] + ' ' + arrSkillsHibMat2[iRD3] +'\n';
	 break;
	 case 2:
     strOutput = strOutput + arrSkillsMidName[iRD3] + ' ' + arrGemStrength[iRD2] +'\n';
     strOutput2 = strOutput2 + '1 ' + arrGemStrGem[iRD2] + ' / ' + arrGemStrMat1a[iRD2] + ' ' + arrSkillsMidMat1[iRD3] + ' / ' + arrGemStrMat2[iRD2] + ' ' + arrSkillsMidMat2[iRD3] +'\n';
	 break;	 
	 }
   break;            
}
}
if (iC == 3) { iC = 1; }
switch (iC) {
  case 0:
  
    itemStrength1 = (window.document.form1.g1effect2.selectedIndex * 2) + 1;
    break;
  case 1:
	if (window.document.form1.g1effect2.selectedIndex == 0) {
	  itemStrength1 = 1;
	}
	if (window.document.form1.g1effect2.selectedIndex == 1) {
	  itemStrength1 = 2;
	}	
	if (window.document.form1.g1effect2.selectedIndex == 2) {
	  itemStrength1 = 4;
	}			  
	if (window.document.form1.g1effect2.selectedIndex == 3) {
	  itemStrength1 = 8;
	}		
	if (window.document.form1.g1effect2.selectedIndex == 4) {
	  itemStrength1 = 12;
	}		
	if (window.document.form1.g1effect2.selectedIndex == 5) {
	  itemStrength1 = 16;
	}		
	if (window.document.form1.g1effect2.selectedIndex == 6) {
	  itemStrength1 = 20;
	}	
	if (window.document.form1.g1effect2.selectedIndex == 7) {
	  itemStrength1 = 24;
	}			
	if (window.document.form1.g1effect2.selectedIndex == 8) {
	  itemStrength1 = 28;
	}	
	if (window.document.form1.g1effect2.selectedIndex == 9) {
	  itemStrength1 = 32;
	}			


    break;	
  case 2:
    itemStrength1 = (window.document.form1.g1effect2.selectedIndex * 2);
	if (itemStrength1 > 0) { itemStrength1 = itemStrength1 + 1; }
	if (itemStrength1 == 0) { itemStrength1 = 1; }
    break;	
//  case 4:
//   itemStrength1 = 1;
  case 5:
    itemStrength1 = window.document.form1.g1effect2.selectedIndex * 5;
    if (itemStrength1 == 0) { itemStrength1 = 1; }
    break;
}

iC = window.document.form1.g2effect.selectedIndex;
if (window.document.form1.g2effect.selectedIndex < 6) {
iRD1 = window.document.form1.realm.selectedIndex;
iRD2 = window.document.form1.g2effect2.selectedIndex;
iRD3 = window.document.form1.line2.selectedIndex;

switch (iC) {
 case 0:
   strOutput = strOutput + arrStatsName[iRD3] + ' ' + arrGemStrength[iRD2] + '\n';
   strOutput2 = strOutput2 +'1 ' + arrGemStrGem[iRD2] + ' / ' + arrGemStrMat1a[iRD2] + ' ' + arrStatsMat1[iRD3] + ' / ' + arrGemStrMat2[iRD2] + ' ' + arrStatsMat2[iRD3] +'\n';
   break;
 case 1:
   strOutput = strOutput + arrResistName[iRD3] + ' ' + arrGemStrength[iRD2] +'\n';
   strOutput2 = strOutput2 +'1 ' + arrGemStrGem[iRD2] + ' / ' + arrGemStrMat1b[iRD2] + ' ' + arrResistMat1[iRD3] + ' / ' + arrGemStrMat2[iRD2] + ' ' + arrResistMat2[iRD3] +'\n';
   break;
 case 2:
   strOutput = strOutput + 'Joyau d\'Essence Sanguine ' + arrGemStrength[iRD2] + '\n';
   strOutput2 = strOutput2 + '1 ' + arrGemStrGem[iRD2] + ' / ' + arrGemStrMat1a[iRD2] + ' Essence de vie / ' + arrGemStrMat2[iRD2] + ' Sang de gÃ©ant\n';
   break;
 case 3:
   strOutput = strOutput + 'Joyau d\'Essence Mystique ' + arrGemStrength[iRD2] + '\n';  
   strOutput2 = strOutput2 + '1 ' + arrGemStrGem[iRD2] + ' / ' + arrGemStrMat1a[iRD2] + ' Essence de vie / ' + arrGemStrMat2[iRD2] + ' Energie mystique \n'; 
   break;
 case 4:
   switch (iRD1) {
     case 0:
     strOutput = strOutput + arrFocusAlbName[iRD3] + ' ' + arrGemStrength[iRD2] + '\n';
     strOutput2 = strOutput2 + '1 ' + arrGemStrGem[iRD2] + ' / ' + arrGemStrMat1b[iRD2] + ' ' + arrFocusAlbMat1[iRD3] + ' / ' + arrGemStrMat2[iRD2] + ' ' + arrFocusAlbMat2[iRD3] +'\n';
	 break;

     case 1:
     strOutput = strOutput + arrFocusHibName[iRD3] + ' ' + arrGemStrength[iRD2] + '\n';
     strOutput2 = strOutput2 + '1 ' + arrGemStrGem[iRD2] + ' / ' + arrGemStrMat1b[iRD2] + ' ' + arrFocusHibMat1[iRD3] + ' / ' + arrGemStrMat2[iRD2] + ' ' + arrFocusHibMat2[iRD3] +'\n';
	 break;
	 case 2:
     strOutput = strOutput + arrFocusMidName[iRD3] + ' ' + arrGemStrength[iRD2] + '\n';
     strOutput2 = strOutput2 + '1 ' + arrGemStrGem[iRD2] + ' / ' + arrGemStrMat1b[iRD2] + ' ' + arrFocusMidMat1[iRD3] + ' / ' + arrGemStrMat2[iRD2] + ' ' + arrFocusMidMat2[iRD3] +'\n';
	 break;	 
	 }
   break;
 case 5:
   switch (iRD1) {
     case 0:
     strOutput = strOutput + arrSkillsAlbName[iRD3] + ' ' + arrGemStrength[iRD2] + '\n';
     strOutput2 = strOutput2 + '1 ' + arrGemStrGem[iRD2] + ' / ' + arrGemStrMat1a[iRD2] + ' ' + arrSkillsAlbMat1[iRD3] + ' / ' + arrGemStrMat2[iRD2] + ' ' + arrSkillsAlbMat2[iRD3] +'\n';
	 break;
     case 1:
     strOutput = strOutput + arrSkillsHibName[iRD3] + ' ' + arrGemStrength[iRD2] +'\n';
     strOutput2 = strOutput2 + '1 ' + arrGemStrGem[iRD2] + ' / ' + arrGemStrMat1a[iRD2] + ' ' + arrSkillsHibMat1[iRD3] + ' / ' + arrGemStrMat2[iRD2] + ' ' + arrSkillsHibMat2[iRD3] +'\n';
	 break;
	 case 2:
     strOutput = strOutput + arrSkillsMidName[iRD3] + ' ' + arrGemStrength[iRD2] +'\n';
     strOutput2 = strOutput2 + '1 ' + arrGemStrGem[iRD2] + ' / ' + arrGemStrMat1a[iRD2] + ' ' + arrSkillsMidMat1[iRD3] + ' / ' + arrGemStrMat2[iRD2] + ' ' + arrSkillsMidMat2[iRD3] +'\n';
	 break;	 
	 }
   break;            
}
}
if (iC == 3) { iC = 1; }
switch (iC) {
  case 0:
    itemStrength2 = (window.document.form1.g2effect2.selectedIndex * 2) + 1;
    break;
  case 1:
	if (window.document.form1.g2effect2.selectedIndex == 0) {
	  itemStrength2 = 1;
	}
	if (window.document.form1.g2effect2.selectedIndex == 1) {
	  itemStrength2 = 2;
	}	
	if (window.document.form1.g2effect2.selectedIndex == 2) {
	  itemStrength2 = 4;
	}			  
	if (window.document.form1.g2effect2.selectedIndex == 3) {
	  itemStrength2 = 8;
	}		
	if (window.document.form1.g2effect2.selectedIndex == 4) {
	  itemStrength2 = 12;
	}		
	if (window.document.form1.g2effect2.selectedIndex == 5) {
	  itemStrength2 = 16;
	}		
	if (window.document.form1.g2effect2.selectedIndex == 6) {
	  itemStrength2 = 20;
	}	
	if (window.document.form1.g2effect2.selectedIndex == 7) {
	  itemStrength2 = 24;
	}			
	if (window.document.form1.g2effect2.selectedIndex == 8) {
	  itemStrength2 = 28;
	}	
	if (window.document.form1.g2effect2.selectedIndex == 9) {
	  itemStrength2 = 32;
	}	
    break;	
  case 2:
    itemStrength2 = (window.document.form1.g2effect2.selectedIndex * 2);

	// HP calc bug fix 9-11
    if (itemStrength2 > 0) { itemStrength2 = itemStrength2 + 1; }
	if (itemStrength2 == 0) { itemStrength2 = 1; }
    break;	
//  case 4:
//    itemStrength2 = 1;    
  case 5:
    itemStrength2 = window.document.form1.g2effect2.selectedIndex * 5;
    if (itemStrength2 == 0) { itemStrength2 = 1; }
    break;
}

iC = window.document.form1.g3effect.selectedIndex;
if (window.document.form1.g3effect.selectedIndex < 6) {
iRD1 = window.document.form1.realm.selectedIndex;
iRD2 = window.document.form1.g3effect2.selectedIndex;
iRD3 = window.document.form1.line3.selectedIndex;
switch (iC) {
 case 0:
   strOutput = strOutput + arrStatsName[iRD3] + ' ' + arrGemStrength[iRD2] + '\n';
   strOutput2 = strOutput2 +'1 ' + arrGemStrGem[iRD2] + ' / ' + arrGemStrMat1a[iRD2] + ' ' + arrStatsMat1[iRD3] + ' / ' + arrGemStrMat2[iRD2] + ' ' + arrStatsMat2[iRD3] +'\n';
   break;
 case 1:
   strOutput = strOutput + arrResistName[iRD3] + ' ' + arrGemStrength[iRD2] + '\n';
   strOutput2 = strOutput2 +'1 ' + arrGemStrGem[iRD2] + ' / ' + arrGemStrMat1b[iRD2] + ' ' + arrResistMat1[iRD3] + ' / ' + arrGemStrMat2[iRD2] + ' ' + arrResistMat2[iRD3] +'\n';
   break;
 case 2:
   strOutput = strOutput + 'Joyau d\'Essence Sanguine ' + arrGemStrength[iRD2] + '\n';
   strOutput2 = strOutput2 + '1 ' + arrGemStrGem[iRD2] + ' / ' + arrGemStrMat1a[iRD2] + ' Essence de vie / ' + arrGemStrMat2[iRD2] + ' Sang de gÃ©ant\n';
   break;
 case 3:
   strOutput = strOutput + 'Joyau d\'Essence Mystique ' + arrGemStrength[iRD2] + '\n';  
   strOutput2 = strOutput2 + '1 ' + arrGemStrGem[iRD2] + ' / ' + arrGemStrMat1a[iRD2] + ' Essence de vie / ' + arrGemStrMat2[iRD2] + ' Energie mystique \n'; 
   break;
 case 4:
   switch (iRD1) {
     case 0:
     strOutput = strOutput + arrFocusAlbName[iRD3] + ' ' + arrGemStrength[iRD2] + '\n';
     strOutput2 = strOutput2 + '1 ' + arrGemStrGem[iRD2] + ' / ' + arrGemStrMat1b[iRD2] + ' ' + arrFocusAlbMat1[iRD3] + ' / ' + arrGemStrMat2[iRD2] + ' ' + arrFocusAlbMat2[iRD3] +'\n';
	 break;
     case 1:
     strOutput = strOutput + arrFocusHibName[iRD3] + ' ' + arrGemStrength[iRD2] + '\n';
     strOutput2 = strOutput2 + '1 ' + arrGemStrGem[iRD2] + ' / ' + arrGemStrMat1b[iRD2] + ' ' + arrFocusHibMat1[iRD3] + ' / ' + arrGemStrMat2[iRD2] + ' ' + arrFocusHibMat2[iRD3] +'\n';
	 break;
	 case 2:
     strOutput = strOutput + arrFocusMidName[iRD3] + ' ' + arrGemStrength[iRD2] + '\n';
     strOutput2 = strOutput2 + '1 ' + arrGemStrGem[iRD2] + ' / ' + arrGemStrMat1b[iRD2] + ' ' + arrFocusMidMat1[iRD3] + ' / ' + arrGemStrMat2[iRD2] + ' ' + arrFocusMidMat2[iRD3] +'\n';
	 break;	 
	 }
   break;
 case 5:
   switch (iRD1) {
     case 0:
     strOutput = strOutput + arrSkillsAlbName[iRD3] + arrGemStrength[iRD2] + '\n';
     strOutput2 = strOutput2 + '1 ' + arrGemStrGem[iRD2] + ' / ' + arrGemStrMat1a[iRD2] + ' ' + arrSkillsAlbMat1[iRD3] + ' / ' + arrGemStrMat2[iRD2] + ' ' + arrSkillsAlbMat2[iRD3] +'\n';
	 break;
     case 1:
     strOutput = strOutput + arrSkillsHibName[iRD3] + arrGemStrength[iRD2] + '\n';
     strOutput2 = strOutput2 + '1 ' + arrGemStrGem[iRD2] + ' / ' + arrGemStrMat1a[iRD2] + ' ' + arrSkillsHibMat1[iRD3] + ' / ' + arrGemStrMat2[iRD2] + ' ' + arrSkillsHibMat2[iRD3] +'\n';
	 break;
	 case 2:
     strOutput = strOutput + arrSkillsMidName[iRD3] + arrGemStrength[iRD2] + '\n';
     strOutput2 = strOutput2 + '1 ' + arrGemStrGem[iRD2] + ' / ' + arrGemStrMat1a[iRD2] + ' ' + arrSkillsMidMat1[iRD3] + ' / ' + arrGemStrMat2[iRD2] + ' ' + arrSkillsMidMat2[iRD3] +'\n';
	 break;	 
	 }
   break;            
}
}
if (iC == 3) { iC = 1; }
switch (iC) {
  case 0:
    itemStrength3 = (window.document.form1.g3effect2.selectedIndex * 2) + 1;
    break;
  case 1:
	if (window.document.form1.g3effect2.selectedIndex == 0) {
	  itemStrength3 = 1;
	}
	if (window.document.form1.g3effect2.selectedIndex == 1) {
	  itemStrength3 = 2;
	}	
	if (window.document.form1.g3effect2.selectedIndex == 2) {
	  itemStrength3 = 4;
	}			  
	if (window.document.form1.g3effect2.selectedIndex == 3) {
	  itemStrength3 = 8;
	}		
	if (window.document.form1.g3effect2.selectedIndex == 4) {
	  itemStrength3 = 12;
	}		
	if (window.document.form1.g3effect2.selectedIndex == 5) {
	  itemStrength3 = 16;
	}		
	if (window.document.form1.g3effect2.selectedIndex == 6) {
	  itemStrength3 = 20;
	}	
	if (window.document.form1.g3effect2.selectedIndex == 7) {
	  itemStrength3 = 24;
	}			
	if (window.document.form1.g3effect2.selectedIndex == 8) {
	  itemStrength3 = 28;
	}	
	if (window.document.form1.g3effect2.selectedIndex == 9) {
	  itemStrength3 = 32;
	}	
    break;	
  case 2:
    itemStrength3 = (window.document.form1.g3effect2.selectedIndex * 2);
    if (itemStrength3 > 0) { itemStrength3 = itemStrength3 + 1; } // HP calc bug fix 9-11
	if (itemStrength3 == 0) { itemStrength3 = 1; }
    break;	
//  case 4:
//    itemStrength3 = 1;    
  case 5:

    itemStrength3 = window.document.form1.g3effect2.selectedIndex * 5;
    if (itemStrength3 == 0) { itemStrength3 = 1; }
    break;
}

iC = window.document.form1.g4effect.selectedIndex;
if (window.document.form1.g4effect.selectedIndex < 6) {
iRD1 = window.document.form1.realm.selectedIndex;
iRD2 = window.document.form1.g4effect2.selectedIndex;
iRD3 = window.document.form1.line4.selectedIndex;
switch (iC) {
 case 0:
   strOutput = strOutput + arrStatsName[iRD3] + ' ' + arrGemStrength[iRD2] + '\n';
   strOutput2 = strOutput2 +'1 ' + arrGemStrGem[iRD2] + ' / ' + arrGemStrMat1a[iRD2] + ' ' + arrStatsMat1[iRD3] + ' / ' + arrGemStrMat2[iRD2] + ' ' + arrStatsMat2[iRD3] +'\n';
   break;
 case 1:
   strOutput = strOutput + arrResistName[iRD3] + ' ' + arrGemStrength[iRD2] + '\n';
   strOutput2 = strOutput2 +'1 ' + arrGemStrGem[iRD2] + ' / ' + arrGemStrMat1b[iRD2] + ' ' + arrResistMat1[iRD3] + ' / ' + arrGemStrMat2[iRD2] + ' ' + arrResistMat2[iRD3] +'\n';
   break;
 case 2:
   strOutput = strOutput + 'Joyau d\'Essence Sanguine ' + arrGemStrength[iRD2] + '\n';
   strOutput2 = strOutput2 + '1 ' + arrGemStrGem[iRD2] + ' / ' + arrGemStrMat1a[iRD2] + ' Essence de vie / ' + arrGemStrMat2[iRD2] + ' Sang de gÃ©ant\n';
   break;
 case 3:
   strOutput = strOutput + 'Joyau d\'Essence Mystique ' + arrGemStrength[iRD2] + '\n';  
   strOutput2 = strOutput2 + '1 ' + arrGemStrGem[iRD2] + ' / ' + arrGemStrMat1a[iRD2] + ' Essence de vie / ' + arrGemStrMat2[iRD2] + ' Energie mystique \n'; 
   break;

 case 4:
   switch (iRD1) {
     case 0:
     strOutput = strOutput + arrFocusAlbName[iRD3] + ' ' + arrGemStrength[iRD2] + '\n';
     strOutput2 = strOutput2 + '1 ' + arrGemStrGem[iRD2] + ' / ' + arrGemStrMat1b[iRD2] + ' ' + arrFocusAlbMat1[iRD3] + ' / ' + arrGemStrMat2[iRD2] + ' ' + arrFocusAlbMat2[iRD3] +'\n';
	 break;
     case 1:
     strOutput = strOutput + arrFocusHibName[iRD3] + ' ' + arrGemStrength[iRD2] + '\n';
     strOutput2 = strOutput2 + '1 ' + arrGemStrGem[iRD2] + ' / ' + arrGemStrMat1b[iRD2] + ' ' + arrFocusHibMat1[iRD3] + ' / ' + arrGemStrMat2[iRD2] + ' ' + arrFocusHibMat2[iRD3] +'\n';
	 break;
	 case 2:
     strOutput = strOutput + arrFocusMidName[iRD3] + ' ' + arrGemStrength[iRD2] + '\n';
     strOutput2 = strOutput2 + '1 ' + arrGemStrGem[iRD2] + ' / ' + arrGemStrMat1b[iRD2] + ' ' + arrFocusMidMat1[iRD3] + ' / ' + arrGemStrMat2[iRD2] + ' ' + arrFocusMidMat2[iRD3] +'\n';
	 break;	 
	 }
   break;
 case 5:
   switch (iRD1) {
     case 0:
     strOutput = strOutput + arrSkillsAlbName[iRD3] + ' ' + arrGemStrength[iRD2] + '\n';
     strOutput2 = strOutput2 + '1 ' + arrGemStrGem[iRD2] + ' / ' + arrGemStrMat1a[iRD2] + ' ' + arrSkillsAlbMat1[iRD3] + ' / ' + arrGemStrMat2[iRD2] + ' ' + arrSkillsAlbMat2[iRD3] +'\n';
	 break;
     case 1:
     strOutput = strOutput + arrSkillsHibName[iRD3] + ' ' + arrGemStrength[iRD2] + '\n';
     strOutput2 = strOutput2 + '1 ' + arrGemStrGem[iRD2] + ' / ' + arrGemStrMat1a[iRD2] + ' ' + arrSkillsHibMat1[iRD3] + ' / ' + arrGemStrMat2[iRD2] + ' ' + arrSkillsHibMat2[iRD3] +'\n';
	 break;
	 case 2:
     strOutput = strOutput + arrSkillsMidName[iRD3] + ' ' + arrGemStrength[iRD2] + '\n';
     strOutput2 = strOutput2 + '1 ' + arrGemStrGem[iRD2] + ' / ' + arrGemStrMat1a[iRD2] + ' ' + arrSkillsMidMat1[iRD3] + ' / ' + arrGemStrMat2[iRD2] + ' ' + arrSkillsMidMat2[iRD3] +'\n';
	 break;	 
	 }
   break;            
}
}
if (iC == 3) { iC = 1; }
switch (iC) {
  case 0:
    itemStrength4 = (window.document.form1.g4effect2.selectedIndex * 2) + 1;
    break;
  case 1:
	if (window.document.form1.g4effect2.selectedIndex == 0) {
	  itemStrength4 = 1;
	}
	if (window.document.form1.g4effect2.selectedIndex == 1) {
	  itemStrength4 = 2;
	}	
	if (window.document.form1.g4effect2.selectedIndex == 2) {
	  itemStrength4 = 4;
	}			  
	if (window.document.form1.g4effect2.selectedIndex == 3) {
	  itemStrength4 = 8;
	}		
	if (window.document.form1.g4effect2.selectedIndex == 4) {
	  itemStrength4 = 12;
	}		
	if (window.document.form1.g4effect2.selectedIndex == 5) {
	  itemStrength4 = 16;
	}		
	if (window.document.form1.g4effect2.selectedIndex == 6) {
	  itemStrength4 = 20;
	}	
	if (window.document.form1.g4effect2.selectedIndex == 7) {
	  itemStrength4 = 24;
	}			
	if (window.document.form1.g4effect2.selectedIndex == 8) {
	  itemStrength4 = 28;
	}	
	if (window.document.form1.g4effect2.selectedIndex == 9) {
	  itemStrength4 = 32;
	}	
    break;	
  case 2:
    itemStrength4 = (window.document.form1.g4effect2.selectedIndex * 2);

	// HP calc bug fix 9-11
    if (itemStrength4 > 0) { itemStrength4 = itemStrength4 + 1; }
	if (itemStrength4 == 0) { itemStrength4 = 1; }
    break;	
//  case 4:
//    itemStrength4 = 1;    
  case 5:
    itemStrength4 = window.document.form1.g4effect2.selectedIndex * 5;
    if (itemStrength4 == 0) { itemStrength4 = 1; }
    break;
}
if (window.document.form1.g1effect.selectedIndex == 4) { itemStrength1 = 1; }
if (window.document.form1.g2effect.selectedIndex == 4) { itemStrength2 = 1; }
if (window.document.form1.g3effect.selectedIndex == 4) { itemStrength3 = 1; }
if (window.document.form1.g4effect.selectedIndex == 4) { itemStrength4 = 1; }

if ((itemStrength4 >= itemStrength2) && (itemStrength4 >= itemStrength3) && (itemStrength4 >= itemStrength1)) { itemStrength4 = itemStrength4 * 2; }
if ((itemStrength3 >= itemStrength2) && (itemStrength3 >= itemStrength1) && (itemStrength3 >= itemStrength4)) { itemStrength3 = itemStrength3 * 2; }
if ((itemStrength2 >= itemStrength1) && (itemStrength2 >= itemStrength3) && (itemStrength2 >= itemStrength4)) { itemStrength2 = itemStrength2 * 2; }
if ((itemStrength1 >= itemStrength2) && (itemStrength1 >= itemStrength3) && (itemStrength1 >= itemStrength4)) { itemStrength1 = itemStrength1 * 2; }


itemStrength = itemStrength1 + itemStrength2 + itemStrength3 + itemStrength4;
if (itemStrength > 0) { var i9 = Math.floor( itemStrength / 2); }
if (itemStrength < 1) { var i9 = 0; }
if (i9 > window.document.form1.itemcap.value) { window.document.form1.overcharge.value = 'Oui'; } else { window.document.form1.overcharge.value = 'Non'; }
i9 = i9 - 5;
if (i9 > window.document.form1.itemcap.value) { window.document.form1.overcharge.value = 'Impossible'; }
if (((i9 + 5) > window.document.form1.itemcap.value) && (i9 <= window.document.form1.itemcap.value)) {
window.document.form1.oversuccess.value = 'BOOM!';
 var intOC = (i9 + 5) - window.document.form1.itemcap.value;
 var intOCC = 0;
 switch (intOC) {
   case 1:
      intOCC = -10;
	  break;
   case 2:
      intOCC = -20;
	  break;
   case 3:
      intOCC = -30;
	  break;
   case 4:
      intOCC = -50;
	  break;
   case 5:
      intOCC = -70;
	  break;
	  } 
 intES = window.document.form1.g1effect.selectedIndex;
 if (intES < 6) {
  switch (window.document.form1.g1qual.selectedIndex) {
  case 2:
      intOCC = intOCC + 1;
	  break;
  case 3:
      intOCC = intOCC + 3;
	  break;	  
  case 4:
      intOCC = intOCC + 5;
	  break;	  
  case 5:
      intOCC = intOCC + 8;
	  break;	  
  case 6:
      intOCC = intOCC + 11;
	  break;	  
  } }
 intES = window.document.form1.g2effect.selectedIndex;
 if ( intES < 6) {
  switch (window.document.form1.g2qual.selectedIndex) {
  case 2:
      intOCC = intOCC + 1;
	  break;
  case 3:
      intOCC = intOCC + 3;
	  break;	  
  case 4:
      intOCC = intOCC + 5;
	  break;	  
  case 5:
      intOCC = intOCC + 8;
	  break;	  
  case 6:
      intOCC = intOCC + 11;
	  break;	  
  } }
 intES = window.document.form1.g3effect.selectedIndex;
 if ( intES < 6) { 
  switch (window.document.form1.g3qual.selectedIndex) {
  case 2:
      intOCC = intOCC + 1;
	  break;
  case 3:
      intOCC = intOCC + 3;
	  break;	  
  case 4:
      intOCC = intOCC + 5;
	  break;	  
  case 5:
      intOCC = intOCC + 8;
	  break;	  
  case 6:
      intOCC = intOCC + 11;
	  break;	  
  }
  }
 intES = window.document.form1.g4effect.selectedIndex;
 if ( intES < 6) {
  switch (window.document.form1.g4qual.selectedIndex) {
  case 2:
      intOCC = intOCC + 1;
	  break;
  case 3:
      intOCC = intOCC + 3;
	  break;	  
  case 4:
      intOCC = intOCC + 5;
	  break;	  
  case 5:
      intOCC = intOCC + 8;
	  break;	  
  case 6:
      intOCC = intOCC + 11;
	  break;	  
  }
  }
switch (window.document.form1.quality.selectedIndex) {
 case 2:
      intOCC = intOCC + 6;
	  break;

 case 3:
      intOCC = intOCC + 8;
	  break;
  case 4:
      intOCC = intOCC + 10;
	  break;	  
  case 5:
      intOCC = intOCC + 18;
	  break;	  
  case 6:
      intOCC = intOCC + 26;
	  break;	  
	  }
var intSkill = window.document.form1.skill.value;
var intSkillMod = -500;
if (intSkill > 50) { intSkillMod = -45; }
if (intSkill > 100) { intSkillMod = -40; }
if (intSkill > 150) { intSkillMod = -35; }
if (intSkill > 200) { intSkillMod = -30; }
if (intSkill > 250) { intSkillMod = -25; }
if (intSkill > 300) { intSkillMod = -20; }
if (intSkill > 350) { intSkillMod = -15; }
if (intSkill > 400) { intSkillMod = -10; }
if (intSkill > 450) { intSkillMod = -5; }
if (intSkill > 500) { intSkillMod = 0; }
if (intSkill > 550) { intSkillMod = 5; }
if (intSkill > 600) { intSkillMod = 10; }
if (intSkill > 650) { intSkillMod = 15; }
if (intSkill > 700) { intSkillMod = 20; }
if (intSkill > 750) { intSkillMod = 25; }
if (intSkill > 800) { intSkillMod = 30; }
if (intSkill > 850) { intSkillMod = 35; }
if (intSkill > 900) { intSkillMod = 40; }
if (intSkill > 950) { intSkillMod = 45; }
if (intSkill > 1000) { intSkillMod = 50; }
intOCC = intOCC + intSkillMod;
if (intOCC > 100) { intOCC = 100; }
if (intOCC > 0) { window.document.form1.oversuccess.value = intOCC + ' %'; }


 } else {
window.document.form1.oversuccess.value = 'N/A'; 
 }


t1 = t1 + doOutputLine(window.document.form1.g1effect.selectedIndex, window.document.form1.g1effect2.selectedIndex, window.document.form1.line1.selectedIndex, window.document.form1.realm.selectedIndex);
t1 = t1 + doOutputLine(window.document.form1.g2effect.selectedIndex, window.document.form1.g2effect2.selectedIndex, window.document.form1.line2.selectedIndex, window.document.form1.realm.selectedIndex);
t1 = t1 + doOutputLine(window.document.form1.g3effect.selectedIndex, window.document.form1.g3effect2.selectedIndex, window.document.form1.line3.selectedIndex, window.document.form1.realm.selectedIndex);
t1 = t1 + doOutputLine(window.document.form1.g4effect.selectedIndex, window.document.form1.g4effect2.selectedIndex, window.document.form1.line4.selectedIndex, window.document.form1.realm.selectedIndex); 
t1 = t1 + '\nQualitÃ©: ' + window.document.form1.quality.options[window.document.form1.quality.selectedIndex].text + '%';
window.document.form1.itemstr.value = (i9 + 5);
window.document.form1.output.value = t1;
window.document.form1.recipe.value = strOutput;
window.document.form1.ingredients.value = strOutput2;	
		
}

// Mise en version FranÃ§aise par Draeli Ys Hibernia et Zeta Archer 50 Ys Hibernia
// Contacte : draeli@draeli.com
// Site : www.draeli.com
// Merci de ne pas virer ces commentaires par reconnaissance pour le travail effectuÃ©
