var ArtlogicCaptcha = {

build_form: function(filename) {
    var container = document.createElement('div');
    container.setAttribute('id', 'captcha');

    var img = document.createElement('img');
    img.setAttribute('src', 'https://captcha.artlogic.net' + filename);
    container.appendChild(img);

    var label = document.createElement('label');
    label.setAttribute('for', 'captcha_answer');
    label.appendChild(document.createTextNode(
                'Please enter the word you can see in the above image'));
    container.appendChild(label);

    container.innerHTML += '<input type="text" name="captcha_answer" id="captcha_answer" class="captcha_field" />';
    container.innerHTML += '<input type="hidden" name="captcha_filename" id="captcha_filename" value="' + filename + '"/>';

    var dummy = document.createElement('div');
    dummy.appendChild(container);
    document.write(dummy.innerHTML);
}

};//end ArtlogicCaptcha object

ArtlogicCaptcha.build_form('/usr/captcha_images/4dd447f3a6c9393653512dc2e834af5a22e64c04.jpg');