// JavaScript Document

	var option_0 = "-- Please Select --";
	var option_1 = "-- Waiting for Processor Selection --";
	var option_val = "";
	
	var memory_1 = "512MB 533Mhz DDR2 Ram";
	var memory_2 = "1.0GB 533Mhz DDR2 Ram";
	var memory_3 = "1.0GB 667Mhz DDR2 Ram";
	var memory_4 = "2.0GB 667Mhz DDR2 Ram";

	
	var harddrive_1 = "120 GB 2.5\" SATA HDD";
	var harddrive_2 = "60 GB 2.5\" SATA Extreme Temp/Shock HDD";
	var harddrive_3 = "2.0 GB Disk-On-Module (DOM) Industrial SSD";
	var harddrive_4 = "4.0 GB Disk-On-Module (DOM) Industrial SSD";
	
	var powersupply_1 = "AC - 120 to 240 VAC Power Brick";
	var powersupply_2 = "DC - 6 to 24 VDC Power";
	
	var os_1 = "None (No OS Software Included)";
	var os_2 = "Windows XP OEM Professional";
	var os_3 = "Windows XP Embedded";
	var os_4 = "Windows Vista OEM";
	
	var miscupg_1 = "N/A";
	var miscupg_2 = "None";
	var miscupg_3 = "Internal PCMCIA / CF Controller";
	

function init() {
	document.getElementById('rfq_industry_other').style.display='none';
	document.getElementById('rfq_businesstype_other').style.display='none';

}


function upd_Industry() {

	if (document.getElementById('rfq_industry').selectedIndex==6){
		document.getElementById('rfq_industry_other').style.display='inline';
	}
	else {
		document.getElementById('rfq_industry_other').style.display='none';
	};
}

function upd_BusinessType() {
	if (document.getElementById('rfq_businesstype').selectedIndex == 4){
		document.getElementById('rfq_businesstype_other').style.display='inline';
	}
	else {
		document.getElementById('rfq_businesstype_other').style.display='none';
	};
}

function upd_iother_oc() {
	if (document.getElementById('rfq_industry_other').value == '-- Please Clarify --'){
		document.getElementById('rfq_industry_other').value ='' ;
	};
}

function upd_btother_oc() {
	if (document.getElementById('rfq_businesstype_other').value == '-- Please Clarify --'){
		document.getElementById('rfq_businesstype_other').value ='' ;
	};
}

function upd_iother_lf() {
	if (document.getElementById('rfq_industry_other').value == ''){
		document.getElementById('rfq_industry_other').value ='-- Please Clarify --' ;
	};
}

function upd_btother_lf() {
	if (document.getElementById('rfq_businesstype_other').value == ''){
		document.getElementById('rfq_businesstype_other').value ='-- Please Clarify --' ;
	};
}

function upd_ProcSelected() {
	
	var IntPath1 = document.frmRFQ.rfq_memory;
	var IntPath2 = document.frmRFQ.rfq_harddrive;
	var IntPath3 = document.frmRFQ.rfq_powersupply;
	var IntPath4 = document.frmRFQ.rfq_os;
	var IntPath5 = document.frmRFQ.rfq_miscupg;

	IntPath1.options[0].selected=true;
	IntPath2.options[0].selected=true;
	IntPath3.options[0].selected=true;
	IntPath4.options[0].selected=true;
	IntPath5.options[0].selected=true;
}

