function clearText(txtbox, defaultTxt) {
    if (txtbox) {
        if (txtbox.value == defaultTxt)
            txtbox.value = "";
    }
}
function resetText(txtbox, defaultTxt) {
    if (txtbox) {
        if (txtbox.value == "")
            txtbox.value = defaultTxt;
    }
}

function checkRegexp(obj, regexp) {
    if (!(regexp.test(obj.val()))) {
        return false;
    } else {
        return true;
    }
}

function isEmpty(obj) {
    if (obj.val() == '') {
        return true;
    } else {
        return false
    }
}

function FacebookShare_click() {
    u = location.href;
    t = document.title;
    window.open('http://www.facebook.com/sharer.php?u=' + encodeURIComponent(u) + '&t=' + encodeURIComponent(t), 'sharer', 'toolbar=0,status=0,width=626,height=436');
    return false;
}

function TwitterShare_click() {
    u = location.href;
    window.open('http://twitter.com/home?status=Currently%20Reading%20' + encodeURIComponent(u), 'sharer', 'toolbar=0,status=0,width=626,height=436');
    return false;
}