var as = 1;
var fontt;
function addChilds(das)
{
	var nam =das;

	if(das == "main")
	{
	var tdr = document.getElementById("main");
	removeChilds(fontt);
	fontt = tdr.getElementsByTagName('font').item(0);
	removeChilds(fontt);

	addChil(fontt,"main-balise.php","Balise HTML");
	addChil(fontt,"head-balise.php","Balise Head");
	addChil(fontt,"body-balise.php","Balise Body");
	addChil(fontt,"couleur-arriere-plan.php","Couleur arrière-plan");
	addChil(fontt,"image-de-fond.php","Image de fond");
	}
	else if(das == "textp")
	{
	var tdr = document.getElementById("textp");
	removeChilds(fontt);
	fontt = tdr.getElementsByTagName('font').item(0);
	removeChilds(fontt);

	addChil(fontt,"texte-proprietes.php","b,u,i,center,br");
	addChil(fontt,"line-list.php","hr,ur,li,ol");
	addChil(fontt,"espace-div.php","h1,espace,div");
	addChil(fontt,"pre-police.php","pre,font");
	addChil(fontt,"greve-pouvoir.php","la grève, le pouvoir");
	}
	else if(das == "links")
	{
	var tdr = document.getElementById("links");
	removeChilds(fontt);
	fontt = tdr.getElementsByTagName('font').item(0);
	removeChilds(fontt);

	addChil(fontt,"lien-de-base.php","Lien de base");
	addChil(fontt,"anchor-balise.php","Balise Anchor(a)");
	addChil(fontt,"lien-email.php","Lien email");
	}

	else if(das == "spe")
	{
	var tdr = document.getElementById("spe");
	removeChilds(fontt);
	fontt = tdr.getElementsByTagName('font').item(0);
	removeChilds(fontt);

	addChil(fontt,"deplacement-du-texte.php","Déplacement du texte");
	addChil(fontt,"marquee-balise.php","Balise Marquee");
	addChil(fontt,"texte-clignotant.php","Texte Clignotant");
	}
	else if(das == "tables")
	{
	var tdr = document.getElementById("tables");
	removeChilds(fontt);
	fontt = tdr.getElementsByTagName('font').item(0);
	removeChilds(fontt);

	addChil(fontt,"tableau-html.php","HTML Table");
	addChil(fontt,"tableau-des-frontieres.php","Tableau des frontières");
	addChil(fontt,"tableau-des-couleurs.php","Tableau des couleurs");
	addChil(fontt,"taille-de-la-table.php","Taille de la Table");
	addChil(fontt,"aligner-le-tableau.php","Aligner le tableau");
	addChil(fontt,"tableau-interieure.php","Tableau intérieure");
	addChil(fontt,"col-span.php","Col Span");
	addChil(fontt,"row-span.php","Row Span");
	}
	/*else if(das == "forms")
	{
	var tdr = document.getElementById("forms");
	removeChilds(fontt);
	fontt = tdr.getElementsByTagName('font').item(0);
	removeChilds(fontt);

	addChil(fontt,"form1.php","Basic Types");
	addChil(fontt,"text-field.php","Text Fields");
	addChil(fontt,"form-button.php","Buttons");
	addChil(fontt,"form-radiobutton.php","Radio Button");
	addChil(fontt,"form-checkbox.php","CheckBox");
	addChil(fontt,"form-textarea.php","TextArea");
	addChil(fontt,"form-combobox.php","Select Box");
	addChil(fontt,"form8.php","Password Field");
	addChil(fontt,"form9.php","Label");
	}
	else if(das == "others")
	{
	var tdr = document.getElementById("others");
	removeChilds(fontt);
	fontt = tdr.getElementsByTagName('font').item(0);
	removeChilds(fontt);

	addChil(fontt,"specialCharacter.php","Special Characters");
	addChil(fontt,"redirect.php","Page Redirect");
	addChil(fontt,"autorefresh.php","Auto Refresh");
	addChil(fontt,"iframe.php","IFrame");
	addChil(fontt,"favicon.php","AddressBar Icon");
	addChil(fontt,"css.php","Simple CSS");
	}*/

}

function removeChilds(fontt)
{
	if(fontt != null)
	{
		while(fontt.hasChildNodes() && fontt.childNodes.length> 1)
		{	
		if(as > 1)
		{
		fontt.removeChild(fontt.lastChild);
		}
		as = as+1;
		}
	}
}

var love = "yes";
function addChil(parent,linkname,textname)
{

var breaka = document.createElement("br");
var divs= document.createElement("div");
var link = document.createElement("a");
link.setAttribute("href",linkname);
link.style.color="#aa300a";
divs.style.marginLeft="8px";
divs.style.marginRight="4px";
divs.style.paddingLeft="3px";
divs.style.fontSize="11px";
divs.style.lineHeight="16px";
divs.style.border="0px green solid";

if(love == "yes")
{
divs.style.backgroundColor="#beefec";
love = "no";
}
else
{
divs.style.backgroundColor="#dfffdf";
love = "yes";
}
link.style.textDecoration="none";
//link.setAttribute("style","background-color: white;");

var name = document.createTextNode(textname);
//parent.appendChild(breaka);
parent.appendChild(divs);
divs.appendChild(link);
link.appendChild(name);
}

