var as = 1;

var fontt;

var expo;





function addChilds(das,exps)

{
     //   alert(das);
        var home= "http://hscripts.com/freeimages/icons/";
      	var nam =das;

	expo = exps;

	/*	if(das == "none")

	{

		var tdr = document.getElementById("arrow");

//		alert(tdr);

		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,home+"medical/index.php","Medical");

	addChil(fontt,home+"money/index.php","Money");

	addChil(fontt,home+"christmas/index.php","Christmas");

	addChil(fontt,home+"cartoons/index.php","Cartoons");

	addChil(fontt,home+"clipart/index.php","others");

	}

	else if(das == "life")

	{

	var tdr = document.getElementById("life");

	removeChilds(fontt);

	fontt = tdr.getElementsByTagName('font').item(0);

	removeChilds(fontt);



        addChil(fontt,home+"wild-animals/index.php","Wild Animals");

	addChil(fontt,home+"domestic-animals/index.php","Domestic Animals");

	addChil(fontt,home+"sea-animals/index.php","Sea Lives");

	addChil(fontt,home+"birds/index.php","Birds");

	addChil(fontt,home+"human/index.php","Human");

	addChil(fontt,home+"religion/index.php","Religious");

	}

	

	else if(das == "travel")

	{

	var tdr = document.getElementById("travel");

	removeChilds(fontt);

	fontt = tdr.getElementsByTagName('font').item(0);

	removeChilds(fontt);



	addChil(fontt,home+"vehicle/index.php","Vehicles");

	addChil(fontt,home+"weapons/index.php","Weapons");

	}

	else if(das == "web")

	{

	var tdr = document.getElementById("web");

	removeChilds(fontt);

	fontt = tdr.getElementsByTagName('font').item(0);

	removeChilds(fontt);



	addChil(fontt,home+"web-basic-icons/index.php","Web Basic Icons");

	addChil(fontt,home+"mini-icons/index.php","Web Mini Icons");

	}

	else if(das == "sports")

	{

	var tdr = document.getElementById("sports");

	removeChilds(fontt);

	fontt = tdr.getElementsByTagName('font').item(0);

	removeChilds(fontt);



	addChil(fontt,home+"games/index.php","Sports");

	addChil(fontt,home+"chess/index.php","Chess");

	addChil(fontt,home+"chess2/index.php","Chess2");

	addChil(fontt,home+"gymnastics/index.php","Gymnastics");

	addChil(fontt,home+"olympic-games/index.php","Olympic Games");

	}

	else if(das == "instrument")

	{

	var tdr = document.getElementById("instrument");

	removeChilds(fontt);

	fontt = tdr.getElementsByTagName('font').item(0);

	removeChilds(fontt);



	addChil(fontt,home+"instruments/index.php","General");

	addChil(fontt,home+"computer/index.php","Computer");

	addChil(fontt,home+"electronics/index.php","Electronics");

	addChil(fontt,home+"electrical/index.php","Electrical");

	addChil(fontt,home+"mechanical/index.php","Mechanical");

	addChil(fontt,home+"musical/index.php","Musical");

	}

	else if(das == "food")

	{

	var tdr = document.getElementById("food");

	removeChilds(fontt);

	fontt = tdr.getElementsByTagName('font').item(0);

	removeChilds(fontt);



	addChil(fontt,home+"food/index.php","Food");

	addChil(fontt,home+"fruits/index.php","Fruits");

	addChil(fontt,home+"vegetables/index.php","Vegetables");

	}

	else if(das == "deco")

	{

	var tdr = document.getElementById("deco");

	removeChilds(fontt);

	fontt = tdr.getElementsByTagName('font').item(0);

	removeChilds(fontt);



	addChil(fontt,home+"stationary/index.php","Stationary");

	addChil(fontt,home+"clothing/index.php","Clothing");

	addChil(fontt,home+"fashion/index.php","Fashion");

	addChil(fontt,home+"furniture/index.php","Furnitures");

	addChil(fontt,home+"stones/index.php","Gems & Stones");

	}

	else if(das == "nature")

	{

	var tdr = document.getElementById("nature");

	removeChilds(fontt);

	fontt = tdr.getElementsByTagName('font').item(0);

	removeChilds(fontt);



	addChil(fontt,home+"flowers/index.php","Flowers");

	addChil(fontt,home+"states-flowers/index.php","States Flowers");

	addChil(fontt,home+"trees/index.php","Tree");

	addChil(fontt,home+"nature/index.php","Others");

	addChil(fontt,home+"buildings/index.php","Buildings");

	}

	else if(das == "symbols")

	{

		var tdr = document.getElementById("symbols");

		removeChilds(fontt);

		fontt = tdr.getElementsByTagName('font').item(0);

		removeChilds(fontt);

	

		addChil(fontt,home+"symbols/famous/index.php","The Famous");

		addChil(fontt,home+"symbols/math/index.php","Math Signs");

		addChil(fontt,home+"symbols/shapes/index.php","Shapes");

		addChil(fontt,home+"symbols/geometrical-shapes/index.php","Geometrical Shapes");

		addChil(fontt,home+"symbols/greek/index.php","Greek Symbols");

		addChil(fontt,home+"symbols/hand-symbols/index.php","Hand Symbols");

		addChil(fontt,home+"symbols/planets/index.php","Planet Signs");

		addChil(fontt,home+"symbols/dollar-icons.php","Dollar Symbol");

	}



	else if(das == "traffic")

	{

		var tdr = document.getElementById("traffic");

		removeChilds(fontt);

		fontt = tdr.getElementsByTagName('font').item(0);

		removeChilds(fontt);

	

		addChil(fontt,home+"traffic/regulatory-signs/index.php","Regulatory signs");

		addChil(fontt,home+"traffic/warning-signs/index.php","Warning Signs");

	}
       else if(das =="alpha")
       {

                var tdr = document.getElementById("alpha");

		removeChilds(fontt);

		fontt = tdr.getElementsByTagName('font').item(0);

		removeChilds(fontt);

	

		addChil(fontt,home+"alphabets/big-capital/index.php","Alphabets");

		addChil(fontt,home+"numbers/index.php","Numbers");
         }
        else if(das=="logo")
        {
               var tdr = document.getElementById("logo");

		removeChilds(fontt);

		fontt = tdr.getElementsByTagName('font').item(0);

		removeChilds(fontt);

  	addChil(fontt,home+"logos/academic-institution-logos/index.php","Academic Institution");

	addChil(fontt,home+"logos/academic-sports/index.php","Academic Sports");        

	addChil(fontt,home+"logos/automobile-logo/index.php","Automobile Manufacturer");

	addChil(fontt,home+"logos/charity-logos/index.php","Charity Logos");

	addChil(fontt,home+"logos/disney-logos/index.php","Disney Logos");

	addChil(fontt,home+"logos/financial/index.php","Financial");

	addChil(fontt,home+"logos/political/index.php","Political");

	addChil(fontt,home+"logos/school-shields/index.php","School Shields");

	addChil(fontt,home+"logos/tv-logos/index.php","Television Symbols");

	addChil(fontt,home+"logos/university-logos/index.php","University Logos");

        }



}



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)

{

//alert(ajss+","+expo+","+linkname);

var breaka = document.createElement("br");

var divs= document.createElement("div");

var link = document.createElement("a");

//link.setAttribute("href",ajss+expo+linkname);
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;

}

