﻿ 
    function dge(e) {
    
        return document.getElementById(e);
    
    }
    
    function SMLGenCB(result) {
    if (result && result.value) {
        var ti = dge('timerImage');
        if (ti) {
            ti.style.display = 'none';
        }
        resultTable.style.display = 'block';
        if (result.value.indexOf('http://') < 0) {
            smartLink.style.color = 'red';
        } else {
            try {
                smartLink.select();
                smartLink.focus();
                bottom.focus();
            }
            catch(ex) {
            }
        }
        smartLink.value = result.value;
        try {
            smartLink.scrollIntoView(false);
            bottom.scrollIntoView(false);
        }
        catch(ex) {
        }
    }
}

function SMLGen() {

    resultTable.style.display = 'none';
    
    var ti = dge('timerImage');

    if (url && email && accept && ti) {
        ti.style.display = 'block';
        SmartLink._Default.SMLGen(url.value, email.value, accept.checked, SMLGenCB);
    }

}        
