
function fillCategory(){ 
 // this function is used to fill the category list on load
addOption(document.InsertForm.categorie, "Linux Distributions", "Linux Distributions", "");
addOption(document.InsertForm.categorie, "Archive-File managers", "Archive-File managers", "");
addOption(document.InsertForm.categorie, "Drivers", "Drivers", "");
addOption(document.InsertForm.categorie, "InterNet Tools", "InterNet Tools", "");
addOption(document.InsertForm.categorie, "Hardware monitoring", "Hardware monitoring", "");
addOption(document.InsertForm.categorie, "Games", "Games", "");
addOption(document.InsertForm.categorie, "Graphics", "Graphics", "");
addOption(document.InsertForm.categorie, "Downloaders-P2P", "Downloaders-P2P", "");
addOption(document.InsertForm.categorie, "Network", "Network", "");
addOption(document.InsertForm.categorie, "Desktop Enhancements", "Desktop Enhancements", "");
addOption(document.InsertForm.categorie, "Multimedia", "Multimedia", "");
addOption(document.InsertForm.categorie, "Office", "Office", "");
addOption(document.InsertForm.categorie, "Security", "Security", "");
addOption(document.InsertForm.categorie, "Servers", "Servers", "");
addOption(document.InsertForm.categorie, "System Tools", "System Tools", "");
addOption(document.InsertForm.categorie, "Communication Tools", "Communication Tools", "");
addOption(document.InsertForm.categorie, "Web Development", "Web Development", "");
addOption(document.InsertForm.categorie, "Education", "Education", "");
}

