// _________________________________________
//
// Script par Episkey pour WFWP exclusivement
// Sous copyright
// Avant toute utilisation, contacter un admin de WFWP
// http://wfwp.forumactif.com 
// Contact : lily.episkeia@gmail.com
// _________________________________________

var reg_psd = />(?!<)([\w\x80-\xFF\-&#;\. ]*)</i;

var counter = 0;

var lastCat = 0;
var nomCats = new Array('start', 'kanto', 'archipel', 'johto', 'hoenn', 'sinnoh', 'hj');

var lastQeel = 0;
var nomQeel = new Array('qeel', 'stats', 'vingth');


function capture_pseudo(str)
{
	var content = reg_psd.exec(str);
	return content[1];
}

function capture_cat()
{
	document.write('<table class="CatDescris" style="width:764px;" id="' + nomCats[counter] + '">');	
	counter ++;
}

function change_cat(num)
{
	document.getElementById(nomCats[lastCat]).style.display = 'none';
	document.getElementById(nomCats[num]).style.display = 'block';
	document.getElementById('li_'+nomCats[lastCat]).style.background = 'none';
	document.getElementById('li_'+nomCats[num]).style.background = 'url(http://i11.servimg.com/u/f11/14/51/34/72/bouton10.jpg)';
	lastCat = num;
}

function change_qeel(num)
{
	document.getElementById(nomQeel[lastQeel]).style.display = 'none';
	document.getElementById(nomQeel[num]).style.display = 'block';
	document.getElementById('li_'+nomQeel[lastQeel]).style.background = 'none';
	document.getElementById('li_'+nomQeel[num]).style.background = 'url(http://i11.servimg.com/u/f11/14/51/34/72/bouton11.jpg)';
	lastQeel = num;
}

// _________________________________________
//
// Presentation
// _________________________________________


var zindexPrez = 2;
var lastLi = 'prezId';
	
var zindexPoke = 2;
	
function changePrez(nom)
	{
		document.getElementById(nom).style.zIndex = zindexPrez;
		document.getElementById('li_'+lastLi).style.color = '#3A211B';
		document.getElementById('li_'+lastLi).style.marginLeft = '0px';
		document.getElementById('li_'+nom).style.color = '#DCC5BA';
		document.getElementById('li_'+nom).style.marginLeft = '12px';
		lastLi = nom;
		zindexPrez ++;
	}
	
function changePoke(num)
	{
		document.getElementById('poke'+num).style.zIndex = zindexPoke;
		zindexPoke ++;
	}

