$("#get_xmldata_99").click(function(){

	var dataString = $("#artikelnummer :input").serialize();

	var id=$(this).val();
		
	
		$.ajax({
			url: "php/lex_get_create_article_xml_varianten_99.php",
			type: "POST",
			data: dataString,
			dataType: 'json',
			success: function (data) {
			
			var numberOfElements = data.length;
			
			$.each(data, function(key,value) {
			$a = 0; $b = 0; $c = 0; $d = 0;
			  for($i=1;$i <= numberOfElements;$i++){
					$('#var' + $i + ' :input').val(data[$a++][0]);       
					$('#menge' + $i + ' :input').val(data[$b++][1]);      
					$('#preis' + $i + ' :input').val(data[$c++][2]);      
					$('#ean' + $i + ' :input').val(data[$d++][3]);      
			  }
			});


			$(".varname").val("Größe"); // SET VARNAME TO THIS ...
			$("#menge :input").val("0"); // SET SINGLE ARTICLE STOCK TO 0
			$("#producer_item_id :input").val(data[0][4]); // SET SINGLE ARTICLE STOCK TO 0
			$("#tabreiter-0-4").prop('disabled', 'disabled');	
			}
				
		});
		//IF NO SUCCESS OPEN CALC TAB AND EMPTY FIELDS (BACK TO START)
		$("#tabreiter-0-4").prop('disabled', '');			
		for($i=1;$i <= 28;$i++){
			$('#var' + $i + ' :input').val('');       
			$('#menge' + $i + ' :input').val('');      
			$('#preis' + $i + ' :input').val('');      
			$('#ean' + $i + ' :input').val('');      
		}
		$("#producer_item_id :input").val('');
		$(".varname").val('');
		

return false;				
});	