function savePageAsPDF() {

    if (author == null) {
        var author = "The Cavanagh Law Firm";
    }

    if (subj == null) {
        var subj = "";
    }

    if (title == null) {
        var title = escape(document.title);
    }

    if (keywords == null) {
        var keywords = "";
    }


    if (allowcpy == null) {
        var allowcpy = "";
    } //yes/no

    if (allowmodif == null) {
        var allowmodif = "yes";
    } //yes/no

    if (allowprn == null) {
        var allowprn = "";
    } //yes/no 

    if (keylen == null) {
        var keylen = "";
    } //40/128

    if (userpass == null) {
        var userpass = "";
    }

    if (ownerpass == null) {
        var ownerpass = "";
    }

    if (preservelinks == null) {
        var preservelinks = "yes";
    } //yes/no

    if (compress == null) {
        var compress = "flate";
    } //none/flate

    if (marginleft == null) {
        var marginleft = "";
    } //0-999

    if (marginright == null) {
        var marginright = "";
    } //0-999

    if (margintop == null) {
        var margintop = "";
    } //0-999

    if (marginbottom == null) {
        var marginbottom = "";
    } //0-999

    if (allowscript == null) {
        var allowscript = "yes";
    }

    if (psize == null) {
        var psize = "";
    } //A4/A3

    if (porient == null) {
        var porient = "";
    } //Portrait/Landscape

    if (ctype == null) {
        var ctype = "";
    } //pdftext/pdfimage

    if (wsize == null) {
        var wsize = "";
    }

    if (compression == null) {
        var compression = "1";
    }

    if (allowactivex == null) {
        var allowactivex = "";
    }
	
    var pURL = "http://www.web2pdfconvert.com/convert.aspx?cURL=" + escape(document.location.href) + "&author=" + author + "&subj=" + subj + "&title=" + title;
    pURL += "&keywords=" + keywords + "&allowcpy=" + allowcpy + "&allowmodif=" + allowmodif + "&allowprn=" + allowprn + "&keylen=" + keylen;
    pURL += "&userpass=" + userpass + "&ownerpass=" + ownerpass + "&preservelinks=" + preservelinks + "&compress=" + compress;
    pURL += "&marginleft=" + marginleft + "&marginright=" + marginright + "&margintop=" + margintop + "&marginbottom=" + marginbottom;
    pURL += "&psize=" + psize + "&porient=" + porient + "&ctype=" + ctype + "&allowscript=" + allowscript + "&compression=" + compression + "&allowactivex=" + allowactivex;
    pURL += "&wsize=" + wsize + "&outputmode=link" + "&ref=web";
    

    window.open(pURL);
}
