var typ = new Array();
typ[0] = new Array('GAA', 'KAD', 'SBT', 'AKT/Recycler', 'Drucker');	// Wincor
typ[1] = new Array('GAA', 'KAD', 'SBT');							// NCR
typ[2] = new Array('GAA');											// Diebold
typ[3] = new Array('AKT/Recycler');									// De la Rue
typ[4] = new Array('andere Typen');									// Keba
typ[5] = new Array('Drucker');										// IBM

var modell = new Array( 
	new Array( 
		new Array('CRS/3100','CSC/45xx','Pro Cash 2xx','Pro Cash 400','Pro Cash 430','andere'),				// Wincor & GAA
		new Array('Pro Print 100','Pro Print 200','Pro Print 1000','Pro Print 2000','4725','CIP','andere'),	// Wincor & KAD
		new Array('ProConsult','ProInfo','andere'),															// Wincor & SBT
		new Array('ProCash BBA','ProCash TCM','andere'),														// Wincor & AKT/Recycler
		new Array('4915','4915 (+)','4905','andere')														// Wincor & Drucker
		),
	new Array( 
		new Array('567x','5684','Persona S70','Persona S74','Persona S84l','Persona S86', 'andere'),	// NCR & GAA
		new Array('5661','5663 (+)','HT Primus','Persona S Print','andere'),							// NCR & KAD
		new Array('HT Profi','Persona S Select','andere')									// NCR & SBT
		
		),
	new Array( 
		new Array('10xx','47xx','andere')										// Diebold & GAA
	),
	new Array( 
		new Array('92xx','52xx','1342','Cash Master','Twin-Safe 1','andere')		// De la Rue & AKT/Recycler
	),
	new Array( 
		new Array('andere')															// Keba & andere Typen
	),
	new Array( 
		new Array('92xx','52xx','1342','Cash Master','Twin-Safe 1','andere')		// IBM & Drucker
	)
	);
var ausstattung = new Array( 
	new Array( 
		new Array(
			new Array('Sunbright Monitor', 'andere Sonderausstattung'), // Wincor & GAA & CRS/3100,
			new Array('Sunbright Monitor', 'andere Sonderausstattung'), // Wincor & GAA & CSC/45xx
			new Array('Sunbright Monitor', 'andere Sonderausstattung'), // Wincor & GAA & Pro Cash 20xx
			new Array('Sunbright Monitor', 'andere Sonderausstattung'), // Wincor & GAA & Pro Cash 200
			new Array('Sunbright Monitor', 'andere Sonderausstattung'), // Wincor & GAA & Pro Cash 430
			new Array('Sunbright Monitor', 'andere Sonderausstattung') // Wincor & GAA & andere
			),				
		new Array(
			new Array('mit EPP/EKC','andere Sonderausstattung'), 		// Wincor & KAD & ProPrint 100
			new Array('mit EPP/EKC','andere Sonderausstattung'), 		// Wincor & KAD & ProPrint 200
			new Array('mit EPP/EKC','andere Sonderausstattung'), 		// Wincor & KAD & ProPrint 1000
			new Array('mit EPP/EKC','andere Sonderausstattung'), 		// Wincor & KAD & ProPrint 2000
			new Array('mit EPP/EKC','andere Sonderausstattung'), 		// Wincor & KAD & 4725
			new Array('mit EPP/EKC','andere Sonderausstattung'), 		// Wincor & KAD & CIP
			new Array('mit EPP/EKC','andere Sonderausstattung') 		// Wincor & KAD & andere
		),	
		new Array(
			new Array('inkl. Scanner','andere Sonderausstattung'), 	// Wincor & SBT & ProConsult
			new Array('inkl. Scanner','andere Sonderausstattung'), 	// Wincor & SBT & ProInfo
			new Array('inkl. Scanner','andere Sonderausstattung') 	// Wincor & SBT & andere
		),															
		new Array(
			'ProCash BBA',
			'ProCash TCM',
			'andere'
		),														// Wincor & AKT/Recycler
		new Array(
			'4915',
			'4915 (+)',
			'4905',
			'andere'
		)																// Wincor & Drucker
	),
	new Array( 
		new Array(
			new Array('andere Sonderausstattung'),		// NCR & GAA & 567x
			new Array('andere Sonderausstattung'),		// NCR & GAA & 5684
			new Array('andere Sonderausstattung'),		// NCR & GAA & Persona S70
			new Array('andere Sonderausstattung'),		// NCR & GAA & Persona S74
			new Array('andere Sonderausstattung'),		// NCR & GAA & Persona S84l
			new Array('andere Sonderausstattung'),		// NCR & GAA & Persona S86
			new Array('andere Sonderausstattung')		// NCR & GAA & andere
		),	
		new Array(
			new Array('andere Sonderausstattung'),		// NCR & KAD & 5661
			new Array('andere Sonderausstattung'),		// NCR & KAD & 5663 (+)
			new Array('andere Sonderausstattung'),		// NCR & KAD & HT Primus
			new Array('andere Sonderausstattung'),		// NCR & KAD & Persona S Print
			new Array('andere Sonderausstattung')		// NCR & KAD & andere
		),
		new Array(
			new Array('andere Sonderausstattung'),		// NCR & SBT & HT Profi
			new Array('andere Sonderausstattung'),		// NCR & SBT & Persona S Select
			new Array('andere Sonderausstattung')		// NCR & SBT & andere
		)											
	),
	new Array( 
		new Array(
			new Array('andere Sonderausstattung'),		// Diebold & GAA & 10xx
			new Array('andere Sonderausstattung'),		// Diebold & GAA & 47xx
			new Array('andere Sonderausstattung')		// Diebold & GAA & andere
		)												
	),
	new Array( 
		new Array(
			new Array('andere Sonderausstattung'),		// De la Rue & AKT/Recycler & 92xx
			new Array('andere Sonderausstattung'),		// De la Rue & AKT/Recycler & 52xx
			new Array('andere Sonderausstattung'),		// De la Rue & AKT/Recycler & 1342
			new Array('andere Sonderausstattung'),		// De la Rue & AKT/Recycler & Cash Master
			new Array('andere Sonderausstattung'),		// De la Rue & AKT/Recycler & Twin-Safe 1
			new Array('andere Sonderausstattung')		// De la Rue & AKT/Recycler & andere
		)				
	),
	new Array( 
		new Array(
			new Array('andere Sonderausstattung')		// Keba & andere Typen & andere
		)
	),
	new Array( 
		new Array(
			new Array('andere Sonderausstattung'),		// IBM & Drucker & 92xx
			new Array('andere Sonderausstattung'),		// IBM & Drucker & 52xx
			new Array('andere Sonderausstattung'),		// IBM & Drucker & 1342
			new Array('andere Sonderausstattung'),		// IBM & Drucker & Cash Master
			new Array('andere Sonderausstattung'),		// IBM & Drucker & Twin-Safe 1
			new Array('andere Sonderausstattung')		// IBM & Drucker & andere
		)		
	)
);

