function disEnableBelade() {

  var elems = new Array(
                        //document.signup_kunde_step1.b_strasse,
                        document.signup_kunde_step1.b_weg,
                        document.signup_kunde_step1.b_stock_0,
                        document.signup_kunde_step1.b_stock_1,
                        document.signup_kunde_step1.b_stock_2,
                        document.signup_kunde_step1.b_stock_3,
                        document.signup_kunde_step1.b_stock_4,
                        document.signup_kunde_step1.b_stock_5,
                        document.signup_kunde_step1.b_stock_6,
                        document.signup_kunde_step1.b_stock_7,
                        document.signup_kunde_step1.b_hh,
                        document.signup_kunde_step1.b_tfg,
                        document.signup_kunde_step1.b_liftgr,
                        document.signup_kunde_step1.b_lifterw,
                        document.signup_kunde_step1.b_halte);

  var t = null;
  if (document.signup_kunde_step1.b_lager.checked == false) {
      var deaktiviert = false;
    } else {
      var deaktiviert = true;
    }
    for (var i = 0; i < elems.length; i++) {
       elems[i].disabled = deaktiviert;
    }
}

function disEnableBeladeWiz() {

  var elems = new Array(
			document.signup_kunden_step3.b_weg,
			document.signup_kunden_step3.b_stock_0,
			document.signup_kunden_step3.b_stock_1,
			document.signup_kunden_step3.b_stock_2,
			document.signup_kunden_step3.b_stock_3,
			document.signup_kunden_step3.b_stock_4,
			document.signup_kunden_step3.b_stock_5,
			document.signup_kunden_step3.b_stock_6,
			document.signup_kunden_step3.b_stock_7,
			document.signup_kunden_step3.b_hh,
			document.signup_kunden_step3.b_tfg,
			document.signup_kunden_step3.b_liftgr,
			document.signup_kunden_step3.b_lifterw,
			document.signup_kunden_step3.b_halte);

  var t = null;
  if (document.signup_kunden_step3.b_lager.checked == false) {
      var deaktiviert = false;
    } else {
      var deaktiviert = true;
    }
    for (var i = 0; i < elems.length; i++) {
       elems[i].disabled = deaktiviert;
    }
}

function disEnableEntlade() {

  var elems = new Array(
                        document.signup_kunde_step1.e_strasse,
                        document.signup_kunde_step1.e_weg,
                        document.signup_kunde_step1.e_stock_0,
                        document.signup_kunde_step1.e_stock_1,
                        document.signup_kunde_step1.e_stock_2,
                        document.signup_kunde_step1.e_stock_3,
                        document.signup_kunde_step1.e_stock_4,
                        document.signup_kunde_step1.e_stock_5,
                        document.signup_kunde_step1.e_stock_6,
                        document.signup_kunde_step1.e_stock_7,
                        document.signup_kunde_step1.e_hh,
                        document.signup_kunde_step1.e_tfg,
                        document.signup_kunde_step1.e_liftgr,
                        document.signup_kunde_step1.e_lifterw,
                        document.signup_kunde_step1.e_halte);

  var t = null;
  if (document.signup_kunde_step1.e_lager.checked == false) {
      var deaktiviert = false;
    } else {
      var deaktiviert = true;
    }
    for (var i = 0; i < elems.length; i++) {
       elems[i].disabled = deaktiviert;
    }
}
function disEnableEntladeWiz() {
  var elems = new Array(
			document.signup_kunden_step4.e_strasse,
			document.signup_kunden_step4.e_weg,
			document.signup_kunden_step4.e_stock_0,
			document.signup_kunden_step4.e_stock_1,
			document.signup_kunden_step4.e_stock_2,
			document.signup_kunden_step4.e_stock_3,
			document.signup_kunden_step4.e_stock_4,
			document.signup_kunden_step4.e_stock_5,
			document.signup_kunden_step4.e_stock_6,
			document.signup_kunden_step4.e_stock_7,
			document.signup_kunden_step4.e_hh,
			document.signup_kunden_step4.e_tfg,
			document.signup_kunden_step4.e_liftgr,
			document.signup_kunden_step4.e_lifterw,
			document.signup_kunden_step4.e_halte);
  var t = null;
  if (document.signup_kunden_step4.e_lager.checked == false) {
      var deaktiviert = false;
    } else {
      var deaktiviert = true;
    }
    for (var i = 0; i < elems.length; i++) {
       elems[i].disabled = deaktiviert;
    }
}

function ShowHide(thing){
theDiv = document.getElementById(thing);
if(theDiv.style.display=="inline"){
theDiv.style.display = "none";
}
else {
theDiv.style.display = "inline";
}
}

