/*
** SearchSpring Core
** Copyright (c) 2009 B7 Interactive, LLC. All rights reserved.
**/
var SearchSpring = SearchSpring || {};

SearchSpring.Core = function(){
	var version = 1;
	return{
		addOnLoadEvent:function(func) {
			var oldonload = window.onload;
			if (typeof window.onload != 'function') {
				window.onload = func;
			} else {
				window.onload = function() {
					oldonload();
					func();
				}
			}
		},
		cookiesEnabled:function() {
			var enabled = (navigator.cookieEnabled) ? true : false;
			if (typeof navigator.cookieEnabled == 'undefined' && !enabled) {
				document.cookie = 'testcookie';
				enabled = (document.cookie.indexOf('testcookie')!=-1) ? true : false;
			}
			return enabled;
		}
	}
}();

Array.prototype.remove = function(from, to){
	this.splice(from, !to || 1 + to - from + (!(to < 0 ^ from >= 0) && (to < 0 || -1) * this.length));
	return this.length;
};