﻿// These methods are available to all the pages. this is called by header and footer page.

//Use the code below to make trim a method of all Strings. 

String.prototype.trim = function() {
    return this.replace(/^\s+|\s+$/g, "");

}

//Gets the query parameter passed to the url. 
function getqueryParameter(name) {
    name = name.replace(/[\[]/, "\\\[").replace(/[\]]/, "\\\]");
    var regexS = "[\\?&]" + name + "=([^&#]*)";
    var regex = new RegExp(regexS);
    var results = regex.exec(window.location.href);
    if (results == null)
        return "";
    else
        return results[1];
}
