﻿/*added by jenny 2009-10-01 begins*/
String.prototype.trim = function() { return this.replace(/^\s+|\s+$/g, ''); }

function isDate(year, month, day) {
    month = month - 1;
    var tempDate = new Date(year, month, day);
    if ((tempDate.getFullYear() == year) && (month == tempDate.getMonth()) && (day == tempDate.getDate()))
        return true;
    else
        return false;
}

function valemail(email) {
    var reg = /^([A-Za-z0-9_\-\.])+\@([A-Za-z0-9_\-\.])+\.([A-Za-z]{2,4})$/;
    return reg.test(email);
}
/*added by jenny 2009-10-01 ends*/
