var as = 1;
var fontt;
var expo;


function addChilds(das,exps)
{
	var nam =das;
	expo = exps;

	if(das == "none")
	{
		var tdr = document.getElementById("arrow");
		removeChilds(fontt);
		fontt = tdr.getElementsByTagName('font').item(0);
		removeChilds(fontt);
	}
	if(das == "cart")
	{
	var tdr = document.getElementById("cart");
	removeChilds(fontt);
	fontt = tdr.getElementsByTagName('font').item(0);
	removeChilds(fontt);

	addChil(fontt,"recipes_urdu.asp","Urdu Recipes");
	addChil(fontt,"recipies.asp","English Recipes");
	
	}
	else if(das == "life")
	{
	var tdr = document.getElementById("life");
	removeChilds(fontt);
	fontt = tdr.getElementsByTagName('font').item(0);
	removeChilds(fontt);

	addChil(fontt,"indiansongs_ta.asp","Indian Songs");
	addChil(fontt,"pakistanisongs_ta.asp","Pakistani Songs");
	addChil(fontt,"indian_pop.asp","Indian Pop");
	addChil(fontt,"bhangrasongs.asp","Bhangra Songs");
	addChil(fontt,"ghazals.asp","Ghazals");
	}
	else if(das == "arrow")
	{
	var tdr = document.getElementById("arrow");
	removeChilds(fontt);
	fontt = tdr.getElementsByTagName('font').item(0);
	removeChilds(fontt);

	//addChil(fontt,"freefilehosting.asp","Free Files Hosting");
	
	}
	else if(das == "travel")
	{
	var tdr = document.getElementById("travel");
	removeChilds(fontt);
	fontt = tdr.getElementsByTagName('font').item(0);
	removeChilds(fontt);
	addChil(fontt,"smsjokes.asp","Funny SMS");
	addChil(fontt,"ringtones.asp","Ringtones");
	//addChil(fontt,"webtosms.asp","Web 2 SMS");
	//addChil(fontt,"bgpics.asp","Background Pics");
	
	}
	else if(das == "sports")
	{
	var tdr = document.getElementById("sports");
	removeChilds(fontt);
	fontt = tdr.getElementsByTagName('font').item(0);
	removeChilds(fontt);

	addChil(fontt,"flash_games.asp","Flash Games");
	addChil(fontt,"jokes.asp","Fun Zone");
	
	}
	else if(das == "instrument")
	{
	var tdr = document.getElementById("instrument");
	removeChilds(fontt);
	fontt = tdr.getElementsByTagName('font').item(0);
	removeChilds(fontt);

	addChil(fontt,"beautytips01.asp","Beauty Tips");
	//addChil(fontt,"computer/index.php","Health Tips");
	addChil(fontt,"hairstylez.asp","Hair Styles");

	addChil(fontt,"hinadesigns.asp","Mehendi Designs");
	addChil(fontt,"FMalesModelz.asp","Female Models");
	addChil(fontt,"MalesModelz.asp","Male Models");
	}
	else if(das == "food")
	{
	var tdr = document.getElementById("food");
	removeChilds(fontt);
	fontt = tdr.getElementsByTagName('font').item(0);
	removeChilds(fontt);

	addChil(fontt,"downloads.asp","Softwares");
	addChil(fontt,"studystuff.asp","Study Stuff");
	
	}
	else if(das == "deco")
	{
	var tdr = document.getElementById("deco");
	removeChilds(fontt);
	fontt = tdr.getElementsByTagName('font').item(0);
	removeChilds(fontt);

	addChil(fontt,"http://www.quranexplorer.com/quran/","Online Quran");
	addChil(fontt,"w_isalm.asp","Islamic Calligraphy");
	addChil(fontt,"Naat.asp","Online Naat");
	addChil(fontt,"islamicthemes.asp","Themes");
	}
	else if(das == "nature")
	{
	var tdr = document.getElementById("nature");
	removeChilds(fontt);
	fontt = tdr.getElementsByTagName('font').item(0);
	removeChilds(fontt);

	addChil(fontt,"w_isalm.asp","Islamic");
	addChil(fontt,"w_nature.asp","Nature");
	addChil(fontt,"w_pakcelberities.asp","Pakistani Celebrities");
	addChil(fontt,"w_indianmovies.asp","Indian Movies");
	addChil(fontt,"w_indiancelbrities.asp","Indian Celebrities (F)");
	}
	else if(das == "symbols")
	{
		var tdr = document.getElementById("symbols");
		removeChilds(fontt);
		fontt = tdr.getElementsByTagName('font').item(0);
		removeChilds(fontt);
	
		addChil(fontt,"other_util.asp#w","World Wide Clock");
		addChil(fontt,"other_util.asp#t","Time & Weather");
		addChil(fontt,"other_util.asp#C","Currency Exchange");
		
	}


}

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",ajss+expo+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="#FDF2E1";
love = "no";
}
else
{
divs.style.backgroundColor="#FCE8C7";
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;
}