// PROZESSOR STANDARD

function init_cpu1(url)
{
  if(window.XMLHttpRequest)req_cpu1=new XMLHttpRequest();
  else if(window.ActiveXObject)req_cpu1=new ActiveXObject("Microsoft.XMLHTTP");

  if(req_cpu1)
  {
    req_cpu1.onreadystatechange=callback_cpu1;
    if(url==0){
	var laenge = document.formular.cpu1.length;
		for (i=0; i <laenge; i++){
			document.formular.cpu1.options[document.formular.cpu1.length-1] = null;
		}
		cpu_standard = new Option("-", "0;0;0;0;0", false, false);
		document.formular.cpu1.options[document.formular.cpu1.options.length] = cpu_standard;
	}
    if(url!=0){    
	req_cpu1.open("GET",url,true);
	req_cpu1.send(null);
	}
  }
}

function callback_cpu1()
{
  if(req_cpu1.readyState==4) // complete
  {
    if(req_cpu1.status==200) // OK
    {
	xmldoc_cpu1=req_cpu1.responseXML;
	var cpu_zahl = xmldoc_cpu1.getElementsByTagName('cpu').length;

	// alle Eintraege loeschen
	var laenge = document.formular.cpu1.length;
	for (i=1; i <laenge; i++){
		document.formular.cpu1.options[document.formular.cpu1.length-1] = null;
	}

	// neue Eintraege hinzufuegen
	for (i=0; i < cpu_zahl; i++)
	{
		var cpu_name = xmldoc_cpu1.getElementsByTagName('cpu').item([i]);
		var cpu_data = xmldoc_cpu1.getElementsByTagName('daten').item([i]);
		cpu_standard = new Option(cpu_name.firstChild.data, cpu_data.firstChild.data, false, false);
		document.formular.cpu1.options[document.formular.cpu1.options.length] = cpu_standard;
	}
    }
  }
}

function init_cpu2(url)
{
  if(window.XMLHttpRequest)req_cpu2=new XMLHttpRequest();
  else if(window.ActiveXObject)req_cpu2=new ActiveXObject("Microsoft.XMLHTTP");

  if(req_cpu2)
  {
    req_cpu2.onreadystatechange=callback_cpu2;
    if(url==0){
	var laenge = document.form_expert.cpu1_expert.length;
		for (i=0; i <laenge; i++){
			document.form_expert.cpu1_expert.options[document.form_expert.cpu1_expert.length-1] = null;
		}
		cpu_expert = new Option("-", "0;0;0;0;0", false, false);
		document.form_expert.cpu1_expert.options[document.form_expert.cpu1_expert.options.length] = cpu_expert;
	}
    if(url!=0){    
	req_cpu2.open("GET",url,true);
	req_cpu2.send(null);
	}
  }
}

function callback_cpu2()
{
  if(req_cpu2.readyState==4) // complete
  {
    if(req_cpu2.status==200) // OK
    {
	xmldoc_cpu2=req_cpu2.responseXML;
	var cpu_zahl = xmldoc_cpu2.getElementsByTagName('cpu').length;

	// alle Eintraege loeschen
	var laenge = document.form_expert.cpu1_expert.length;
	for (i=1; i <laenge; i++){
		document.form_expert.cpu1_expert.options[document.form_expert.cpu1_expert.length-1] = null;
	}

	// neue Eintraege hinzufuegen
	for (i=0; i < cpu_zahl; i++)
	{
		var cpu_name = xmldoc_cpu2.getElementsByTagName('cpu').item([i]);
		var cpu_data = xmldoc_cpu2.getElementsByTagName('daten').item([i]);
		cpu_expert = new Option(cpu_name.firstChild.data, cpu_data.firstChild.data, false, false);
		document.form_expert.cpu1_expert.options[document.form_expert.cpu1_expert.options.length] = cpu_expert;
	}
    }
  }
}

// GRAFIKKARTE STANDARD

function init_gfx1(url)
{
  if(window.XMLHttpRequest)req_gfx1=new XMLHttpRequest();
  else if(window.ActiveXObject)req_gfx1=new ActiveXObject("Microsoft.XMLHTTP");

  if(req_gfx1)
  {
    req_gfx1.onreadystatechange=callback_gfx1;
    if(url==0){
	var laenge = document.formular.gfx1.length;
		for (i=0; i <laenge; i++){
			document.formular.gfx1.options[document.formular.gfx1.length-1] = null;
		}
		gfx1_standard = new Option("-", "0;0;0", false, false);
		document.formular.gfx1.options[document.formular.gfx1.options.length] = gfx1_standard;
	}
    if(url!=0){    
	req_gfx1.open("GET",url,true);
	req_gfx1.send(null);
	}
  }
}

function callback_gfx1()
{
  if(req_gfx1.readyState==4) // complete
  {
    if(req_gfx1.status==200) // OK
    {
	xmldoc_gfx1=req_gfx1.responseXML;
	var gfx_zahl = xmldoc_gfx1.getElementsByTagName('graka').length;

	// alle Eintraege loeschen
	var laenge = document.formular.gfx1.length;
	for (i=1; i <laenge; i++){
		document.formular.gfx1.options[document.formular.gfx1.length-1] = null;
	}

	// neue Eintraege hinzufuegen
	for (i=0; i < gfx_zahl; i++)
	{
		var gfx_name = xmldoc_gfx1.getElementsByTagName('graka').item([i]);
		var gfx_data = xmldoc_gfx1.getElementsByTagName('daten').item([i]);
		gfx1_standard = new Option(gfx_name.firstChild.data, gfx_data.firstChild.data, false, false);
		document.formular.gfx1.options[document.formular.gfx1.options.length] = gfx1_standard;
	}
    }
  }
}

