function FensterOeffnen (Adresse) 
{
  Fenster1 = window.open(Adresse, "_blank", "width=500,height=519,left=200,top=100"); Fenster1.focus();
  Fenster1.focus();
}

  function FensterOeffnen_460x379 (Adresse) 
{ Fenster1 = window.open(Adresse, "_blank", "width=460,height=379,left=200,top=100"); Fenster1.focus(); } 
 
function fensteropen_560x393 (Adresse) 
{ Fenster1 = window.open(Adresse, "_blank", "width=560,height=393,left=200,top=100"); Fenster1.focus(); } 
 

function FensterOeffnenAdr (Zip,Town,Town2,Street,Country) 
{
  if (Zip.length==0 && Town.length==0 && Town2.length==0 && Street.length==0)
  {
    alert("Bitte füllen Sie mindestens eines der Felder aus");
  }
  else
  {
    if (Country == "P" || Country == "E")
    {
      Fenster1 = window.open("http://www.yellowmap.de/Filialfinder/HTML/POIIsoPartner.aspx?Partner=Aldi-Nord&SecurityID=ZjP1IF/WCnhs4Sq0X5k13A==&GeoFormatDatabase=3&GeoFormatIn=3&Radius=1000000&BC=ALDN&Search=1&Locale=nl-BE&Country="+Country+"&Zip="+Zip+"&Town="+Town+"&Town2="+Town2+"&Street="+Street, "Zweitfenster", "width=800,height=600,left=200,top=100,scrollbars=yes"); Fenster1.focus();
      Fenster1.focus();
    }
    else
    {
      Fenster1 = window.open("http://www.yellowmap.de/Filialfinder/HTML/POIIsoPartner.aspx?Partner=Aldi-Nord&SecurityID=ZjP1IF/WCnhs4Sq0X5k13A==&Radius=250000&BC=ALDN&Search=1&Locale=nl-BE&Country="+Country+"&Zip="+Zip+"&Town="+Town+"&Town2="+Town2+"&Street="+Street, "Zweitfenster", "width=800,height=600,left=200,top=100,scrollbars=yes"); Fenster1.focus();
      Fenster1.focus();
    }
  }
  return false;
}

function FensterOeffnenEmail (email) 
{
  if (email.length==0)
  {
    alert("Bitte geben Sie Ihre Email Adresse an.");
  }
  else
  {
    document.newsletterform.submit();
  }
  return false;
}
function filename(path)
{
	var thefile= path.substring( path.lastIndexOf('/') +1, path.length  );
	if (thefile == "") { thefile = "index.shtml" };
	return thefile;
}

function pathname(path)
{
	return path.substring( 0,path.lastIndexOf('/') );
}

function drucken()
{
	var path = document.location.pathname ; 
	var printfile = pathname(path)+"/P_"+filename(path) ;
	printfile = printfile + document.location.search ;
	Fenster1 = window.open(printfile,"ALDIdrucken","width=760,height=500,left=50,top=50,scrollbars=yes,location=no,menubar=no,resizeable=yes,status=no,toolbar=no");
  Fenster1.focus();
}

function drucken2(server)
{
	Fenster2 = window.open("http://"+server+"/EINKAUFSZETTEL_BN/P_index.shtml","ALDIdrucken","width=760,height=500,left=50,top=50,scrollbars=yes,location=no,menubar=no,resizeable=yes,status=no,toolbar=no");
  Fenster2.focus();
}

function empfehlen()
{
	Fenster3 = window.open("/PHP/empfehlen.php?page="+document.location.pathname,"ALDIempfehlen","width=400,height=550,left=50,top=50");
  Fenster3.focus();	
}

function FensterOeffnen3 (Adresse) 
{
  Fenster4 = window.open(Adresse, "Zweitfenster", "width=400,height=550,left=200,top=100");
  Fenster4.focus();
}