function upd_Processor() {
	
	var IntPath1 = document.frmRFQ.rfq_memory;
	var IntPath2 = document.frmRFQ.rfq_harddrive;
	var IntPath3 = document.frmRFQ.rfq_powersupply;
	var IntPath4 = document.frmRFQ.rfq_os;
	var IntPath5 = document.frmRFQ.rfq_miscupg;
	
	IntPath1.options.length = 0; 
	IntPath2.options.length = 0; 
	IntPath3.options.length = 0; 
	IntPath4.options.length = 0; 
	IntPath5.options.length = 0; 
	
	IntPath1.options[0] = new Option(option_0,option_val,0);
	IntPath2.options[0] = new Option(option_0,option_val,0);
	IntPath3.options[0] = new Option(option_0,option_val,0);
	IntPath4.options[0] = new Option(option_0,option_val,0);
	IntPath5.options[0] = new Option(option_0,option_val,0);
	
	if (document.getElementById('rfq_processor').selectedIndex==0) {
		IntPath1.options[0] = new Option(option_1,option_val,0)
		IntPath2.options[0] = new Option(option_1,option_val,0)
		IntPath3.options[0] = new Option(option_1,option_val,0)
		IntPath4.options[0] = new Option(option_1,option_val,0)
		IntPath5.options[0] = new Option(option_1,option_val,0)
	}
	
	if (document.getElementById('rfq_processor').selectedIndex==1) {
	
		IntPath1.options[1] = new Option(memory_3,memory_3,1)
		IntPath1.options[2] = new Option(memory_4,memory_4,2)
		IntPath2.options[1] = new Option(harddrive_1,harddrive_1,1)
		IntPath2.options[2] = new Option(harddrive_2,harddrive_2,2)
		IntPath2.options[3] = new Option(harddrive_3,harddrive_3,3)
		IntPath2.options[4] = new Option(harddrive_4,harddrive_4,4)
		IntPath3.options[1] = new Option(powersupply_1,powersupply_1,1)
		IntPath3.options[2] = new Option(powersupply_2,powersupply_2,2)
		IntPath4.options[1] = new Option(os_1,os_1,1)
		IntPath4.options[2] = new Option(os_2,os_2,2)
		IntPath4.options[3] = new Option(os_3,os_3,3)
		IntPath4.options[4] = new Option(os_4,os_4,4)
		IntPath5.options[0] = new Option(miscupg_1,miscupg_1,0)
		
		upd_ProcSelected();

		return;
	};
	
		if (document.getElementById('rfq_processor').selectedIndex==2) {
	
		IntPath1.options[0] = new Option(memory_2,memory_2,0)
		IntPath2.options[1] = new Option(harddrive_1,harddrive_1,1)
		IntPath2.options[2] = new Option(harddrive_2,harddrive_2,2)
		IntPath2.options[3] = new Option(harddrive_3,harddrive_3,3)
		IntPath2.options[4] = new Option(harddrive_4,harddrive_4,4)
		IntPath3.options[1] = new Option(powersupply_1,powersupply_1,1)
		IntPath3.options[2] = new Option(powersupply_2,powersupply_2,2)
		IntPath4.options[1] = new Option(os_1,os_1,1)
		IntPath4.options[2] = new Option(os_2,os_2,2)
		IntPath4.options[3] = new Option(os_3,os_3,3)
		IntPath4.options[4] = new Option(os_4,os_4,4)
		IntPath5.options[0] = new Option(option_0,option_0,0)
		IntPath5.options[1] = new Option(miscupg_2,miscupg_2,1)
		IntPath5.options[2] = new Option(miscupg_3,miscupg_3,2)
		
		upd_ProcSelected();
		
		return;
	};
	
	if (document.getElementById('rfq_processor').selectedIndex==3) {

		IntPath1.options[1] = new Option(memory_3,memory_3,1)
		IntPath1.options[2] = new Option(memory_4,memory_4,2)
		IntPath2.options[1] = new Option(harddrive_1,harddrive_1,1)
		IntPath2.options[2] = new Option(harddrive_2,harddrive_2,2)
		IntPath2.options[3] = new Option(harddrive_3,harddrive_3,3)
		IntPath2.options[4] = new Option(harddrive_4,harddrive_4,4)
		IntPath3.options[1] = new Option(powersupply_1,powersupply_1,1)
		IntPath3.options[2] = new Option(powersupply_2,powersupply_2,2)
		IntPath4.options[1] = new Option(os_1,os_1,1)
		IntPath4.options[2] = new Option(os_2,os_2,2)
		IntPath4.options[3] = new Option(os_3,os_3,3)
		IntPath4.options[4] = new Option(os_4,os_4,4)
		IntPath5.options[0] = new Option(miscupg_1,miscupg_1,0)
		
		upd_ProcSelected();
		
		return;
	};

}

function upd_HDtoOS() {
	
	var IntPath2 = document.frmRFQ.rfq_harddrive;
	var IntPath4 = document.frmRFQ.rfq_os;
	
	IntPath4.options.length = 0; 
	IntPath4.options[0] = new Option(option_0,option_val,0);

	if (document.getElementById('rfq_harddrive').selectedIndex==3 || document.getElementById('rfq_harddrive').selectedIndex==4) {
		IntPath4.options[1] = new Option(os_1,os_1,1)
		IntPath4.options[2] = new Option(os_3,os_3,2)
	} else {
		IntPath4.options[1] = new Option(os_1,os_1,1)
		IntPath4.options[2] = new Option(os_2,os_2,2)
		IntPath4.options[3] = new Option(os_3,os_3,3)
		IntPath4.options[4] = new Option(os_4,os_4,4)
		
	};
	
	IntPath4.options[0].selected=true;
	
}