function landauswahl(pfad) {

	if(document.form_bezugsquellen.landselect.value != "") {
	
		location.href = ""+pfad+"/modul|quelle|"+document.form_bezugsquellen.landselect.value+"/index.pmode";
	
	}
}

function sendkatquery() {

	if(document.form_kat.kats.value != "") {
	
		location.href = document.form_kat.kats.value;
	
	}
}

function sendkatqueryhaendler() {

	if(document.form_kat.kats.value != "") {
	
		location.href = document.form_kat.kats.value;
	
	}
}

function empfehlen(url,lang) {

	var ansichtwin;
	
	var hor;
	var vert;
	var posv;
	var posh;
	
	hor = screen.width;
	vert = screen.height;
	
	posv = (vert-498) / 2;	
	posh = (hor-464) / 2;
	
	ansichtwin = window.open(""+server+"/empfehlen.php?lang="+lang+"&url="+url+"","Ansicht","width=464, height=498, resizable=no, status=no, scrollbars=no, left="+posh+", top="+posv+"");
	
	ansichtwin.focus();

}


function getpassword(lang) {

	var passwin;
	
	var hor;
	var vert;
	var posv;
	var posh;
	
	hor = screen.width;
	vert = screen.height;
	
	posv = (vert-300) / 2;	
	posh = (hor-464) / 2;
	
	passwin = window.open(""+server+"/passwort.php?lang="+lang+"","Ansicht","width=464, height=300, resizable=no, status=no, scrollbars=no, left="+posh+", top="+posv+"");
	
	passwin.focus();

}

function englisch() {

	var englischwin;
	
	var hor;
	var vert;
	var posv;
	var posh;
	
	hor = screen.width;
	vert = screen.height;
	
	posv = (vert-300) / 2;	
	posh = (hor-464) / 2;
	
	englischwin = window.open(""+server+"/englisch.php","Ansicht","width=464, height=300, resizable=no, status=no, scrollbars=no, left="+posh+", top="+posv+"");
	
	englischwin.focus();

}

function GetGroupKats() {

	if(document.form_kat.gruppen.value != "") {
		
		var gruppe = document.form_kat.gruppen.value;
		
		location.href = server+"/"+language+"/haendlerbereich/onlineshop/index.pmode/modul|shop|"+gruppe+"/index.pmode";
	
	}

}


function GetArtikelByKat() {

	if(document.form_kat.gruppen.value != "" && document.form_kat.kats.value != "") {
		
		var gruppe = document.form_kat.gruppen.value;
		var kats = document.form_kat.kats.value;
		
		location.href = server+"/"+language+"/haendlerbereich/onlineshop/index.pmode/modul|shop|"+gruppe+"|"+kats+"/index.pmode";
	
	}

}

function addtocart(pid) {
	
	if(document.forms["form_produkte"].elements["produkt_"+pid+""].value != "") {
		
		document.form_produkte.selpid.value = pid;
		document.forms["form_produkte"].submit();
	
	}
}

function updatecart(i) {
	
	if(document.form_produkte.elements["produkt_"+i+""].value != "") {
		
		document.form_produkte.selpid.value = i;
		document.form_produkte.submit();
	
	}
}


function CheckForm() {
	
	document.getElementById("landselect").style.display = "none";
	document.getElementById("anredeselect").style.display = "none";
	document.getElementById("supportselect").style.display = "none";
	
	document.getElementById("agb").style.display = "block";
		
}

function SendReg() {
	
	document.getElementById("landselect").style.display = "block";
	document.getElementById("anredeselect").style.display = "block";
	document.getElementById("supportselect").style.display = "block";
	
	document.registrierung.submit()

} 

function HideAGB() {
	
	document.getElementById("landselect").style.display = "block";
	document.getElementById("anredeselect").style.display = "block";
	document.getElementById("supportselect").style.display = "block";
	
	document.getElementById("agb").style.display = "none";

} 

	  function setstatus(cmd) {
				
		var DIVARRAY = Array("basis_show","basis_edit","rechnung_show","rechnung_edit","zahlung_show","zahlung_edit","bank_show","bank_edit","bemerkung_show","bemerkung_edit","anschriften_show","anschriften_edit");
		
		if(cmd == "show") {

			document.daten.cmd.value = "show";
		} else {

			document.daten.cmd.value = "edit";
		
		}
		
			area = document.daten.area.value+"_"+document.daten.cmd.value;

			for(i=0;i<DIVARRAY.length;i++) {
			
				if(document.getElementById(""+DIVARRAY[i]+""))
					document.getElementById(""+DIVARRAY[i]+"").style.display = "none";			
			
			}			

			if(document.getElementById(""+area+""))
				document.getElementById(""+area+"").style.display = "block";

	  }
  	  
  	  
  	  function setblock(area) {
  	  
  	  	document.daten.area.value = ""+area+"";
  	  	
  	  	setstatus("show");
  	  }

function ChangeProfilView(area) {

	var DIVARRAY = Array("stammdaten","lieferdaten","bestelldaten");
	
	if(area != "") {
		
		document.profil.area.value = area;
		
		for(i=0;i<DIVARRAY.length;i++) {

			if(document.getElementById(""+DIVARRAY[i]+""))
				document.getElementById(""+DIVARRAY[i]+"").style.display = "none";			

		}			

		if(document.getElementById(""+area+""))
			document.getElementById(""+area+"").style.display = "block";

	}
}


function ShowAddToButton(area) {
	
	document.getElementById(""+area+"").style.display = "block";

}