
function fillCategory(){ 
 // this function is used to fill the category list on load
addOption(document.form1.location, "Ahmedabad", "Ahmedabad");
addOption(document.form1.location, "Bangalore", "Bangalore");
addOption(document.form1.location, "Chennai", "Chennai");
addOption(document.form1.location, "Delhi / Gurgaon", "Delhi / Gurgaon");
addOption(document.form1.location, "Hyderabad", "Hyderabad");
addOption(document.form1.location, "Kolkata", "Kolkata");
addOption(document.form1.location, "Mumbai", "Mumbai");
addOption(document.form1.location, "Pune", "Pune");
addOption(document.form1.location, "Trivandrum", "Trivandrum");
}

function SelectSubCat(){
// ON selection of category this function will work

removeAllOptions(document.form1.timeslot);
addOption(document.form1.timeslot, "0", "--Choose one--", "0");

if(document.form1.location.value == 'Ahmedabad'){
addOption(document.form1.timeslot,"2th  to 4th December", "2th  to 4th December");
}
if(document.form1.location.value == 'Bangalore'){
addOption(document.form1.timeslot,"17th to 19th December", "17th to 19th December");
addOption(document.form1.timeslot,"21st to 23rd December", "21st to 23rd December");
}
if(document.form1.location.value == 'Chennai'){
addOption(document.form1.timeslot,"14th to 16th December", "14th to 16th December");
}
if(document.form1.location.value == 'Delhi / Gurgaon'){
addOption(document.form1.timeslot,"9nd to 11th December", "9nd to 11th December	");
}
if(document.form1.location.value == 'Hyderabad'){
addOption(document.form1.timeslot,"17th to 19th December", "17th to 19th December");
}
if(document.form1.location.value == 'Kolkata'){
addOption(document.form1.timeslot,"2nd to 4th December", "2nd to 4th December");
}
if(document.form1.location.value == 'Mumbai'){
addOption(document.form1.timeslot,"14th to 16th December", "14th to 16th December");
}
if(document.form1.location.value == 'Pune'){
addOption(document.form1.timeslot,"7th to 9th December", "7th to 9th December");
}
if(document.form1.location.value == 'Trivandrum'){
addOption(document.form1.timeslot,"21 to 23 December", "21 to 23 December");
}
}
////////////////// 

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);
}
