
function fillCategory()
{ 
 // this function is used to fill the category list on load
addOption(document.FrontPage_Form1.category_r, "Admin Report Kit for Windows Enterprise (ARKWE)","Admin Report Kit for Windows Enterprise (ARKWE)","");
addOption(document.FrontPage_Form1.category_r, "Admin Report Kit for Active Directory (ARKAD)", "Admin Report Kit for Active Directory (ARKAD)", "");
addOption(document.FrontPage_Form1.category_r, "Admin Report Kit for Exchange Server (ARKES)", "Admin Report Kit for Exchange Server (ARKES)", "");
addOption(document.FrontPage_Form1.category_r, "Admin Report Kit for IIS (ARKIIS)", "Admin Report Kit for IIS (ARKIIS)", "");
addOption(document.FrontPage_Form1.category_r, "Admin Report Kit for SharePoint 2010 (ARKSP)", "Admin Report Kit for SharePoint 2010 (ARKSP)", "");
addOption(document.FrontPage_Form1.category_r, "Admin Report Kit for SharePoint 2007 (ARKSP)", "Admin Report Kit for SharePoint 2007 (ARKSP)", "");
addOption(document.FrontPage_Form1.category_r, "Admin Report Kit for SharePoint 2003 (ARKSP)", "Admin Report Kit for SharePoint 2003 (ARKSP)", "");
addOption(document.FrontPage_Form1.category_r, "Document Import Kit for SharePoint 2010 / 2007 (DocKIT)", "Document Import Kit for SharePoint 2010 /2007 (DocKIT)", "");
addOption(document.FrontPage_Form1.category_r, "Document Import Kit for SharePoint 2003 (DocKIT)", "Document Import Kit for SharePoint 2003 (DocKIT)", "");
addOption(document.FrontPage_Form1.category_r, "SPList Export for SharePoint 2007 (SPListX)", "SPList Export for SharePoint 2007 (SPListX)", "");
addOption(document.FrontPage_Form1.category_r, "SPList Manager for SharePoint 2007 (SPListM)", "SPList Manager for SharePoint 2007 (SPListM)", "");
addOption(document.FrontPage_Form1.category_r, "XPlica for SharePoint 2007", "XPlica for SharePoint 2007", "");
addOption(document.FrontPage_Form1.category_r, "XPlica for SharePoint 2003", "XPlica for SharePoint 2003", "");

}

function SelectSubCat(){
// ON selection of category this function will work

removeAllOptions(document.FrontPage_Form1.SubCat);
addOption(document.FrontPage_Form1.SubCat, "", "-------Select License Type-------", "");

if(document.FrontPage_Form1.category_r.value=='Admin Report Kit for Windows Enterprise (ARKWE)')
{
addOption(document.FrontPage_Form1.SubCat,"Single License","Single License");
addOption(document.FrontPage_Form1.SubCat,"Site License","Site License");
}
if(document.FrontPage_Form1.category_r.value=='Admin Report Kit for Active Directory (ARKAD)')
{
addOption(document.FrontPage_Form1.SubCat,"2-Domain License","2-Domain License");
addOption(document.FrontPage_Form1.SubCat,"4-Domain License","4-Domain License");
addOption(document.FrontPage_Form1.SubCat,"Site License","Site License");
}
if(document.FrontPage_Form1.category_r.value=='Admin Report Kit for Exchange Server (ARKES)')
{
addOption(document.FrontPage_Form1.SubCat,"Single License","Single License");
addOption(document.FrontPage_Form1.SubCat,"Site License","Site License");
addOption(document.FrontPage_Form1.SubCat,"Corporate License","Corporate License");
}
if(document.FrontPage_Form1.category_r.value=='Admin Report Kit for IIS (ARKIIS)')
{
addOption(document.FrontPage_Form1.SubCat,"Single License","Single License");
addOption(document.FrontPage_Form1.SubCat,"Corporate License","Corporate License");
}
if(document.FrontPage_Form1.category_r.value=='Admin Report Kit for SharePoint 2007 (ARKSP)')
{
addOption(document.FrontPage_Form1.SubCat,"Server License","Server License");
addOption(document.FrontPage_Form1.SubCat,"Test & Production Server License","Test & Production Server License");
}
if(document.FrontPage_Form1.category_r.value=='Admin Report Kit for SharePoint 2010 (ARKSP)')
{
addOption(document.FrontPage_Form1.SubCat,"Server License","Server License");
addOption(document.FrontPage_Form1.SubCat,"Test & Production Server License","Test & Production Server License");
}

if(document.FrontPage_Form1.category_r.value == 'Admin Report Kit for SharePoint 2003 (ARKSP)')
{
addOption(document.FrontPage_Form1.SubCat,"Server License", "Server License");
 
}
if(document.FrontPage_Form1.category_r.value == 'Document Import Kit for SharePoint 2010 / 2007 (DocKIT)'){
addOption(document.FrontPage_Form1.SubCat,"Single License", "Single License");
addOption(document.FrontPage_Form1.SubCat,"Single Test & Production License", "Single Test & Production License");
addOption(document.FrontPage_Form1.SubCat,"Site License", "Site License");
 
}
if(document.FrontPage_Form1.category_r.value == 'Document Import Kit for SharePoint 2003 (DocKIT)')
{
addOption(document.FrontPage_Form1.SubCat,"Single License", "Single License");
addOption(document.FrontPage_Form1.SubCat,"Single Test & Production License", "Single Test & Production License");
}
if(document.FrontPage_Form1.category_r.value == 'SPList Export for SharePoint 2007 (SPListX)')
{
addOption(document.FrontPage_Form1.SubCat,"Single License", "Single License"); 
}
if(document.FrontPage_Form1.category_r.value == 'SPList Manager for SharePoint 2007 (SPListM)')
{
addOption(document.FrontPage_Form1.SubCat,"Single License", "Single License"); 
addOption(document.FrontPage_Form1.SubCat,"Single Test & Production License", "Single Test & Production License"); 
}
if(document.FrontPage_Form1.category_r.value == 'XPlica for SharePoint 2007')
{
addOption(document.FrontPage_Form1.SubCat,"Single License", "Single License");
addOption(document.FrontPage_Form1.SubCat,"Single Test & Production License", "Single Test & Production License");
 }
if(document.FrontPage_Form1.category_r.value == 'XPlica for SharePoint 2003')
{
addOption(document.FrontPage_Form1.SubCat,"Single Server License", "Single Server License");
addOption(document.FrontPage_Form1.SubCat,"Corporate License", "Corporate License");
 
}

}
////////////////// 

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);
}
