// Title: Tigra Tables PRO // URL: http://www.softcomplex.com/products/tigra_tables_pro/ // Version: 2.1 // Date: 03-09-2004 (mm-dd-yyyy) // Notes: Registration needed to use this script legally. // Visit official site for details. var TTP0 = 'aAdDFhHilmMsUYy', TTP1 = 'dMDFhHimsUYy', TTP2 = { 'a': ["([a-z]{2})"], 'A': ["([A-Z]{2})"], 'd': ["([0-9]{0,2})"], 'D': ["([A-z]{3})"], 'F': ["([A-z]{0,10})"], 'h': ["([0-9]{0,2})"], 'H': ["([0-9]{0,2})"], 'i': ["([0-9]{0,2})"], 'l': ["([A-z]{0,10})"], 'm': ["([0-9]{0,2})"], 'M': ["([A-z]{3})"], 's': ["([0-9]{0,2})"], 'U': ["([0-9]{0,12})"], 'Y': ["([0-9]{4})"], 'y': ["([0-9]{2})"] }, TTP3 = false, TTP4 = { 'a': [null, function (TTP5) { if (TTP5 >= 12) return 'pm'; else return 'am' }, null], 'A': [null, function (TTP5) { if (TTP5 >= 12) return 'PM'; else return 'AM' }, null], 'd': ['setDate', function (TTP5) { TTP5 = TTP5.getDate(); if (TTP5 < 10) return ('0' + TTP5); else return TTP5 }, function (TTP5) { return TTP5 * 1 }], 'D': [null, function (TTP5) { return ARR_STRINGS['short_days'][TTP5.getDay()] }, function (TTP5) { return TTP5 * 1 }], 'l': [null, function (TTP5) { return ARR_STRINGS['long_days'][TTP5.getDay()] }, function (TTP5) { return TTP5 * 1 }], 'h': ['setHours', function (TTP5) { TTP5 = TTP5.getHours(); if (TTP5 <= 12) return TTP5; else return (TTP5 - 12) }, function (TTP5, TTP6) { TTP5 = TTP5 * 1; if (TTP6 == 'PM' || TTP6 == 'pm') return 12 + TTP5 * 1; else return TTP5 * 1 }], 'H': ['setHours', 'getHours', function (TTP5) { return TTP5 * 1 }], 'i': ['setMinutes', function (TTP5) { TTP5 = TTP5.getMinutes(); if (TTP5 < 10) return ('0' + TTP5); else return TTP5 * 1 }, function (TTP5) { return TTP5 * 1 }], 's': ['setSeconds', function (TTP5) { TTP5 = TTP5.getSeconds(); if (TTP5 < 10) return ('0' + TTP5); else return TTP5 * 1 }, function (TTP5) { return TTP5 * 1 }], 'm': ['setMonth', function (TTP5) { TTP5 = TTP5.getMonth() + 1; if (TTP5 < 10) return ('0' + TTP5); else return TTP5 }, function (TTP5) { return (TTP5 * 1 - 1) }], 'F': ['setMonth', function (TTP5) { return ARR_STRINGS['long_month'][TTP5.getMonth()] }, function (TTP5) { var i; TTP5 = TTP5 + ''; for (i = 0; i < 12; i++) if (ARR_STRINGS['long_month'][i].toLowerCase() == TTP5.toLowerCase()) return (i); return alert(ARR_STRINGS['bad_month'].replace(/%month_name/g, TTP5)) }], 'M': ['setMonth', function (TTP5) { return ARR_STRINGS['short_month'][TTP5.getMonth()] }, function (TTP5) { var i; TTP5 = TTP5 + ''; for (i = 0; i < 12; i++) if (ARR_STRINGS['short_month'][i].toLowerCase() == TTP5.toLowerCase()) return (i); return alert(ARR_STRINGS['bad_month'].replace(/%month_name/g, TTP5)) }], 'U': [], 'Y': ['setFullYear', 'getFullYear', function (TTP5) { return TTP5 * 1 }], 'y': ['setFullYear', 'getYear', function (TTP5) { if (TTP5 < 50) return ('20' + TTP5) * 1; else return ('19' + TTP5) * 1 }] }, TTP7; function TTP8(TTP9) { var TTPA = new Date(), i; for (i in TTP9) { if (TTP1.indexOf(TTP9[i][1]) != -1) { var key = TTP9[i][1]; if (key == 'U') return new Date(TTP9[i][0] * 1000); if (key == 'h') var value = TTP4[TTP9[i][1]][2](TTP9[i][0], TTP9[TTP7][0]); else var value = TTP4[TTP9[i][1]][2](TTP9[i][0]); TTPA[TTP4[key][0]](value) } } return TTPA } function TTPB(TTPC, TTPD) { var TTPE, TTPF = 0, TTPG = [], i = 0, TTPH = '', TTPI = ''; var TTPA = new Date(TTPC); do { TTPE = TTPD.substr(i, 1); if (TTP0.indexOf(TTPE) != -1 && TTPE != '') { if (TTPE == 'A' || TTPE == 'a') TTPI = new String(TTP4[TTPE][1](TTP7)); else if (TTPE == 'U') return TTPC; else if (typeof (TTPA[TTP4[TTPE][1]]) != 'function') TTPI = new String(TTP4[TTPE][1](TTPA)); else TTPI = new String(TTPA[TTP4[TTPE][1]]()); if (TTPE == 'h') TTP7 = TTPA.getHours(); TTPH += TTPI } else TTPH += TTPE; i++ } while (i < TTPD.length) return TTPH } function TTPJ(TTPD, TTPK) { var TTPL = [], TTPE, TTPF = 0, TTPG = [], i, TTPM = []; var TTPN = ["\\\\", "\\/", "\\.", "\\+", "\\*", "\\?", "\\$", "\\^", "\\|"]; for (i = 0; i < TTPD.length; i++) { TTPE = TTPD.substr(i, 1); if (TTP0.indexOf(TTPE) != -1 && TTPE != '') { TTPG[TTPF] = TTPE; TTPM[TTPF++] = TTPE } } TTPF = 1; var TTPG = TTPG.sort(); for (i in TTPN) TTPD = TTPD.replace(eval("/" + TTPN[i] + "/g"), TTPN[i]); for (i = 0; i < TTPG.length; i++) { TTPO = new RegExp(TTPG[i]); TTPD = TTPD.replace(TTPO, TTP2[TTPG[i]]) } TTPO = new RegExp("^" + TTPD.replace(/\s+/g, "\\s+") + "$"); var a = TTPO.exec(TTPK); if (!a || typeof (a) != 'object') { if (!TTP3 && TTPK && TTPK != ' ') { alert(ARR_STRINGS['not_meet']); TTP3 = true; } return ""; } for (i in TTPM) { if (TTPM[i] == 'A' || TTPM[i] == 'a') TTP7 = i; TTPL[i] = [a[TTPF++], TTPM[i]] } return TTP8(TTPL) }