                                }
                        };

                        if(url){//Link
                                url += '&exclude_attachments=' + exclude.join(',');
                                document.location.href = url+'&zipit='+zip;// 0 = Show on screen, 1 = Zip PDF, 2 = Download PDF
                        }else{
                                document.getElementsByName('zipit')[0].value = zip;
                                document.getElementsByName('download_documents')[0].