﻿/**************************************************************************************************\
|*																																																*|
|*	CABS Common Functions																																					*|
|*																																																*|
\**************************************************************************************************/

function CABS_SuppressEnter(e) {
	var key;
	if (window.event) {
		key = window.event.keyCode;
	} else {
		key = e.which;
	}
	return (key != 13);
}

function cLog(msg) {
	try {
		console.log(msg);
	} catch (err) {
	}
}

CABS_OM = new function () {

	/************************************************************************************************\
	|*																																															*|
	|*	CABS_OM																																											*|
	|*																																															*|
	|*	This is the CABS Object Manager.  Too frequently, there needs to be an object created that	*|
	|*	has to utilize the server side substitution Me.ClientID in the name.  If this is in quotes,	*|
	|*	then all is well.  If it's not, however, it disables JavaScript syntax checking and tool-		*|
	|*	tips within Visual Studio.  So, this client-side Object Manager will allow you to store and	*|
	|*	retrieve clients using a unique string ID (which will often be something that has						*|
	|*	me.ClientID in it).																																					*|
	|*																																															*|
	\************************************************************************************************/

	var _objectArray = new Array();

	this.registerObject = function (uniqueID, uniqueObject) {
		_objectArray[uniqueID] = new Object;
		_objectArray[uniqueID] = uniqueObject;
	}

	this.get_object = function (uniqueID) {
		return _objectArray[uniqueID];
	}

}


