var as = 1;
var fontt;
function addChilds(das)
{
	var nam =das;

	if(das == "checked")
	{
	var tdr = document.getElementById("checked");
	removeChilds(fontt);
	fontt = tdr.getElementsByTagName('font').item(0);
	removeChilds(fontt);

	addChil(fontt,"index.php","Small Checked 1");
	addChil(fontt,"small-black-lines.php","Small Checked 2");
	addChil(fontt,"white-background.php","Small White BG");
	addChil(fontt,"black-background.php","Small Black BG");
	addChil(fontt,"big-dark-lines.php","Large Checked 1");
	addChil(fontt,"big-light-lines.php","Large Checked 2");
	addChil(fontt,"light-background.php","Large Checked BG");
	addChil(fontt,"dark-background.php","Large Checked BG");
	}
	else if(das == "vstrip")
	{
	var tdr = document.getElementById("vstrip");
	removeChilds(fontt);
	fontt = tdr.getElementsByTagName('font').item(0);
	removeChilds(fontt);

	addChil(fontt,"small-vertical-lines.php","Small Stripes 1");
	addChil(fontt,"small-vertical-stripes.php","Small Stripes 2");
	addChil(fontt,"big-vertical-stripes.php","Large Stripes 1");
	addChil(fontt,"large-vertical-lines.php","Large Stripes 2");
	addChil(fontt,"vertical-stripes.php","Alternate Stripes");
	addChil(fontt,"vertical-stripes2.php","Alternate Stripes");
	}

}

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);
}

function changebg(cal)
{
var ss = document.getElementById('mann');
ss.style.backgroundColor = cal;
}