﻿/****************/
/* Ajax sources */
/****************/
var tagsUrl = "/tags.ashx";


imposeMaxLength = function(Object, MaxLen) {
    return (Object.value.length <= MaxLen);
}

openIframe = function(content, width, height) {
    //alert(content);
    Shadowbox.open({
        player: 'iframe',
        content: content,
        height: height,
        width: (width + 20)

    });

    return false;
}

showHTML = function(content, width, height) {
    Shadowbox.open({
        player: 'html',
        content: content,
        height: height,
        width: width
    });

    return false;
}

//validateMemberLogin = function() {
//    var email = $("[id$='_txtMemberEmail']");
//    var pwd = $("[id$='_txtMemberPwd']");

//    if (email.val().length < 1 || pwd.val().length < 1) {
//        showMemberMsg('Please enter both your email address and password!');

//        return false;
//    } else {
//        return true;
//    }
//}

validateMemberLogin = function() {
    var email = $("[id$='_txtMemberEmail']");

    if (email.val().length < 1) {
        showMemberMsg('Please enter both your email address and password!');
        return false;
    } else {
        return true;
    }
}

showMemberMsg = function() {
    $('#msg').html('<p>' + arguments[0] + '</p>')
            .slideDown('slow');
}
