var Base = {

	base_path: '/',

	hyphenSplit: function(value){

		var split = value.indexOf("-");
		var ID = value.substr(split + 1,value.length);

		return ID;

	},

	cursorPosition: function(event){

		if (typeof event == "undefined"){
			event = window.event;
		}

		var scrollingPosition = Base.getScrollingPosition();
		var cursorPosition = [0, 0];

		if (typeof event.pageX != "undefined" && typeof event.x != "undefined"){

			cursorPosition[0] = event.pageX;
			cursorPosition[1] = event.pageY;

		}else{

			cursorPosition[0] = event.clientX + scrollingPosition[0];
			cursorPosition[1] = event.clientY + scrollingPosition[1];

		}

		return cursorPosition;

	},


	scrollPosition: function(){

		var position = [0, 0];

		if(typeof window.pageYOffset != 'undefined'){

			position = [
				window.pageXOffset,
				window.pageYOffset
			];

		}else if(typeof document.documentElement.scrollTop != 'undefined' && document.documentElement.scrollTop > 0 || document.documentElement.scrollLeft > 0){

			position = [
				document.documentElement.scrollLeft,
				document.documentElement.scrollTop
			];

		}else if(typeof document.body.scrollTop != 'undefined'){

			position = [
				document.body.scrollLeft,
				document.body.scrollTop
			];

		}

		return position;

	}

}

