var gsAnalytics = { 
	escape : function() { 
		var regex = /(\||'|\$|%|\^|\*|:|~|,)/gi; 
		return function(input) { 
			return input && input.replace(regex, '')
		}; 
	}(),
 
 	/* hasSmoothing is Derivative of TypeHelpers version 1.0.
 	 * TypeHelpers is released under the following MIT License:
 	 * Copyright (c) 2009 Zoltan Hawryluk
	 * 
	 * Permission is hereby granted, free of charge, to any person obtaining a copy
	 * of this software and associated documentation files (the "Software"), to deal
	 * in the Software without restriction, including without limitation the rights
	 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
	 * copies of the Software, and to permit persons to whom the Software is
	 * furnished to do so, subject to the following conditions:
	 * 
	 * The above copyright notice and this permission notice shall be included in
	 * all copies or substantial portions of the Software.
	 * 
	 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
	 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
	 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
	 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
	 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
	 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
	 * THE SOFTWARE.
	 */
	hasSmoothing : function() {
		if (typeof(screen.fontSmoothingEnabled) != "undefined") {
			return screen.fontSmoothingEnabled;
		} 
		else {
			try {
				// Create a 35x35 Canvas block.
				var canvasNode = document.createElement('canvas');
				canvasNode.width = "35";
				canvasNode.height = "35"
	
				// We must put this node into the body, otherwise
				// Safari Windows does not report correctly.
				canvasNode.style.display = 'none';
				document.body.appendChild(canvasNode);
				var ctx = canvasNode.getContext('2d');
	
				// draw a black letter 'O', 32px Arial.
				ctx.textBaseline = "top";
				ctx.font = "32px Arial";
				ctx.fillStyle = "black";
				ctx.strokeStyle = "black";
	
				ctx.fillText("O", 0, 0);
	
				// start at (8,1) and search the canvas from left to right,
				// top to bottom to see if we can find a non-black pixel.  If
				// so we return true.
				for (var j = 8; j <= 32; j++) {
					for (var i = 1; i <= 32; i++) {
						var imageData = ctx.getImageData(i, j, 1, 1).data;
						var alpha = imageData[3];
	
						if (alpha != 255 && alpha != 0) {
							return true; // font-smoothing must be on.
						}
					}
	
				}
				// didn't find any non-black pixels - return false.
				return false;
			}
			catch (ex) {
				// Something went wrong (for example, Opera cannot use the
				// canvas fillText() method.  Return null (unknown).
				return null;
			}
		}
	},
	
	readCookie : function(key) {
		var cookieValues = document.cookie.match('(?:^|;)\\s*' + key + '=([^;]*)');
		return (cookieValues) ? decodeURIComponent(cookieValues[1]) : null;
	}
}
