var artikel_id;
/*function Info(artikel_id)
{
info2 = window.open("./info.php?id="+artikel_id, "Ubersicht","width=650,height=550,left=200,top=150,scrollbars=yes");
info2.focus();
}*/


/*function showimg(bild, h, w)
{
	info2 = window.open("artikelbild.php?bild=" + bild, "Bild","width=" + w + ",height=" + h + ",left=200,top=150,scrollbars=yes,resizable=yes");
	info2.focus();
}*/

/*function downloadKatalog (id)
{
	info2 = window.open("./katalog_download.php?id="+id, "Ubersicht","width=650,height=550,left=200,top=150,scrollbars=yes,resizable=yes");
	info2.focus();
}*/

/*function downloadMerkliste (id)
{
	info2 = window.open("./angebot_download.php?id="+id, "Ubersicht","width=650,height=550,left=200,top=150,scrollbars=yes,resizable=yes");
	info2.focus();
}*/

/*function warenkorb_info()
{
info3 = window.open("about:blank", "warenkorb2","width=250,height=150,left=200,top=150,scrollbars=yes");
info3.focus();
}*/
function downloadPDF (id, url)
{
	info2 = window.open(url+"pdf_download.php?id="+id, "Ubersicht","width=650,height=550,left=200,top=150,scrollbars=yes,resizable=yes");
	info2.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;
}
}