var modes = new Array('hersteller', 'typ', 'modell', 'ausstattung');

function switch_art_div(sel_id)
{
	item_sel =  fiOb("art");
	if(sel_id == 4)
	{
		shLa('art1','show','art2','show');
	}
	else
	{
		shLa('art1','hide','art2','hide');
		item_sel.selectedIndex = 0;
	}
}

function empty_selection(mode_str, nr)
{
	item_sel = fiOb(mode_str + '_' + nr);
	
	if(item_sel.options.length > 2)
	{
		for (i = item_sel.options.length; i >= 2; i--) 
		{
			item_sel.options[i] = null; 
		}
	}
	item_sel.options[0].selected = true;
}

function set_selection(mode, nr)
{
	
	// empty first
	for(i = mode; i <= 3; i++)
	{
		empty_selection(modes[mode], nr);
	}
	
	if(modes[mode] == 'typ')
	{
		var id1_sel = fiOb('hersteller_' + nr);
		var id1 = id1_sel.selectedIndex - 2;
		if(id1 < 0)
		{
			return false;
		}
		
		var item_sel = fiOb('typ_' + nr);
		for (i = 0; i < typ[id1].length; i++) 
		{
			item_sel.options[(i+2)] = new Option(typ[id1][i]);
			item_sel.options[(i+2)].value = typ[id1][i];
		}
	}
	else if(modes[mode] == 'modell')
	{
		var id1_sel = fiOb('hersteller_' + nr);
		var id1 = id1_sel.selectedIndex - 2;
		var id2_sel = fiOb('typ_' + nr);
		var id2 = id2_sel.selectedIndex - 2;
		if(id2 < 0)
		{
			return false;
		}
		
		var item_sel = fiOb('modell_' + nr);
		for (i = 0; i < modell[id1][id2].length; i++) 
		{
			item_sel.options[(i+2)] = new Option(modell[id1][id2][i]);
			item_sel.options[(i+2)].value = modell[id1][id2][i];
		}
	}
	else if(modes[mode] == 'ausstattung')
	{
		var id1_sel = fiOb('hersteller_' + nr);
		var id1 = id1_sel.selectedIndex - 2;
		var id2_sel = fiOb('typ_' + nr);
		var id2 = id2_sel.selectedIndex - 2;
		var id3_sel = fiOb('modell_' + nr);
		var id3 = id3_sel.selectedIndex - 2;
		if(id3 < 0)
		{
			return false;
		}
		
		var item_sel = fiOb('ausstattung_' + nr);
		for (i = 0; i < ausstattung[id1][id2][id3].length; i++) 
		{
			item_sel.options[(i+2)] = new Option(ausstattung[id1][id2][id3][i]);
			item_sel.options[(i+2)].value = ausstattung[id1][id2][id3][i];
		}
	}
		
}	