var status=0;
function checkall(theForm,theId){
var x=0;
for(i=0; i<document.forms[theForm].length; i++){
if(document.forms[theForm].elements[i].type == 'checkbox'){
x++;
}
}
if(status=='0'){
for(i=1;i<x+1;i++){
document.getElementById(theId+'_'+i).checked = true;

}
status='1';
}
else{
for(j=1;j<x+1;j++){
document.getElementById(theId+'_'+j).checked = false;
}
status='0';
}
alert(status);
}

function check(anfang,ende,pre) {
for(i=anfang;i<=ende;i++){
if(document.getElementById(pre+"_"+i)){
document.getElementById(pre+"_"+i).checked = true;
//document.getElementById(pre+"_"+i).disabled= true;
}
}
}

function uncheck(anfang,ende,pre) {
for(i=anfang;i<=ende;i++){
if(document.getElementById(pre+"_"+i)){
document.getElementById(pre+"_"+i).checked = false;
//document.getElementById(pre+"_"+i).disabled= false;
}
}
}

function popcountry(url){
var width = 350;
var height= 80;
var l = (screen.availWidth - width) / 2;
var t = (screen.availHeight - height) / 2;
newwindow = window.open(url,"fenster","width=350,height=80,screenX="+l+",screenY="+t+",left=" +l+",top="+t+",scrollbars=0,resizable=0,menubar=no");
newwindow.focus();
}

function popbids(url){
var width = 600;
var height= 500;
var l = (screen.availWidth - width) / 2;
var t = (screen.availHeight - height) / 2;
bidwindow = window.open(url,"fenster","width="+width+",height="+height+",screenX="+l+",screenY="+t+",left=" +l+",top="+t+",scrollbars=1,resizable=1,menubar=no");
bidwindow.focus();
}

function popbew(url){
var width = 660;
var height= 520;
var l = (screen.availWidth - width) / 2;
var t = (screen.availHeight - height) / 2;
bewwindow = window.open(url,"fenster1","width="+width+",height="+height+",screenX="+l+",screenY="+t+",left=" +l+",top="+t+",scrollbars=1,resizable=1,menubar=no");
bewwindow.focus();
}

function popbilder(url){
var width = 750;
var height= 550;
var l = (screen.availWidth - width) / 2;
var t = (screen.availHeight - height) / 2;
bilderwindow = window.open(url,"fenster2","width="+width+",height="+height+",screenX="+l+",screenY="+t+",left=" +l+",top="+t+",scrollbars=1,resizable=1,menubar=no");
bilderwindow.focus();
}

function popSendToAFriend(gruppe){
var width = 370;
var height= 280;
var l = (screen.availWidth - width) / 2;
var t = (screen.availHeight - height) / 2;
sendwindow = window.open("/"+gruppe+"/sendtoafriend.php","fenster","width="+width+",height="+height+",screenX="+l+",screenY="+t+",left=" +l+",top="+t+",scrollbars=1,resizable=1,menubar=no");
sendwindow.focus();
}

function popPartner(){
var width = 560;
var height= 490;
var l = (screen.availWidth - width) / 2;
var t = (screen.availHeight - height) / 2;
partnerwindow = window.open("partner.php","fenster","width=560,height=490,screenX="+l+",screenY="+t+",left=" +l+",top="+t+",scrollbars=1,resizable=1,menubar=no");
partnerwindow.focus();
}

function popAGB(){
var width = 640;
var height= 480;
var l = (screen.availWidth - width) / 2;
var t = (screen.availHeight - height) / 2;
agbwindow = window.open("agb.php","fenster","width=640,height=480,screenX="+l+",screenY="+t+",left=" +l+",top="+t+",scrollbars=1,resizable=1,menubar=no");
agbwindow.focus();
}

function popData(){
var width = 640;
var height= 480;
var l = (screen.availWidth - width) / 2;
var t = (screen.availHeight - height) / 2;
datawindow = window.open("daten.html","fenster","width=640,height=480,screenX="+l+",screenY="+t+",left=" +l+",top="+t+",scrollbars=1,resizable=1,menubar=no");
datawindow.focus();
}

function popLOAD(){
var width = 300;
var height= 125;
var l = (screen.availWidth - width) / 2;
var t = (screen.availHeight - height) / 2;
loadwindow = window.open("loading.html","fenster","width="+width+",height="+height+",screenX="+l+",screenY="+t+",left=" +l+",top="+t+",scrollbars=0,resizable=0,menubar=no");
loadwindow.focus();
}

function popPIC(url){
var width = 660;
var height= 530;
var l = (screen.availWidth - width) / 2;
var t = (screen.availHeight - height) / 2;
picwindow = window.open(url,"fenster","width="+width+",height="+height+",screenX="+l+",screenY="+t+",left=" +l+",top="+t+",scrollbars=0,resizable=0,menubar=no");
picwindow.focus();
}

function textCounter(field, countfield, maxlimit) {
  if (field.value.length > maxlimit)
      {field.value = field.value.substring(0, maxlimit);}
      else
      {countfield.value = maxlimit - field.value.length;}
  }
