
function fillProcessor(){ 
 // this function is used to fill the Processor list on load
addOption(document.drop_list.Processor, "Intel", "Intel", "");
addOption(document.drop_list.Processor, "AMD", "AMD", "");
}

function SelectProcessorType(){
// ON selection of Processor this function will work

removeAllOptions(document.drop_list.ProcessorType);
addOption(document.drop_list.ProcessorType, "", "ProcessorType", "");

if(document.drop_list.Processor.value == 'Intel'){
addOption(document.drop_list.ProcessorType,"Intel Celeron Dual Core   E1400 2GHz 512KB Cache", "Intel Celeron Dual Core   E1400 2GHz 512KB Cache");
addOption(document.drop_list.ProcessorType,"Intel Dual Core   E5300 2.6GHz 2MB Cache", "Intel Core Duo E5300 2.6GHz 2MB Cache");
addOption(document.drop_list.ProcessorType,"Intel Core 2 Duo  E7500 2.93GHz 3MB Cache", "Intel Core 2 Duo E7500 2.93GHz 3MB Cache");
addOption(document.drop_list.ProcessorType,"Intel Core 2 Duo  E8400 3GHz 6MB Cache", "Intel Core 2 Duo E8400 3GHz 6MB Cache");
addOption(document.drop_list.ProcessorType," ", " ");
addOption(document.drop_list.ProcessorType,"Core 2 Quad Q8200  2.33GHz 4MB Cache 1333MHz FSB", "Core 2 Quad Q8200 2.33GHz 4MB Cache 1333MHz FSB");
addOption(document.drop_list.ProcessorType,"Core 2 Quad Q9400 2.66GHz 6MB Cache 1333MHz FSB", "Core 2 Quad Q9400 2.66GHz 6MB Cache 1333MHz FSB");
addOption(document.drop_list.ProcessorType,"Core 2 Quad Q9650 3GHz 12MB Cache 1333MHz FSB", "Core 2 Quad Q9650 3GHz 12MB Cache 1333MHz FSB");
addOption(document.drop_list.ProcessorType," ", " ");
addOption(document.drop_list.ProcessorType,"Core i7 920 2.66GHz 8MB Cache", "Core i7 920 2.66GHz 8MB Cache");
addOption(document.drop_list.ProcessorType,"Core i7 940 2.93GHz 8MB Cache", "Core i7 940 2.93GHz 8MB Cache");
addOption(document.drop_list.ProcessorType,"Core i7 Extreme Edition 965 3.2GHz 8MB Cache", "Core i7 965 3.2GHz 8MB Cache");
}
if(document.drop_list.Processor.value == 'AMD'){
addOption(document.drop_list.ProcessorType,"Customer is interseted in AMD. Call them.", "Interested in AMD?  Select this option.");

}

}
//////////////////
function fillVideo(){ 
 // this function is used to fill the Video list on load
addOption(document.drop_list.Video, "Integrated", "Integrated", "");
addOption(document.drop_list.Video, "PCI-Express", "PCI-Express", "");
}

function SelectVideoType(){
// ON selection of Video this function will work

removeAllOptions(document.drop_list.VideoType);
addOption(document.drop_list.VideoType, "", "VideoType", "");

if(document.drop_list.Video.value == 'Integrated'){
addOption(document.drop_list.VideoType,"Integrated", "Integrated");
}

if(document.drop_list.Video.value == 'PCI-Express'){
addOption(document.drop_list.VideoType,"Nvidia Geforce 9400GT 512MB", "Nvidia Geforce 9400GT 512MB");
addOption(document.drop_list.VideoType,"Nvidia Geforce 9600GSO 1GB", "Nvidia Geforce 9600GSO 1GB");
addOption(document.drop_list.VideoType,"Nvidia Geforce 9800GT 512MB", "Nvidia Geforce 9800GT 512MB");
addOption(document.drop_list.VideoType,"Nvidia Geforce GTS 250 512MB", "Nvidia Geforce GTS 250 512MB");
addOption(document.drop_list.VideoType,"Nvidia Geforce GTX 260 896MB", "Nvidia Geforce GTX 260 896MB");
addOption(document.drop_list.VideoType,"Nvidia Geforce GTX 280 1GB", "Nvidia Geforce GTX 280 1GB");
addOption(document.drop_list.VideoType,"Nvidia Geforce GTX 295 1.7GB", "Nvidia Geforce GTX 295 1.7GB");
addOption(document.drop_list.VideoType," ", " ");
addOption(document.drop_list.VideoType,"Ati Radeon HD4350 512MB", "Ati Radeon HD4350 512MB");
addOption(document.drop_list.VideoType,"Ati Radeon HD4550 512MB", "Ati Radeon HD4550 512MB");
addOption(document.drop_list.VideoType,"Ati Radeon HD4650 512MB", "Ati Radeon HD4650 512MB");
addOption(document.drop_list.VideoType,"Ati Radeon HD4670 512MB", "Ati Radeon HD4670 512MB");
addOption(document.drop_list.VideoType,"Ati Radeon HD4830 512MB", "Ati Radeon HD4830 512MB");
addOption(document.drop_list.VideoType,"Ati Radeon HD4850 512MB", "Ati Radeon HD4850 512MB");
addOption(document.drop_list.VideoType,"Ati Radeon HD4870 1GB", "Ati Radeon HD4870 1GB");
addOption(document.drop_list.VideoType,"Ati Radeon HD4890 1GB", "Ati Radeon HD4890 1GB");
addOption(document.drop_list.VideoType,"Ati Radeon HD4870 X2 2GB", "Ati Radeon HD4870 X2 2GB");
}
}
//////////////////
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);
}
