﻿String.prototype.trim = function() { return this.replace(/^\s+|\s+$/g, "") };

TAPConsts = function() {
}

TAPConsts.Images = '/Images/';

function popUp(URL, width, height) {
    day = new Date();
    id = day.getTime();
    eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=1,width=" + width + ",height=" + height + "');");
}

function ValidateSearchQuery(oSrc, args) {
    var query = args.Value.replace(/['"]/g, '').trim();
    if (query.length < 3) {
        alert('Search query should contain at least 3 characters');
        args.IsValid = false;
    }
    else
        args.IsValid = true;
}
