function checkCustomerForm(form) {    
  var name = form.name.value;
  var address1 = form.address1.value;
  var zip = form.zip.value;
  var city = form.city.value;
  var phone = form.phone.value;
  var email = form.email.value;
  if (name.length < 3) {        
    alert ("Du måste ange namn");        
    form.name.focus();
    return false;    
  }    
  if (address1.length < 3) {        
    alert ("Du måste ange adress");        
    form.address1.focus();
    return false;    
  }    
  if (zip.length < 3) {        
    alert ("Du måste ange postnummer");        
    form.zip.focus();
    return false;    
  }    
  if (city.length < 3) {        
    alert ("Du måste ange ort");        
    form.city.focus();
    return false;    
  }    
  if (phone.length < 3) {        
    alert ("Du måste ange telefon");        
    form.phone.focus();
    return false;    
  }    
  if (email.length < 5 || email.indexOf("@") < 0) {        
    alert ("Du måste ange en e-postadress");        
    form.email.focus();
    return false;    
  }
  return true;
}

var newWin = null; 
function popUp(strURL, strType, strHeight, strWidth) { 
  if (newWin != null && !newWin.closed) 
    newWin.close(); 
  var strOptions=""; 
  if (strType=="console") 
    strOptions="resizable,scrollbars,height="+ 
      strHeight+",width="+strWidth;  
  if (strType=="fixed") 
    strOptions="status,height="+ 
      strHeight+",width="+strWidth; 
  if (strType=="elastic") 
    strOptions="toolbar,menubar,scrollbars,"+ 
      "resizable,height="+ 
      strHeight+",width="+strWidth; 
  newWin = window.open(strURL, 'newWin', strOptions); 
  newWin.focus(); 
}