function addImage(gallery, image, description, group, align) {
    var code = '';
    code += '<a href="gallery/';
    code += gallery;
    code += '/album/medium/';
    code += image;
    code += '.jpg" rel="lytebox';
    if(group != "") {
        code += '[';
        code += group;
        code += ']';        
    }
    code += '"'
    if(description != "") {
        code += ' title="';
        code += description;
        code += '"';        
    }
    code += '>';
    code += '<img src="gallery/'
    code += gallery;
    code += '/album/small/';
    code += image;
    code += '.jpg" alt="';
    if(description != "") {
        code += description;
    }
    code += '"';
    if(align != "") {
        code += ' align="';
        code += align;
        code += '"';        
    }
    code += ' /></a>';
    document.writeln(code);
}

function addSlideshow(gallery, image, description, group, align) {
    var code = '';
    code += '<a href="gallery/';
    code += gallery;
    code += '/album/medium/';
    code += image;
    code += '.jpg" rel="lyteshow';
    if(group != "") {
        code += '[';
        code += group;
        code += ']';        
    }
    code += '"'
    if(description != "") {
        code += ' title="';
        code += description;
        code += '"';        
    }
    code += '>';
    code += '<img src="gallery/'
    code += gallery;
    code += '/album/small/';
    code += image;
    code += '.jpg" alt="';
    if(description != "") {
        code += description;
    }
    code += '"';
    if(align != "") {
        code += ' align="';
        code += align;
        code += '"';        
    }
    code += ' /></a>';
    document.writeln(code);
}

function addGallery(gallery, description, link) {
    var code = '';
    code += '<a href="';
    code += window.location.href;
    code += '&gallery=';
    code += gallery;
    code += '"';
    if(description != "") {
        code += ' title="';
        code += description;
        code += '"';        
    }
    code += '>';
    code += link;
    code += '</a>';
    document.writeln(code);
}

function addPdf(pdf, description, link) {
    var code = '';
    code += '<a href="pdf/';
    code += pdf
    code += '.pdf"';
    if(description != "") {
        code += ' title="';
        code += description;
        code += '"';        
    }
    code += ' target="_blank">';
    code += link;
    code += '</a>';
    document.writeln(code);
}