function init_gfx2(url)
{
  if(window.XMLHttpRequest)req_gfx2=new XMLHttpRequest();
  else if(window.ActiveXObject)req_gfx2=new ActiveXObject("Microsoft.XMLHTTP");

  if(req_gfx2)
  {
    req_gfx2.onreadystatechange=callback_gfx2;
    if(url==0){
	var laenge = document.formular.gfx2.length;
		for (i=0; i <laenge; i++){
			document.formular.gfx2.options[document.formular.gfx2.length-1] = null;
		}
		gfx2_standard = new Option("-", "0;0;0", false, false);
		document.formular.gfx2.options[document.formular.gfx2.options.length] = gfx2_standard;
	}
    if(url!=0){    
	req_gfx2.open("GET",url,true);
	req_gfx2.send(null);
	}
  }
}

function callback_gfx2()
{
  if(req_gfx2.readyState==4) // complete
  {
    if(req_gfx2.status==200) // OK
    {
	xmldoc_gfx2=req_gfx2.responseXML;
	var gfx_zahl = xmldoc_gfx2.getElementsByTagName('graka').length;

	// alle Eintraege loeschen
	var laenge = document.formular.gfx2.length;
	for (i=1; i <laenge; i++){
		document.formular.gfx2.options[document.formular.gfx2.length-1] = null;
	}

	// neue Eintraege hinzufuegen
	for (i=0; i < gfx_zahl; i++)
	{
		var gfx_name = xmldoc_gfx2.getElementsByTagName('graka').item([i]);
		var gfx_data = xmldoc_gfx2.getElementsByTagName('daten').item([i]);
		gfx2_standard = new Option(gfx_name.firstChild.data, gfx_data.firstChild.data, false, false);
		document.formular.gfx2.options[document.formular.gfx2.options.length] = gfx2_standard;
	}
    }
  }
}

function init_gfx3(url)
{
  if(window.XMLHttpRequest)req_gfx3=new XMLHttpRequest();
  else if(window.ActiveXObject)req_gfx3=new ActiveXObject("Microsoft.XMLHTTP");

  if(req_gfx3)
  {
    req_gfx3.onreadystatechange=callback_gfx3;
    if(url==0){
	var laenge = document.form_expert.gfx1_expert.length;
		for (i=0; i <laenge; i++){
			document.form_expert.gfx1_expert.options[document.form_expert.gfx1_expert.length-1] = null;
		}
		gfx1_expert = new Option("-", "0;0;0", false, false);
		document.form_expert.gfx1_expert.options[document.form_expert.gfx1_expert.options.length] = gfx1_expert;
	}
    if(url!=0){    
	req_gfx3.open("GET",url,true);
	req_gfx3.send(null);
	}
  }
}

function callback_gfx3()
{
  if(req_gfx3.readyState==4) // complete
  {
    if(req_gfx3.status==200) // OK
    {
	xmldoc_gfx3=req_gfx3.responseXML;
	var gfx_zahl = xmldoc_gfx3.getElementsByTagName('graka').length;

	// alle Eintraege loeschen
	var laenge = document.form_expert.gfx1_expert.length;
	for (i=1; i <laenge; i++){
		document.form_expert.gfx1_expert.options[document.form_expert.gfx1_expert.length-1] = null;
	}

	// neue Eintraege hinzufuegen
	for (i=0; i < gfx_zahl; i++)
	{
		var gfx_name = xmldoc_gfx3.getElementsByTagName('graka').item([i]);
		var gfx_data = xmldoc_gfx3.getElementsByTagName('daten').item([i]);
		gfx1_expert = new Option(gfx_name.firstChild.data, gfx_data.firstChild.data, false, false);
		document.form_expert.gfx1_expert.options[document.form_expert.gfx1_expert.options.length] = gfx1_expert;
	}
    }
  }
}

function init_gfx4(url)
{
  if(window.XMLHttpRequest)req_gfx4=new XMLHttpRequest();
  else if(window.ActiveXObject)req_gfx4=new ActiveXObject("Microsoft.XMLHTTP");

  if(req_gfx4)
  {
    req_gfx4.onreadystatechange=callback_gfx4;
    if(url==0){
	var laenge = document.form_expert.gfx2_expert.length;
		for (i=0; i <laenge; i++){
			document.form_expert.gfx2_expert.options[document.form_expert.gfx2_expert.length-1] = null;
		}
		gfx2_expert = new Option("-", "0;0;0", false, false);
		document.form_expert.gfx2_expert.options[document.form_expert.gfx2_expert.options.length] = gfx2_expert;
	}
    if(url!=0){    
	req_gfx4.open("GET",url,true);
	req_gfx4.send(null);
	}
  }
}

function callback_gfx4()
{
  if(req_gfx4.readyState==4) // complete
  {
    if(req_gfx4.status==200) // OK
    {
	xmldoc_gfx4=req_gfx4.responseXML;
	var gfx_zahl = xmldoc_gfx4.getElementsByTagName('graka').length;

	// alle Eintraege loeschen
	var laenge = document.form_expert.gfx2_expert.length;
	for (i=1; i <laenge; i++){
		document.form_expert.gfx2_expert.options[document.form_expert.gfx2_expert.length-1] = null;
	}

	// neue Eintraege hinzufuegen
	for (i=0; i < gfx_zahl; i++)
	{
		var gfx_name = xmldoc_gfx4.getElementsByTagName('graka').item([i]);
		var gfx_data = xmldoc_gfx4.getElementsByTagName('daten').item([i]);
		gfx2_expert = new Option(gfx_name.firstChild.data, gfx_data.firstChild.data, false, false);
		document.form_expert.gfx2_expert.options[document.form_expert.gfx2_expert.options.length] = gfx2_expert;
	}
    }
  }
}