
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, "Active Directory Change Tracker","Active Directory Change Tracker","");
addOption(document.FrontPage_Form1.category_r, "NTFS Security Auditor","NTFS Security Auditor","");
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 (DocKIT)", "Document Import Kit for SharePoint 2010 (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 2010 (SPListX)", "SPList Export for SharePoint 2010 (SPListX)", "");
addOption(document.FrontPage_Form1.category_r, "XPlica for SharePoint 2010", "XPlica for SharePoint 2010", "");
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");
addOption(document.FrontPage_Form1.SubCat,"Corporate License","Corporate License");
addOption(document.FrontPage_Form1.SubCat,"Consulting License","Consulting License");
}
if(document.FrontPage_Form1.category_r.value=='NTFS Security Auditor')
{
addOption(document.FrontPage_Form1.SubCat,"Admin User License","Admin User License");
addOption(document.FrontPage_Form1.SubCat,"Site License","Site License");
addOption(document.FrontPage_Form1.SubCat,"Corporate License","Corporate License");
addOption(document.FrontPage_Form1.SubCat,"Consulting License","Consulting License");
}
if(document.FrontPage_Form1.category_r.value=='Admin Report Kit for Active Directory (ARKAD)')
{
addOption(document.FrontPage_Form1.SubCat,"Single Domain License-Standard Edition","Single Domain License-Standard Edition");
addOption(document.FrontPage_Form1.SubCat,"Single Domain License-Advanced Edition","Single Domain License-Advanced Edition");
addOption(document.FrontPage_Form1.SubCat,"Site License-Standard Edition","Site License-Standard Edition");
addOption(document.FrontPage_Form1.SubCat,"Site License-Advanced Edition","Site License-Advanced Edition");
addOption(document.FrontPage_Form1.SubCat,"Corporate License","Corporate License");
addOption(document.FrontPage_Form1.SubCat,"Consulting License","Consulting License");
}
addOption(document.FrontPage_Form1.SubCat, "", "-------Select License Type-------", "");

if(document.FrontPage_Form1.category_r.value=='Active Directory Change Tracker')
{
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");
addOption(document.FrontPage_Form1.SubCat,"Consulting License","Consulting 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");
addOption(document.FrontPage_Form1.SubCat,"Consulting License","Consulting 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");
addOption(document.FrontPage_Form1.SubCat,"Consulting License","Consulting 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");
addOption(document.FrontPage_Form1.SubCat,"Consulting License","Consulting 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");
addOption(document.FrontPage_Form1.SubCat,"Consulting License","Consulting 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 (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");
addOption(document.FrontPage_Form1.SubCat,"Consulting License","Consulting 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 2010 (SPListX)')
{
addOption(document.FrontPage_Form1.SubCat,"Single License", "Single License"); 
}
if(document.FrontPage_Form1.category_r.value == 'XPlica for SharePoint 2010')
{
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);
}

