
function ShowDiv(a)
	{
		document.getElementById('task1').style.display = 'none';
		document.getElementById('task2').style.display = 'none';
		document.getElementById('task3').style.display = 'none';
		document.getElementById('task4').style.display = 'none';
		document.getElementById(a).style.display = 'block';

		document.getElementById('task1a').className = 'tab1';
		document.getElementById('task2a').className = 'tab1';
		document.getElementById('task3a').className = 'tab1';
		document.getElementById('task4a').className = 'tab1';
		document.getElementById(a + 'a').className = 'tab1_active';
	}

function ShowHideDiv(a,b)
	{
		document.getElementById(a).style.display = b;
	}

function HideAllShowOneDiv(a,b,c)
{
	/*
	a - elotag
	b - hany van ebbol
	c - akit megjelenitunk
	*/
	for(var i=1;i<=b;i++)
	{
		document.getElementById(a + i).style.display = 'none';
		document.getElementById(a + i).className = 'tab1';
	}
	document.getElementById(c).style.display = 'display';
	document.getElementById(c).className = 'tab1_active';
}

function ShowAllDiv(a,b)
{
	document.getElementById(a).style.display = b;
}

// myAddBasket('NPICEGLK1047', document.getElementById('count_NPICEGLK1047').value, 1);

function myAddBasket(TermekKod, count, rendelhetodb){
	var hiba = 0;
	
	belso_TermekKod = TermekKod;
	if(rendelhetodb>1){
		if( count < rendelhetodb || count % rendelhetodb>0) {hiba = 1;}
	}
	
	if(count<1){hiba = 1;}
	//if(count==-1){ hiba = 0 } //kivétel a kosrából
	
	if(hiba == 0){
		$.post(
			'modules/data/myaddbasket.php',
			{ TermekKod:TermekKod, count:count },
			function(data){ 
				$('#count_'+TermekKod).val('0');
				$('#basketBoxHolder').html(data);
			},
			'html'
		);	
	}
	
	else
	{
		if( count<1){
			alert("Adjon meg mennyiséget!");
		}
		else{
			alert("Csak a rendelési egység többszöröse helyezhető a kosárba!");
		}
	}
}
