var as = 1;
var fontt;
function addChilds(das)
{
	var nam =das;
	if(das == "stwatch")
	{
	var tdr = document.getElementById("stwatch");
	removeChilds(fontt);
	fontt = tdr.getElementsByTagName('font').item(0);
	removeChilds(fontt);

	addChil(fontt,ajss+"stopwatch-with-lap.php"," Stop Watch Laps");
	addChil(fontt,ajss+"stopwatch-without-lap.php"," Stop Watch");
	addChil(fontt,ajss+"stopwatch.php"," Stop Timer");
	}
        else if(das=="slide")
        {
            var tdr = document.getElementById("slide");
            removeChilds(fontt);
            fontt = tdr.getElementsByTagName('font').item(0);
            removeChilds(fontt);
        addChil(fontt,ajss+"slide-show-software.php"," Slideshow Script");
        addChil(fontt,ajss+"slide-show-image.php","Slideshow Image");
        addChil(fontt,ajss+"imagemenu.php"," Imagemenu Script");


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

	addChil(fontt,ajss+"timer.php"," Timer");
	addChil(fontt,ajss+"alarm-clock.php"," Alarm Watch");
	addChil(fontt,ajss+"days-left-in-year.php"," Days Left in Year ");
	addChil(fontt,ajss+"isLeapYear.php"," LeapYear Check ");
        addChil(fontt,ajss+"date-picker.php","Select Date");
        
        }
	
	else if(das == "clrchange")
	{
	var tdr = document.getElementById("clrchange");
	removeChilds(fontt);
	fontt = tdr.getElementsByTagName('font').item(0);
	removeChilds(fontt);

	addChil(fontt,ajss+"table-row-color-change.php"," Table Row");
	addChil(fontt,ajss+"bgcolorchange.php"," Background Color");	
	}
	
	else if(das == "userinfo")
	{
	var tdr = document.getElementById("userinfo");
	removeChilds(fontt);
	fontt = tdr.getElementsByTagName('font').item(0);
	removeChilds(fontt);

	addChil(fontt,ajss+"user-os-info.php"," Operating System(OS)");
	addChil(fontt,ajss+"user-browser-details.php"," Browser Info");
	addChil(fontt,ajss+"screen-resolution.php"," Screen Resolution");
	addChil(fontt,ajss+"page-duration.php"," Page Duration");
        addChil(fontt,ajss+"window-size.php","Resize Browser Window"); 	
	}
	else if(das == "calcu")
	{
	var tdr = document.getElementById("calcu");
	removeChilds(fontt);
	fontt = tdr.getElementsByTagName('font').item(0);
	removeChilds(fontt);

	addChil(fontt,ajss+"basic-calculator.php"," Basic Calculator");
	addChil(fontt,ajss+"bandwidth-calculate.php"," To Bytes");
	addChil(fontt,ajss+"bandwidthCalculation.php"," From Bytes");
	addChil(fontt,ajss+"bmi-calculator.php"," BMI Calculator");
	addChil(fontt,ajss+"checkmod-calculator.php"," chmod Calculation");
	addChil(fontt,ajss+"decimal-binary-convertor.php"," Decimal to Binary");
        addChil(fontt,ajss+"prime.php","PrimeNumberCalculator");
        addChil(fontt,ajss+"npr.php"," NPR Calculation");
        addChil(fontt,ajss+"ncr.php"," NCR Calculation");
        addChil(fontt,ajss+"temperature.php"," Temperature Converter");
        addChil(fontt,ajss+"scientific.php","Scientific Calculator");
        addChil(fontt,ajss+"age-calculator.php","Age Calculator");
        addChil(fontt,ajss+"length-calculator.php","Length Calculator");
        addChil(fontt,ajss+"downloadtime-calculator.php","File Download Time");
        addChil(fontt,ajss+"loan-calculator.php","Loan Calculator");
        addChil(fontt,ajss+"base-converter.php","Base Converter");
        addChil(fontt,ajss+"calorie-calculator.php","Calorie Calculator"); 
        addChil(fontt,ajss+"quadratic-equation.php","Quadratic Equation");
        addChil(fontt,ajss+"squareroot-calculator.php","SquareRoot Calculator");
        addChil(fontt,ajss+"population-counter.php","World Population");
        addChil(fontt,ajss+"weekday-born.php","Born Weekday");
        addChil(fontt,ajss+"gcd.php","GCD Calculator");
        addChil(fontt,ajss+"lcm.php","LCM Calculator");
        addChil(fontt,ajss+"primefactor.php","Prime Factor");
        addChil(fontt,ajss+"palindrome.php","Palindrome Checker");
	}
	else if(das == "frms")
	{
	var tdr = document.getElementById("frms");
	removeChilds(fontt);
	fontt = tdr.getElementsByTagName('font').item(0);
	removeChilds(fontt);

	addChil(fontt,ajss+"emailValidate.php"," Single Mailid");
	addChil(fontt,ajss+"emailvalidate-multiple.php"," Multi Mailid");
	addChil(fontt,ajss+"domainValidate.php"," Domain Validation");
	addChil(fontt,ajss+"remove-html-tag.php"," Remove html tag");
	addChil(fontt,ajss+"html-tag-validation.php"," HTML Validation");
	addChil(fontt,ajss+"inarray.php"," Find Inarray");
	addChil(fontt,ajss+"is-integer.php"," Is Number");
        addChil(fontt,ajss+"integers-twodecimals.php","IntegerswithTwodecimal");
        addChil(fontt,ajss+"alphanumeric.php","Alphanumeric Chars");
        addChil(fontt,ajss+"autosum.php","Autosum Generation");
        addChil(fontt,ajss+"enable-submit.php","EnableSubmitButton");
        addChil(fontt,ajss+"accept-terms.php","Terms and Conditions");
        addChil(fontt,ajss+"round-decimals.php","Rounding Decimals");
        addChil(fontt,ajss+"hiddentext.php","Hiddentext");
	}
         
        else if(das == "fmtfrms")
        {
          var tdr = document.getElementById("fmtfrms");
          removeChilds(fontt);
          fontt = tdr.getElementsByTagName('font').item(0);
          removeChilds(fontt);

          addChil(fontt,ajss+"lcase-converter.php","Lowercase Converter");
          addChil(fontt,ajss+"ucase-converter.php","Uppercase Converter");
          addChil(fontt,ajss+"richtexteditor.php","Rich Text Editor");
        }
       	
	else if(das == "dynamic")
	{
	var tdr = document.getElementById("dynamic");
	removeChilds(fontt);
	fontt = tdr.getElementsByTagName('font').item(0);
	removeChilds(fontt);

	addChil(fontt,ajss+"move-list.php"," Move Listbox Values");
	addChil(fontt,ajss+"dynamic-form-event.php"," Dynamic List");
        addChil(fontt,ajss+"autocomplete-form.php","Auto complete Form");

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

	addChil(fontt,ajss+"character-count.php"," Count Character");
	addChil(fontt,ajss+"word-count.php"," Word Count");
	}
	else if(das == "imgeffect")
	{
	var tdr = document.getElementById("imgeffect");
	removeChilds(fontt);
	fontt = tdr.getElementsByTagName('font').item(0);
	removeChilds(fontt);

	addChil(fontt,ajss+"tooltips.php"," Image Tooltip Table");
	addChil(fontt,ajss+"change-image-onmouseover.php"," Change onMouseover");
	addChil(fontt,ajss+"dropdown-image-popup.php"," Dropdown select");
        addChil(fontt,ajss+"zooming-image.php","Image ZoomIn/Out Script");
	}
	
	else if(das == "game")
	{
	var tdr = document.getElementById("game");
	removeChilds(fontt);
	fontt = tdr.getElementsByTagName('font').item(0);
	removeChilds(fontt);

	addChil(fontt,ajss+"hangman.php","Hangman Game");
	addChil(fontt,ajss+"minesweeper.php","Minesweeper code");
        addChil(fontt,ajss+"npuzzle.php","N Puzzle Game");
        addChil(fontt,ajss+"checkbox-click.php","Checkbox Click");
        addChil(fontt,ajss+"throw-dice.php","Dice Simulator");
        addChil(fontt,ajss+"box-in.php","Box-in Game");
        addChil(fontt,ajss+"buzzy-game.php","Buzzy Game");
        addChil(fontt,ajss+"tetris-game.php","Tetris Game");
	}
	
	else if(das == "random")
	{
	var tdr = document.getElementById("random");
	removeChilds(fontt);
	fontt = tdr.getElementsByTagName('font').item(0);
	removeChilds(fontt);

	addChil(fontt,ajss+"random-number-method.php"," Random Number");
	addChil(fontt,ajss+"random-quote-generator.php"," Random Quote");
	
	}
	else if(das == "status")
	{
	var tdr = document.getElementById("status");
	removeChilds(fontt);
	fontt = tdr.getElementsByTagName('font').item(0);
	removeChilds(fontt);

	addChil(fontt,ajss+"status-bar.php","Scrolling Bar");
	addChil(fontt,ajss+"status-bar2.php","Dancing Bar");
	addChil(fontt,ajss+"status-bar3.php","Blinking Bar");
	}
	else if(das == "mouseon")
	{
	var tdr = document.getElementById("mouseon");
	removeChilds(fontt);
	fontt = tdr.getElementsByTagName('font').item(0);
	removeChilds(fontt);

	addChil(fontt,ajss+"cursortail.php","Cursor Tail");
	addChil(fontt,ajss+"eye-oncursor.php","Eyes on cursor");
	addChil(fontt,ajss+"thumbnail.php","Thumb nail");
	addChil(fontt,ajss+"mousecursor-change.php","Change Cursor");
	addChil(fontt,ajss+"cursoreffect1.php","Mouse cursor Effect");
	}
	else if(das == "country")
	{
	var tdr = document.getElementById("country");
	removeChilds(fontt);
	fontt = tdr.getElementsByTagName('font').item(0);
	removeChilds(fontt);

	addChil(fontt,ajss+"country-currency-name.php","Country Currency");
	addChil(fontt,ajss+"country-currency-symbol.php","Country to Money");
	addChil(fontt,ajss+"currency-name-symbol.php","Currency Symbol");
	addChil(fontt,ajss+"country-name-language.php","Country Language");
	addChil(fontt,ajss+"country-list.php","Country List");
	}
	
	else if(das == "deleteDuplicate")
	{
	var tdr = document.getElementById("deleteDuplicate");
	removeChilds(fontt);
	fontt = tdr.getElementsByTagName('font').item(0);
	removeChilds(fontt);

	addChil(fontt,ajss+"delete-duplicate-combine.php","Delete & Concatenate");
	addChil(fontt,ajss+"delete-single-array.php","Remove Duplicate");
	addChil(fontt,ajss+"del-repeat.php","Delete Repeated");
	}
        else if(das == "title")
	{
	var tdr = document.getElementById("title");
	removeChilds(fontt);
	fontt = tdr.getElementsByTagName('font').item(0);
	removeChilds(fontt);

	addChil(fontt,ajss+"title-scrol.php","Scrolling Title");
	addChil(fontt,ajss+"title-blink.php","Blinking Title");
	}
	else if(das == "position")
	{
	var tdr = document.getElementById("position");
	removeChilds(fontt);
	fontt = tdr.getElementsByTagName('font').item(0);
	removeChilds(fontt);

	addChil(fontt,ajss+"cursor-position.php","Cursor Position");
	addChil(fontt,ajss+"scroll-position.php"," Scroll bar Position");
	addChil(fontt,ajss+"html-element-position.php"," HTML Element");
	addChil(fontt,ajss+"cursor-status.php","Status Bar");
        addChil(fontt,ajss+"drag-and-drop.php","Drag and Drop");
	}
	else if(das == "security")
	{
	var tdr = document.getElementById("security");
	removeChilds(fontt);
	fontt = tdr.getElementsByTagName('font').item(0);
	removeChilds(fontt);

	addChil(fontt,ajss+"rightclick-disable.php","Right click Disable");
	addChil(fontt,ajss+"disable-parent-window.php"," Disable Parent Window");
        addChil(fontt,ajss+"password.php","Password Validation");
	}
        else if(das == "select")
	{
	var tdr = document.getElementById("select");
	removeChilds(fontt);
	fontt = tdr.getElementsByTagName('font').item(0);
	removeChilds(fontt);

	addChil(fontt,ajss+"select-textarea.php","Textarea");
	addChil(fontt,ajss+"select-all-checkbox.php","checkbox");
	addChil(fontt,ajss+"select-div-tag.php","Div tag");
	addChil(fontt,ajss+"auto-checkbox-select.php","Auto Checkbox Select");
        addChil(fontt,ajss+"treemenu.php","Tree Menu");
	}
        else if(das=="anim")
        {
          var tdr = document.getElementById("anim");
          removeChilds(fontt);
          fontt = tdr.getElementsByTagName('font').item(0);
          removeChilds(fontt);
          
          addChil(fontt,ajss+"image-fall.php"," Leaf / Snow fall");
          addChil(fontt,ajss+"cursortail.php","Cursor Tail");
          addChil(fontt,ajss+"eye-oncursor.php","Eyes on cursor");
          addChil(fontt,ajss+"toggle.php","Toggle/Expander");
          addChil(fontt,ajss+"chart-animation.php","Chart Animation");
        }
        else if(das == "pagi")
        {
          var tdr=document.getElementById("pagi");
          removeChilds(fontt);
          fontt=tdr.getElementsByTagName('font').item(0);
          removeChilds(fontt);

          addChil(fontt,ajss+"tabination.php","Tabination");
          addChil(fontt,ajss+"ajax-pagination.php","Ajax Pagination");

        }

}

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="12px";
divs.style.lineHeight="20px";
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";

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

/*** Function for select the code ***/
function fnSelect(objId)
{
   fnDeSelect();
   if (document.selection) 
   {
      var range = document.body.createTextRange();
      range.moveToElementText(document.getElementById(objId));
      range.select();
   }
   else if (window.getSelection) 
   {
      var range = document.createRange();
      range.selectNode(document.getElementById(objId));
      window.getSelection().addRange(range);
   }
}
function fnDeSelect() 
{
   if (document.selection)
             document.selection.empty();
   else if (window.getSelection)
              window.getSelection().removeAllRanges();
} 
/*** Function for select the code ***/
