function adressfenster( typ , aktion, verweis)
{
	switch (aktion)
	{
	case 1:
		datei = "adresse_eingabe.asp?typ=" + typ + "&verweis=" + verweis + "&aktion=neu";
		break;
	case 2:
		datei = "adresse_liste.asp?typ=" + typ + "&verweis=" + verweis + "&aktion=bearbeiten";
		break;
	case 3:
		datei = "adresse_liste.asp?typ=" + typ + "&verweis=" + verweis + "&aktion=loeschen";
		break;
	}


	the_window=window.open( datei,typ+aktion+verweis,"toolbar=no,directories=no,menubar=no,location=no,status=no,resizable=no,scrollbars=yes,width=640,height=270,top=100,left=100");

	if(the_window!=null)
	{
		if(the_window.opener == null) 
		{
			the_window.opener=self;
		}
	}
}

function new_window( artikelnummer )
{
	datei = "/b2b/artikelbild.asp?artikelnummer=" + escape(artikelnummer);

	the_window=window.open( datei,'Artikelbild' + artikelnummer,"toolbar=no,directories=no,menubar=no,location=no,status=no,resizable=yes,scrollbars=no,width=205,height=205,top=100,left=100");

	if(the_window!=null)
	{
		if(the_window.opener == null) 
		{
			the_window.opener=self;
		}
	}
}

function impressum_zeigen( typ )
{
	datei = "/b2b/impressum.asp?typ=" + escape(typ);

	the_window=window.open( datei,typ,"toolbar=no,directories=no,menubar=no,location=no,status=no,resizable=yes,scrollbars=yes,width=640,height=420,top=100,left=100");

	if(the_window!=null)
	{
		if(the_window.opener == null) 
		{
			the_window.opener=self;
		}
	}
	
	return(false);
}


function isEMail(EMail) 
{
    var teiler = /^([a-zA-Z0-9_\-\.]+)@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.)|(([a-zA-Z0-9\-]+\.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(\]?)$/;
    var EMail_split = EMail.match(teiler);
	    if (EMail_split == null) {
        alert("Bitte geben Sie eine richtige eMail Adresse an");
        return false;
    }
    return true;
}

function isZahl( Zahl,intKomma,intAlarm ) 
{
	//1 = mit Komma
	//0 = ohne Komma
	Zahl = Zahl.replace(/\s+/g,' ').replace(/^\s*|\s+$/g,'');
	switch( intKomma ){
		case 1 :
			var teiler = /^\d+\d*((\,+\d+\d*)|(\d*))$/;
			break;
		case 0 :
			var teiler = /^\d+\d*$/;
			break;
		default :
			return( false );
			break;
	}
	var Zahl_split = Zahl.match(teiler);

	if (Zahl_split == null) {
		if (intAlarm == 1) alert("Bitte geben Sie einen korrekten Wert ein.");
		return false;
	}
	return true;
}


function neues_fenster( url,x,y )
{
	the_window=window.open( url,'fenster',"toolbar=no,directories=no,menubar=no,location=no,status=no,resizable=yes,scrollbars=no,width=" + x + ",height=" + y + ",top=100,left=100");

	if(the_window!=null)
	{
		if(the_window.opener == null) 
		{
			the_window.opener=self;
		}
	}
}