var artikel_id;

function download_agb()
{
	window1=window.open("./agb_print.php","AGB","width=550,height=400,left=180,top=100,scrollbars=YES,resizable=yes");
	window1.focus();
}

function showBillpayTermsPopup() {
	showBillpayGenericPopup('billpay-popup-terms', 'https://www.billpay.de/api/agb', 620, 450, 50);
};

function showBillpayPrivacyPopup() {
	showBillpayGenericPopup('billpay-popup-privacy', 'https://www.billpay.de/api/agb#datenschutz', 620, 450, 0);
};

function showBillpayGenericPopup(containerId, url, width, height, marginTop) {
	var iframeId = containerId + '-iframe';
	
	initBillpayGenericPopup(containerId, iframeId, width, height, marginTop);
	
	var scroll = self.pageYOffset||document.body.scrollTop||document.documentElement.scrollTop;
	var top = scroll + marginTop;

	var iframe = document.getElementById(iframeId);
	iframe.src = url;
	
	var container = document.getElementById(containerId);
	container.style.display = 'block';
	container.style.top = top + 'px';
};

function initBillpayGenericPopup(containerId, iframeId, width, height, marginTop) {
	if (document.getElementById(containerId) == null) {
		var div = document.createElement('div');
		div.id = containerId;
		div.style.display = 'none';
		div.style.backgroundColor = '#FFFFFF';
		div.style.border = 'solid 1px black';
		div.style.width = width + 'px';
		div.style.position = 'absolute';
		div.style.left = (document.documentElement.offsetWidth/2 - 250) + 'px';
		div.style.top = marginTop + 'px';
		div.style.zIndex = 9999;
		div.style.padding = '10px';
		
		var iframe = document.createElement('iframe');
		iframe.id = iframeId;
		iframe.frameBorder = 0;
		iframe.style.border = 0;
		iframe.style.width = div.style.width;
		iframe.style.height = height + 'px';
		iframe.style.overflowX = 'hidden';
		div.appendChild(iframe);
		
		var button = document.createElement('a');
		button.href = '#';
		button.innerHTML = 'Schlie&szlig;en';
		button.onclick = function() {
			document.getElementById(containerId).style.display = 'none';
			return false;
		};
		
		div.appendChild(button);
		document.body.insertBefore(div,null);
	}
};







var check
function loeschen()
{
Check = confirm("Wollen Sie diese Artikel wirklich löschen?");
if(Check == false)
{
return false
}
else
{
return true;
}
}
