function Neu(url) {
window.open(url, "", "width=800,height=700,scrollbars=yes,status=yes");}

function IndenKorbausListe() {
alert("Das Produkt wird in die Merkliste verschoben");}

function ImKorb() {
Check = confirm('Das Produkt wurde im Warenkorb abgelegt!\n\nMöchten Sie den Warenkorb aufrufen?\n\nWenn Sie ein weiteres Produkt bestellen möchten, klicken Sie "Abbrechen"!')
if (Check == true) {
document.location.href="/warenkorb.html"}}

function DelPro() {
	validity = true;
	Check = confirm('Möchten Sie das Produkt aus dem Warenkorb löschen ?')
	if (Check == false) {
		validity = false }
	return validity
}

function DeleteAll(SessID) {
Check = confirm('Möchten Sie alle Produkte im Warenkorb löschen ?')
if (Check == true) {
document.location.href="../PHP/deleteall.php?SessID=" + SessID + ""}}

function InDenKorb(SessID,BestKAT,BestProID,AW,AW2,Menge,BestPro) {
Check = confirm('Möchten Sie ' + Menge + ' x ' + BestPro + ' in den Warenkorb ablegen ?')
if (Check == true) {
document.location.href="../PHP/InDenKorb(alt).php?SessID=" + SessID + "&KAT=" + BestKAT + "&ProID=" + BestProID + "&Auswahl=" + AW + " " + AW2 + "&Menge=" + Menge + "";}}


// Prüfung ob Suchfeld gefüllt wurde

function validate_form() {
  validity = true; // assume valid
  if (!check_empty(document.frmSuche.strgSuche.value))
        { validity = false; alert('Bitte geben Sie einen Suchbegriff ein!'); }
  return validity;
}

function check_empty(text) {
  return (text.length > 0); // gibt false zurück wenn leehr
}


// Script by Thomas Stich
// http://www.stichpunkt.de/beitrag/popup.html

var pop = null;

function popdown() {
  if (pop && !pop.closed) pop.close();
}

function popup(obj,w,h) {
  var url = (obj.getAttribute) ? obj.getAttribute('href') : obj.href;
  if (!url) return true;
  w = (w) ? w += 20 : 150;  // 150px*150px is the default size
  h = (h) ? h += 25 : 150;
  var args = 'width='+w+',height='+h+',resizable,scrollbars=yes';
  popdown();
  pop = window.open(url,'',args);
  return (pop) ? false : true;
}

//window.onunload = popdown;
//window.onfocus = popdown;