function SelectSubCat(){
// ON selection of category this function will work

removeAllOptions(document.InsertForm.subcategorie);
addOption(document.InsertForm.subcategorie, "", "please select SubCat", "");

if(document.InsertForm.categorie.value == 'Linux Distributions'){
addOption(document.InsertForm.subcategorie,"linux distributions", "linux distributions");
}
if(document.InsertForm.categorie.value == 'Archive-File managers'){
addOption(document.InsertForm.subcategorie,"archive managers", "archive managers");
addOption(document.InsertForm.subcategorie,"file managers", "file managers");
addOption(document.InsertForm.subcategorie,"other Archive-File managers...", "other Archive-File managers...");
}
if(document.InsertForm.categorie.value == 'Drivers'){
addOption(document.InsertForm.subcategorie,"driver tools", "driver tools");
addOption(document.InsertForm.subcategorie,"drivers", "drivers");
addOption(document.InsertForm.subcategorie,"other Drivers...", "other Drivers...", "");
}
if(document.InsertForm.categorie.value == 'InterNet Tools'){
addOption(document.InsertForm.subcategorie,"web browsers", "web browsers");
addOption(document.InsertForm.subcategorie,"email clients", "email clients");
addOption(document.InsertForm.subcategorie,"rss readers", "rss readers");
addOption(document.InsertForm.subcategorie,"add-ons", "add-ons");
addOption(document.InsertForm.subcategorie,"other InterNet Tools", "other InterNet Tools");
}
if(document.InsertForm.categorie.value == 'Hardware monitoring'){
addOption(document.InsertForm.subcategorie,"cpu", "cpu");
addOption(document.InsertForm.subcategorie,"hard disk", "hard disk");
addOption(document.InsertForm.subcategorie,"CD-DVD disk", "CD-DVD disk");
addOption(document.InsertForm.subcategorie,"all in one", "all in one");
addOption(document.InsertForm.subcategorie,"other Hardware monitoring...", "other Hardware monitoring...");
}
if(document.InsertForm.categorie.value == 'Games'){
addOption(document.InsertForm.subcategorie,"action games", "action games");
addOption(document.InsertForm.subcategorie,"puzzle games", "puzzle games");
addOption(document.InsertForm.subcategorie,"card games", "card games");
addOption(document.InsertForm.subcategorie,"kids games", "kids games");
addOption(document.InsertForm.subcategorie,"sports games", "sports games");
addOption(document.InsertForm.subcategorie,"strategy games", "strategy games");
addOption(document.InsertForm.subcategorie,"other games", "other games");
}
if(document.InsertForm.categorie.value == 'Graphics'){
addOption(document.InsertForm.subcategorie,"image editors-graphic tools", "image editors-graphic tools");
addOption(document.InsertForm.subcategorie,"image viewers", "image viewers");
addOption(document.InsertForm.subcategorie,"icons tools", "icons tools");
addOption(document.InsertForm.subcategorie,"3D Modeling", "3D Modeling");
addOption(document.InsertForm.subcategorie,"screen capture", "screen capture");
addOption(document.InsertForm.subcategorie,"converters resizers", "converters resizers");
addOption(document.InsertForm.subcategorie,"other Graphics...", "other Graphics...");
}
if(document.InsertForm.categorie.value == 'Downloaders-P2P'){
addOption(document.InsertForm.subcategorie,"download managers", "download managers");
addOption(document.InsertForm.subcategorie,"file sharing tools", "file sharing tools");
addOption(document.InsertForm.subcategorie,"video download", "video download");
addOption(document.InsertForm.subcategorie,"other Downloaders-P2P...", "other Downloaders-P2P...");
}
if(document.InsertForm.categorie.value == 'Network'){
addOption(document.InsertForm.subcategorie,"ip tools", "ip tools");
addOption(document.InsertForm.subcategorie,"network monitoring", "network monitoring");
addOption(document.InsertForm.subcategorie,"remote computing", "remote computing");
addOption(document.InsertForm.subcategorie,"ftp programs", "ftp programs");
addOption(document.InsertForm.subcategorie,"other Network...", "other Network...");
}
if(document.InsertForm.categorie.value == 'Desktop Enhancements'){
addOption(document.InsertForm.subcategorie,"desktop tools", "desktop tools");
addOption(document.InsertForm.subcategorie,"wallpapers-themes", "wallpapers-themes");
addOption(document.InsertForm.subcategorie,"screen savers", "screen savers");
addOption(document.InsertForm.subcategorie,"shell enhancement", "shell enhancement");
addOption(document.InsertForm.subcategorie,"other Desktop Enhancements", "other Desktop Enhancements");
}
if(document.InsertForm.categorie.value == 'Multimedia'){
addOption(document.InsertForm.subcategorie,"video players", "video players");
addOption(document.InsertForm.subcategorie,"audio players", "audio players");
addOption(document.InsertForm.subcategorie,"CD-DVD tools", "CD-DVD tools");
addOption(document.InsertForm.subcategorie,"video editors", "video editors");
addOption(document.InsertForm.subcategorie,"audio editors", "audio editors");
addOption(document.InsertForm.subcategorie,"media managers-organizers", "media managers-organizers");
addOption(document.InsertForm.subcategorie,"tv-radio", "tv-radio");
addOption(document.InsertForm.subcategorie,"video codec", "video codec");
addOption(document.InsertForm.subcategorie,"audio codec", "audio codec");
addOption(document.InsertForm.subcategorie,"other Multimedia...", "other Multimedia...");
}
if(document.InsertForm.categorie.value == 'Office'){
addOption(document.InsertForm.subcategorie,"office suites-word tools", "office suites-word tools");
addOption(document.InsertForm.subcategorie,"pdf tools", "pdf tools");
addOption(document.InsertForm.subcategorie,"office organizers", "office organizers");
addOption(document.InsertForm.subcategorie,"other office...", "other office...");
}
if(document.InsertForm.categorie.value == 'Security'){
addOption(document.InsertForm.subcategorie,"anti-virus", "anti-virus");
addOption(document.InsertForm.subcategorie,"anti-spyware", "anti-spyware");
addOption(document.InsertForm.subcategorie,"firewall", "firewall");
addOption(document.InsertForm.subcategorie,"password managers", "password managers");
addOption(document.InsertForm.subcategorie,"privacy tools", "privacy tools");
addOption(document.InsertForm.subcategorie,"encryption tools", "encryption tools");
addOption(document.InsertForm.subcategorie,"other Security...", "other Security...");
}
if(document.InsertForm.categorie.value == 'Servers'){
addOption(document.InsertForm.subcategorie,"ftp server tools", "ftp server tools");
addOption(document.InsertForm.subcategorie,"mail server tools", "mail server tools");
addOption(document.InsertForm.subcategorie,"web server tools", "web server tools");
addOption(document.InsertForm.subcategorie,"other Servers...", "other Servers...");
}
if(document.InsertForm.categorie.value == 'System Tools'){
addOption(document.InsertForm.subcategorie,"system monitoring", "system monitoring");
addOption(document.InsertForm.subcategorie,"maintenance", "maintenance");
addOption(document.InsertForm.subcategorie,"backup", "backup");
addOption(document.InsertForm.subcategorie,"benchmarks", "benchmarks");
addOption(document.InsertForm.subcategorie,"system management", "system management");
addOption(document.InsertForm.subcategorie,"registry", "registry");
addOption(document.InsertForm.subcategorie,"automation tools", "automation tools");
addOption(document.InsertForm.subcategorie,"other System Tools...", "other System Tools...");
}
if(document.InsertForm.categorie.value == 'Communication Tools'){
addOption(document.InsertForm.subcategorie,"chat", "chat");
addOption(document.InsertForm.subcategorie,"instant messaging", "instant messaging");
addOption(document.InsertForm.subcategorie,"VoIP", "VoIP");
addOption(document.InsertForm.subcategorie,"other Communication Tools...", "other Communication Tools...");
}
if(document.InsertForm.categorie.value == 'Web Development'){
addOption(document.InsertForm.subcategorie,"html tools-editors", "html tools-editors");
addOption(document.InsertForm.subcategorie,"site management", "site management");
addOption(document.InsertForm.subcategorie,"javascipt tools", "javascipt tools");
addOption(document.InsertForm.subcategorie,"meta tag tools", "meta tag tools");
addOption(document.InsertForm.subcategorie,"php tools", "php tools");
addOption(document.InsertForm.subcategorie,"site analysis-stats", "site analysis-stats");
addOption(document.InsertForm.subcategorie,"color pickers", "color pickers");
addOption(document.InsertForm.subcategorie,"xml tools", "xml tools");
addOption(document.InsertForm.subcategorie,"other Web Development...", "other Web Development...");
}
if(document.InsertForm.categorie.value == 'Education'){
addOption(document.InsertForm.subcategorie,"language tools", "language tools");
addOption(document.InsertForm.subcategorie,"mathematics", "mathematics");
addOption(document.InsertForm.subcategorie,"astronomy-geography", "astronomy-geography");
addOption(document.InsertForm.subcategorie,"other Education", "other Education");
}

}
////////////////// 

function removeAllOptions(selectbox)
{
	var i;
	for(i=selectbox.options.length-1;i>=0;i--)
	{
		//selectbox.options.remove(i);
		selectbox.remove(i);
	}
}


function addOption(selectbox, value, text )
{
	var optn = document.createElement("OPTION");
	optn.text = text;
	optn.value = value;

	selectbox.options.add(optn);
}

