/**
 * @brief Definitions of all options and callbacks for SSAM.
 *
 * SSAM can be interfaced with using a set of 
 * control option codes (\c ssamOp). The control initiates communication with the outside 
 * via callback codes (\c ssamCb ).
 * 
 * @file ssamDefine.js 
 * @version $Id: ssamDefine.js,v 1.17 2007/02/08 23:48:25 mknapp Exp $
 * @date 01-jun-2004 
 *
 * @author SightSpeed, Inc.
 * @copyright Copyright &copy; 2004, SightSpeed, Inc. All Rights Reserved.
 *
 * @internal
 */
 
/**
 * Used as the separator character in joined arrays. 
 * The value should be limited to a single character.
 * @type string
 * \note Defaulted to ','. This can be modified in all related scripts through sswcOnLoad()
 * \brief SightSpeed Entity Data Separator.
 */
var EDS = ',';

/**
* \internal
 * Used to determine how long to give the login process before 
 * determining a firewall problem has occurred and throwing the login timeout 
 * \link ssamCbEnum::LoginTimeout ssamCb.LoginTimeout \endlink
 * \deprecated Sip functionality does not require this behaviour. Maybe be removed post 6000.
 *
 * @type number
 * \note The default value is 4000. This can be modified in all related scripts through sswcOnLoad().
 * \brief The login timeout in ms.
 */
var ssLoginTimeout = 4000;

/**
 * ssamCbEnum class.
 * \brief SSAM CallBacks - Global Variable Class
 *
 * This class contains all of the possible defines for the #SSAM_CB_Event(). 
 * Each define represents a single event that is taking place.
 * Each of the defines are fully described and the associated data if applicable. 
 * @ctor
 * Constructor.
 * The constructor initializes all the \c control \c callbacks with their initial values
 * \a msg.
 * \attention This is a complete list of all the control callbacks that may be received
 * from SSAM page (Both the SSAM ActiveX control and SSAM logic page).
 */
function ssamCbEnum () 
{
	var self = this;
	
	/** 
	 * @internal
	 * Base number for Callbacks
	 *
	 * Last used values for callback codes. 
	 * These must be changed every time a new callback is added.
	 * \n Last used for php = -7
	 * \n Last used for control = 50
	 */	
	this.Base = 100;

	
	////////////////////////////////
	// Utility
	////////////////////////////////

	/**
	 * New Statistics are available
	 *
	 * @type string
	 * \return string A comma separated integer value (csv) in the following order:	 
	 * \li \link ssamOpEnum::ConfStatusSendCurr ssamOp.ConfStatusSendCurr \endlink
	 * \li \link ssamOpEnum::ConfStatusSendMax ssamOp.ConfStatusSendMax \endlink
	 * \li \link ssamOpEnum::ConfStatusSendAvg ssamOp.ConfStatusSendAvg \endlink
	 * \li \link ssamOpEnum::ConfStatusSendFps ssamOp.ConfStatusSendFps \endlink
	 * \li \link ssamOpEnum::ConfStatusRecvCurr ssamOp.ConfStatusRecvCurr \endlink
	 * \li \link ssamOpEnum::ConfStatusRecvMax ssamOp.ConfStatusRecvMax \endlink
	 * \li \link ssamOpEnum::ConfStatusRecvAvg ssamOp.ConfStatusRecvAvg \endlink
	 * \li \link ssamOpEnum::ConfStatusRecvFps ssamOp.ConfStatusRecvFps \endlink
	 * \li \link ssamOpEnum::ConfStatusLatency ssamOp.ConfStatusLatency \endlink
	 * \li \link ssamOpEnum::ConfStatusCPU ssamOp.ConfStatusCPU \endlink
	 * \li \link ssamOpEnum::ConfStatusNetwork ssamOp.ConfStatusNetwork \endlink 
	 */			
	this.ConfStatusUpdt = self.Base + 7;

	/**
	 * Conference Resize Event
	 * @type number
	 * \deprecated Control no longer generates this event. Will be removed post release 600.
	 *
	 * \return \c number
	 * \li \c 0 : Remote downsize
	 * \internal \li \c 1 : Local Downsize -- Not implemented
	 * \internal \li \c 2 : Remote Upsize -- Not implemented
	 * \internal \li \c 3 : Local Upsize -- Not implemented
	 */
	this.ConfStatusResize = self.Base + 26;	
	
	/**
	 * The time expired during the call
	 * \attention Applicable only for time limited SightSpeed accounts.
	 * @type null
	 * \deprecated Control no longer generates this event. If time runs out call is disconnected. 
	 * Will be removed post 600.
	 *
	 * \return \c null
	 * \note The video will no longer display but audio will continue.
	 */		
	this.ConfStatusTimeExpire = self.Base + 18;	
	
	/**
	 * Contact list refresh is requested
	 * @type null
	 * \deprecated Not available in SSAM. Will be removed Post 6000.
	 *
	 * \return \c null
	 */		
	this.ContactUpdt = self.Base + 22;

	////////////////////////////////
	// Global 
	////////////////////////////////
	/**
	 * Opportunity to set initial options.
	 * @type null
	 * \return \c null
	 */			
	this.GlobalInitSetOptions = self.Base - 1;
	
	////////////////////////////////
	// Control and User 
	////////////////////////////////
	/**
	 * SSAM ActiveX loaded
	 * @type null
	 * \return \c null
	 */			
	this.CntrlLdSuccess = self.Base + 8;
	
	/**
	 * SSAM ActiveX Failied to load
	 *
	 * Enumerated sightspeed.resultCode can be used from the hosted IFrame (IFrameName.sightspeed.resultCode)
	 *
	 * @type number
	 * \return \c number
	 * \li \c 50 	: General Failure (sightspeed.resultCode.generalFailure )
	 * \li \c 51 	: Multiple Copies (sightspeed.resultCode.multipleInstances )
	 * \li \c 52 	: Video capture source in use (sightspeed.resultCode.videoCaptureInUse )
	 * \li \c 53	: Video capture failed (sightspeed.resultCode.videoCaptureError )
	 * \li \c 54	: Firewall (sightspeed.resultCode.networkPortInUse )
	 * \li \c 401	: SSAM Authentication failure (sightspeed.resultCode.unauthorized )
	 * 
	 * \since 600
	 */			
	this.CntrlLdFail = self.Base + 50;
	
	/**
	 * Debug message received
	 * @type null
	 * \return \c null
	 */		
	this.CntrlDebugMsg = self.Base + 12;
	
	/**
	 * SightSpeed user logged in
	 * @type null
	 * \return \c null
	 */			
	this.UserLogin = self.Base + 3;
		
	/**
	 * SightSpeed user logged out and unable to receive any more calls
	 * \note Practically requires a termination of the control and re-loading of page
	 * @type null
	 * \return \c null
	 * 
	 * \since 600
	 */			
	this.UserLogout = self.Base + 55;
	
	/**
	 * SightSpeed Login Timed out
	 * @type null
 	 * \deprecated Sip functionality does not require this behaviour. Maybe be removed post 6000.
	 *
	 * \return \c null
	 */		
	this.UserLoginTimeout = self.Base - 7;		

	////////////////////////////////
	// Control Load Failures
	////////////////////////////////		
	/**
	 * General Load Failed -- Plugin did not init
	 * \deprecated Use \link ssamCbEnum::CntrlLdFail ssamCb.CntrlLdFail (50) \endlink. May be removed post release 600.
	 *	
	 * @type null
	 * \return \c null
	 */		
	this.CntrlLdFailGen = self.Base + 15;
	
	/**
	 * Load Failed -- Multiple copies running
	 * \deprecated Use \link ssamCbEnum::CntrlLdFail ssamCb.CntrlLdFail (51) \endlink. May be removed post release 600.
	 *
	 * @type null
	 * \return \c null
	 */	
	this.CntrlLdFailMult = self.Base + 16;
	 
	/**
	 * Load Failed -- Camera in use
	 * \deprecated Use \link ssamCbEnum::CntrlLdFail ssamCb.CntrlLdFail (52,53) \endlink. May be removed post release 600.
	 *
	 * @type null
	 * \return \c null
	 */	
	this.CntrlLdFailCam = self.Base + 17;
	 
	/**
	 * Load Control Failed -- SSAM System Requirements 
	 * \deprecated Use \link ssamCbEnum::CntrlLdFail ssamCb.CntrlLdFail (50,54) \endlink. May be removed post release 600.
	 *
	 * @type number
	 * \return \c number
	 * \li \c 0 : ActiveX control reported system requirement failure
	 * \li \c (100-199) : Hardware Requirement Failure
	 * \li \c 101 : CPU Insufficient
	 * \li \c 102 : Memory Insufficient
	 * \li \c (200-299) : Software Requirement Failure
	 * \li \c 201 : Browser not supported
	 * \li \c 202 : OS not supported
	 */
	this.CntrlLdFailReq = self.Base + 20;
	 
	/**
	 * Load Control Failed -- SSAM ActiveX Authentication Failed
	 * \deprecated Use \link ssamCbEnum::CntrlLdFail ssamCb.CntrlLdFail (401) \endlink. May be removed post release 600.
	 *
	 * @type null
	 * \return \c null
	 */	
	 this.CntrlLdFailAuth = self.Base + 21;

	////////////////////////////////
	// Connection Events
	////////////////////////////////
	/**
	 * Conference attempt begun
	 *
	 * The first events in a conference. Usefull if you want to change 
	 * the gui to reflect a conference is attempting to begin.
	 * \deprecated Use \link ssamCbEnum::ConfRequested ssamCb.ConfRequested (200) \endlink. May be removed post release 600.
	 *
	 * @type number
	 * \return \c number
	 * \li \c 1 : Conference request successfully made
	 * \li \c 2 : Conference establishment / negotiation begun
	 * \note 
	 * ConfAttempt Condition 1 will not be received if the user did not initiate the call.
	 * 
	 * \note 
	 * When initiating a call the order ConfAttempt Conditions 1 and 2 are received in is not gauranteed.
	 */			
	this.ConfAttempt = self.Base + 14;
	
	/**
	 * Conference request made
	 *
	 * A \link ssamOpEnum::ConfStatusSendCurr ssamOp.ConfStatusSendCurr \endlink should always be received at some point afterwards 
	 * when the call fails
	 *
	 * @type number
	 * \return \c number
	 * \li \c 50	: Discovery failure / Firewall (sightspeed.resultCode.generalFailure )
	 * \li \c 200	: Request Ok (sightspeed.resultCode.ok )
	 * \li \c 416	: Unsupported URI requested (sightspeed.resultCode.unsupportedUri )
	 * 
	 * \since 600
	 */			
	this.ConfRequested = self.Base + 40;
			
	/**
	 * Conference request incoming
	 *
	 * @type null
	 * \return \c null
	 */			
	this.ConfIncoming = self.Base + 41;	
		
	/**
	 * Conference remote party ringing
	 *
	 * @type null
	 * \return \c null
	 * 
	 * \since 600
	 */			
	this.ConfRinging = self.Base + 42;
	
	/**
	 * Media Types
	 *
	 * \note Media Types supported for this call in bitmask form.
	 * Each time MediaTypes is received it authoratative for the client at that given time. This can be received multiple times 
	 * per call due to the SIP call lifecycle and each one may add or remove different media types.
	 *
	 * Enumerated sightspeed.callMediaTypeMask bits can be used from the hosted IFrame (IFrameName.sightspeed.callMediaTypeMask)
	 *
	 * @type number
	 * \return \c number
	 * \li \c 1 	: Audio Send (sightspeed.callMediaTypeMask.audioSend )
	 * \li \c 2 	: Audio Receive (sightspeed.callMediaTypeMask.audioReceive )
	 * \li \c 4 	: Video Send (sightspeed.callMediaTypeMask.videoSend )
	 * \li \c 8 	: Video Receive (sightspeed.callMediaTypeMask.videoReceive )
	 * 
	 * \since 600
	 */			
	this.ConfMediaTypes = self.Base + 43;
	
	/**
	 * Media Start
	 *
	 * \note Media Types exchanged actively for this call in bitmask form.
	 * Each time MediaStart is received it authoratative for the client at that given time. This can be received multiple times 
	 * per call due to the SIP call lifecycle and each one may add or remove different media types.
	 *
	 * Enumerated sightspeed.callMediaTypeMask bits can be used from the hosted IFrame (IFrameName.sightspeed.callMediaTypeMask)
	 *
	 * @type number
	 * \return \c number
	 * \li \c 1 	: Audio Send (sightspeed.callMediaTypeMask.audioSend )
	 * \li \c 2 	: Audio Receive (sightspeed.callMediaTypeMask.audioReceive )
	 * \li \c 4 	: Video Send (sightspeed.callMediaTypeMask.videoSend )
	 * \li \c 8 	: Video Receive (sightspeed.callMediaTypeMask.videoReceive )
	 * 
	 * \since 600
	 */			
	this.ConfMediaStart = self.Base + 44;	
	
	/**
	 * Conference has begun
	 *
	 * \note For outgoing calls this will happen upon 
	 * the other party accepting. There is no ConfInAccept
	 * @type null
	 * \return \c null
	 */			
	this.ConfStart = self.Base + 4;	

	/**
	 * Conference has ended
	 *
	 * Enumerated sightspeed.resultCode can be used from the hosted IFrame (IFrameName.sightspeed.resultCode)
	 *
	 * @type number
	 * \return \c number
	 * \li \c 0 	: Hangup (sightspeed.resultCode.userHangup )
	 * \li \c 5 	: PeerToPeer establishment / Firewall failure (sightspeed.resultCode.p2pConnFail )
	 * \li \c 10 	: Codec negotiation failure (sightspeed.resultCode.codecNegoFail )
	 * \li \c 11	: Video size negotiation failure (sightspeed.resultCode.sizeNegoFail )
	 * \li \c 12	: Discovery failure / Firewall (sightspeed.resultCode.discoveryFail )
	 * \li \c 13	: Unable to connect with negotiated codec (sightspeed.resultCode.mediaNegoFail )
	 * \li \c 14	: Unable start local media services (sightspeed.resultCode.mediaStartFail )
	 * \li \c 16	: Stopped receiving media from other side (sightspeed.resultCode.mediaTimeout )
	 * \li \c 17	: Stopped receiving media from other side during a resize event (sightspeed.resultCode.mediaTimeoutResize )
	 * \li \c 99	: Metered call time exceeded (sightspeed.resultCode.callTimerExpired )
	 * \li \c 401	: Logged in username / password failed (sightspeed.resultCode.unauthorized )
	 * \li \c 402	: Additional payment is required for connection (sightspeed.resultCode.paymentRequired )
	 * \li \c 403	: Connection not allowed (sightspeed.resultCode.forbidden )
	 * \li \c 404	: Unable to route call (sightspeed.resultCode.notFound )
	 * \li \c 404	: Call request timed out (sightspeed.resultCode.requestTimeout )
	 * \li \c 480	: No answer (sightspeed.resultCode.tempUnavailable )
	 * \li \c 484	: Unable to route call (sightspeed.resultCode.addressIncomplete )
	 * \li \c 486	: Remote party busy (sightspeed.resultCode.busyHere )
	 * \li \c 488	: Remote party declined (sightspeed.resultCode.notAcceptableHere )
	 * \li \c 500	: Server Error (sightspeed.resultCode.serverInternalError )
	 *
	 * \note Return codes for call end can be broadly categorized as
	 * \li \c 0-4		: Success
	 * \li \c 5-99		: SightSpeed Specific failure
	 * \li \c 100-199	: SIP Failures
	 * \li \c 200-299	: SIP Sucess
	 * \li \c 300-699	: SIP Failure
	 * 
	 * \since 600
	 */			
	this.ConfEnd = self.Base + 45;
	
	/**
	 * The target of an anonymous call's status
	 *
	 * @note This is only for anonymous modes and is only returned 
	 * when the initial check is made to determine the user's 
	 * status.
	 *
	 * @type string
	 * \return \c number
	 * \li \c 200 : User is online (sightspeed.resultCode.ok )
	 * \li \c 404 : User is offline (sightspeed.resultCode.notFound )
	 * 
	 * \since 600
	 */
	this.AnonTargetStatus = self.Base + 49;	
	
	/**
	 * The target recipient is available to receive a call.
	 * \deprecated Use \link ssamCbEnum::AnonTargetStatus ssamCb.AnonTargetStatus \endlink. May be removed post release 600.
	 *
	 * @note This is only for anonymous modes and is only returned 
	 * when the initial check is made to determine the user's 
	 * status.
	 * @type null
	 * @return \c null
	 */
	this.ConfOutAvailable = self.Base - 9;
	
	 
	////////////////////////////////
	// Connection Errors
	////////////////////////////////	
	/**
	 * Conference negotiation failed (PTP established but no response received)
	 * \note May occur only after a #ConfAttempt received.
	 * \deprecated Use \link ssamCbEnum::ConfEnd ssamCb.ConfEnd ( 5,10,11,401 ) \endlink. May be removed post release 600.
	 * 
	 * @type number
	 * \return \c number
	 * - @c 0   : PTP established but no response received (Requires Web Control Build 2560+)
	 * - @c 1 : Conference failed to start because user is unavailable or the 
	 *  conf attempt timed out. (Requires Web Control Build 2560+)
	 * - @c 2 : Conference request failed. Probably due to login / authentication expiration.
	 * @attention Return Value 1 is only returned when a call is attempted through the control 
	 * in Anonymous mode and the other user is not available to conference. Although still
	 * valid once the once the server is updated to the correct codes 
	 * (\link ssamCbEnum::ConfOutBusy ssamCb.ConfOutBusy \endlink ,
	 * \link ssamCbEnum::ConfOutOffline ssamCb.ConfOutOffline \endlink )
	 * it should rarely occur.
	 */		
	this.ConfErrNego = self.Base + 19;
	
	/**
	 * @internal 
	 * Conference failed to start because the user is not available.
	 * Returns the users status as a reason the outgoing conference failed.
	 * \deprecated Use \link ssamCbEnum::ConfEnd ssamCb.ConfEnd () \endlink. May be removed post release 600.
	 *
	 * @attention Does NOT get thrown to SSAM clients. Instead throws the conf out status messages.
	 * (\link ssamCbEnum::ConfOutBusy ssamCb.ConfOutBusy \endlink, 
	 * \link ssamCbEnum::ConfOutOffline ssamCb.ConfOutOffline \endlink )
	 * @type number
	 * \return \c number
	 * - @c -1  : Unknown Condition returned
	 * - @c 0-9 : Remote parties status.
	 */		
	this.ConfOutFail = self.Base + 60;
	
	/**
	 * Discovery failed during negotiation
	 * \deprecated Use \link ssamCbEnum::ConfEnd ssamCb.ConfEnd (12) \endlink. May be removed post release 600.
	 *
	 * \note May occur only before a #ConfAttempt received.	 
	 * @type null
	 * \return \c null
	 * \note This is usually due to a firewall blocking the connection.
	 */			
	this.ConfErrDiscFail = self.Base + 13;	
	
	/**
	 * The call recipient is busy
	 * \deprecated Use \link ssamCbEnum::ConfEnd ssamCb.ConfEnd (486) \endlink. May be removed post release 600.
	 *
	 * \note There is not related event for Incoming calls
	 * @type null
	 * \return \c null
	 */			
	this.ConfOutBusy = self.Base + 11;	
			
	/**
	 * The other user did not answer (The connection timed out)
	 * \deprecated Use \link ssamCbEnum::ConfEnd ssamCb.ConfEnd (480) \endlink. May be removed post release 600.
	 *
	 * @type null
	 * \return \c null
	 */		
	this.ConfOutNoAnswer = self.Base + 10;	
	
	/**
	 * The other party refused / declined the conference
	 * \deprecated Use \link ssamCbEnum::ConfEnd ssamCb.ConfEnd (488) \endlink. May be removed post release 600.
	 *
	 * @type null
	 * \return \c null
	 */			
	this.ConfOutDecline = self.Base + 9;
	
	/**
	 * The other user is not offline or not available
	 * \deprecated Use \link ssamCbEnum::ConfEnd ssamCb.ConfEnd (404) \endlink. May be removed post release 600.
	 *
	 * @type null
	 * @return \c null
	 */
	this.ConfOutOffline = self.Base - 3;
		
	/**
	 * Local user did not answer call before timeout
	 * \deprecated Use \link ssamCbEnum::ConfEnd ssamCb.ConfEnd (480) \endlink. May be removed post release 600.
	 *
	 * @type null
	 * \return \c null
	 */			
	this.ConfInNoAnswer = self.Base + 23;
	
	/**
	 * Local user declined the conference
	 * \deprecated Use \link ssamCbEnum::ConfEnd ssamCb.ConfEnd (488) \endlink. May be removed post release 600.
	 *
	 * @type null
	 * \return \c null
	 */			
	this.ConfInDecline = self.Base + 24;
	
	/**
	 * Local user accepted the conference
	 * \deprecated Use \link ssamCbEnum::ConfIncoming ssamCb.ConfIncoming () \endlink then  \link ssamCbEnum::ConfStart ssamCb.ConfStart () \endlink. 
	 * May be removed post release 600.
	 *
	 * @type null
	 * \return \c null
	 */			
	this.ConfInAccept = self.Base + 25;
	
	////////////////////////////////
	// In Conference Messages
	////////////////////////////////	
	/**
	 * Remote user ended the call
	 * \deprecated Use \link ssamCbEnum::ConfEnd ssamCb.ConfEnd (0) \endlink. May be removed post release 600.
	 *
	 * @type null
	 * \return \c null
	 */		
	this.ConfEndRemote = self.Base + 6;
	
	/**
	 * Local user ended the call
	 * \deprecated Use \link ssamCbEnum::ConfEnd ssamCb.ConfEnd (0) \endlink. May be removed post release 600.
	 *
	 * @type null
	 * \return \c null
	 */		
	this.ConfEndLocal = self.Base + 5;
	
	/**
	 * Chat message received
	 * @type string
	 * \return \c string HTML formatted string with username and message
	 */		
	this.ConfChatMsg = self.Base + 1;
	
	////////////////////////////////	
	////////////////////////////////	
	// Non SSAM ActiveX thrown Events
	////////////////////////////////	
	////////////////////////////////	

	////////////////////////////////
	// Login / Session Based
	////////////////////////////////	

	/**
	 * Authentication failed.
	 * \n Unable to authenticate supplied credentials.
	 * returns null.	 
	 * @type number
	 * \return \c number
	 * \li \c 0 : Not reported or production environment
	 * \li \c 1 : Invalid Auth Code
	 * \li \c 2 : Invalid Partner
	 * \li \c 3 : Invalid User
	 * \li \c 4 : Ivalid Domain
	 * \li \c 5 : Invalid Time
	 * \li \c 6 : Invalid Version
	 */	
	 this.SSAMLoginInvld = self.Base - 4;
	
	/**
	 * Invalid ssamMode passed to IFRAME.
	 * @type number
	 * \return \c number
	 * \li \c 0 : Invalid ssamMode
	 * @internal \li \c 1 : Non-Authorized ssamMode
	 */		
	this.SSAMModeInvld = self.Base - 6;
	
	/**
	 * Invalid ssamWidth and ssamHeight passed to IFRAME.
	 * @type number
	 * \return \c number
	 * \li \c 0 : The IFRAME size does not match the size parameters passed to SSAM
	 * \li \c 1 : The size parameters passed to SSAM are not large enough for the
	 *  required banner.
	 */			
	this.SSAMSizeInvld = self.Base - 8;
}

/**
 * Used to decode the callbacks from SSAM Object.
 * @type ssamCbEnum 
 * \attention This object should never be modified!
 * \brief Global instance for the SSAM callback (#ssamCbEnum) class.
 */	
var ssamCb = new ssamCbEnum();


/**
 * ssamOpEnum class.
 * \brief SSAM Control Options - Global Variable Class
 *
 * \n \n This class contains all of the Control Options for SSAM.
 * Each of the options are defined with their description and how they are validly used.
 * A control option can either take or return (on a set or get, respectively) 
 * either a \c string , a \c number or \c null. 
 * \n \n \b [Set] 
 * \n To set a control value, call the exposed function that allows interaction with the 
 * SSAM. A control option with a \c type of  \c string or \c number takes 
 * an arguement that is of that datatype. An option of type \c null does not require an 
 * argument.
 * \n \n \b [Get]
 * \n To get a control value, call the exposed function that allows interaction with  
 * SSAM. A control option with a \c return type of \c string or \c number returns a
 * datatype of those forms. The \c return value is specified in the documentation for the 
 * control option.
 * @ctor
 * Constructor.
 * The constructor initializes all the \c control \c options with their initial values
 * \attention This is a complete list of all the control options that may be passed
 * to SSAM.
 */
function ssamOpEnum () 
{
	var self = this;

	/** 
	 * @internal
	 * Base number for Control Options
	 *
	 * Last used values for callback codes. 
	 * These must be changed every time a new callback is added.
	 * \n Last used for php = -3
	 * \n Last used for control = Irrelevant. Some are defined as +0, +100 or +1000
	 */	
	this.Base = 50000;

	////////////////////////////////
	// SSAM Utils
	////////////////////////////////
		
	/**
	 * Initialize SSAM ActiveX
	 * @type null
	 *
	 * [set]
	 * \li \c null : Initializes SSAM ActiveX
	 *
	 * [get]
	 * \li \c undefined : N/A
	 * @return \c undefined 	 	 	 
	 */	
	this.CntrlInit = self.Base + 0;
	
	/**
	 * Terminate (Shutdown) SSAM ActiveX
	 * @type null
	 *
	 * [set]
	 * \li \c null : Terminate SSAM ActiveX
	 *
	 * [get]
	 * \li \c undefined : N/A
	 * @return \c undefined 	 	 	 
	 */		
	this.CntrlTerm = self.Base + 1;
	
	/**
	 * Ping the Directory Server 
	 * @type null
	 * \deprecated No longer in use, may be removed post release 600
	 *
	 * [set]
	 * \li \c null : Ping the Directory Server
	 *
	 * [get]
	 * \li \c undefined : N/A
	 * @return \c undefined 	 	 	 
	 */		
	this.CntrlPing = self.Base + 2; 
	
	/**
	 * Initiate a Conference
	 * @type string
	 *
	 * [set]
	 * \li \c string : The valid User ID / email address of party to conference 
	 * \n<i>For anonymous users can be left blank, \c null . SSAM will remember the uid the page was called with.</i>
	 *
	 * [get]
	 * \li \c undefined : N/A
	 * @return \c undefined
	 *
	 * \note Initiating a conference will result in a ssamCbEnum::ConfRequested
	 * \internal This option requires a special case in \link ssamSetOption that will
	 * determine if SSAM's originally specified uid will be used.
	 * \internal API FOR NEXT RELEASE
 	 * - \c string : Uri to call. Valid options include:
 	 * 	- sipUri 	: Full sip uri of the form: sip:user@exception
 	 * 	- sipUserId : Partial sip uri of the form: sip:user
 	 *  - mailto	: Simplified mailto uri of the form: mailto:user@domain
 	 *	- tel		: Simplified tel uri of the form: tel:####
 	 *	- Invalid uri's will result in a ssamCbEnum::ConfRequested (416)
	 */
	this.ConfRequest = self.Base - 4;
	
	/**
	 * Determine if Logged In
	 * @type number
	 *
	 * [set]
	 * \li \c undefined
	 *
	 * [get]
	 * \li \c 0 : Not logged in
	 * \li \c 1 : Logged in
	 * @return \c undefined 	 	 	 
	 */		
	this.UserLoggedIn = self.Base + 4;
	
	/**
	 * Stop a Conference
	 * @type null
	 *
	 * [set]
	 * \li \c null : Hang up on active conference
	 *
	 * [get]
	 * \li \c undefined : N/A
	 * @return \c undefined 	 	 
	 */		
	this.ConfHangUp = self.Base + 5;

	////////////////////////////////
	// Statistics (Get only)
	////////////////////////////////
	
	/**
	 * Send kbps (Current)
	 * @type null
	 *
	 * [set]
	 * \li \c undefined : N/A	 
	 *
	 * [get]
	 * \li \c number : Current send bit rate in kbps
	 * @return \c number 	 
	 */			
	this.ConfStatusSendCurr =  self.Base + 30;
	
	/**
	 * Send kbps (Maximum)
	 * @type null
	 *
	 * [set]
	 * \li \c undefined : N/A
	 *
	 * [get]
	 * \li \c number : Maximum send bit rate in kbps
	 * @return \c number 
	 */			
	this.ConfStatusSendMax = self.Base + 31;
	
	/**
	 * Send kbps (Average)
	 * @type null
	 *
	 * [set]
	 * \li \c undefined : N/A
	 *
	 * [get]
	 * \li \c number : Average send bit rate in kbps
	 * @return \c number 
	 */			
	this.ConfStatusSendAvg = self.Base + 32;
	
	/**
	 * Send Frames Per Second (FPS)
	 * @type null
	 *
	 * [set]
	 * \li \c undefined : N/A
	 *
	 * [get]
	 * \li \c number : Current send Frames Per Second (FPS)
	 * @return \c number 
	 */			
	this.ConfStatusSendFps = self.Base + 33;
	
	/**
	 * Receive kbps (Current)
	 * @type null
	 *
	 * [set]
	 * \li \c undefined : N/A
	 *
	 * [get]
	 * \li \c number : Current receive bit rate in kbps
	 * @return \c number 
	 */			
	this.ConfStatusRecvCurr = self.Base + 34;
	
	/**
	 * Receive kbps (Maximum)
	 * @type null
	 *
	 * [set]
	 * \li \c undefined : N/A
	 *
	 * [get]
	 * \li \c number : Maximum receive bit rate in kbps
	 * @return \c number 
	 */			
	this.ConfStatusRecvMax = self.Base + 35;
	
	/**
	 * Receive kbps (Average)
	 * @type null
	 *
	 * [set]
	 * \li \c undefined : N/A
	 *
	 * [get]
	 * \li \c number : Average receive bit rate in kbps
	 * @return \c number 
	 */			
	this.ConfStatusRecvAvg = self.Base + 36;
	
	/**
	 * Receive Frames Per Second (FPS)
	 * @type null
	 *
	 * [set]
	 * \li \c undefined : N/A
	 *
	 * [get]
	 * \li \c number : Current receive Frames Per Second (FPS)
	 * @return \c number 
	 */			
	this.ConfStatusRecvFps = self.Base + 37;
	
	/**
	 * Round trip latency in ms
	 * @type null
	 *
	 * [set]
	 * \li \c undefined : N/A
	 *
	 * [get]
	 * \li \c number : Round trip latency in ms
	 * @return \c number 
	 */			
	this.ConfStatusLatency = self.Base + 38;
	
	/**
	 * CPU Usage (in percent)
	 * @type null
	 *
	 * [set]
	 * \li \c undefined : N/A
	 *
	 * [get]
	 * \li \c number : CPU Usage (in percent)
	 * @return \c number 
	 * \note This is total usage for all programs on the system.
	 */			
	this.ConfStatusCPU = self.Base + 39;
	
	/**
	 * Network Health 
	 * @type null
	 *
	 * [set]
	 * \li \c undefined : N/A
	 *
	 * [get]
	 * \li \c 1 : Good
	 * \li \c 2 : Noticeable network problems
	 * \li \c 3 : Moderate to Severe network problems
	 * @return \c number 
	 * \note 56k mode behavior: Always returns 1
	 */			
	this.ConfStatusNetwork = self.Base + 40;
	
	////////////////////////////////
	// Video Play Options
	////////////////////////////////	

	/**
	 * Send Video Pause
	 * @type number
	 * 
	 * [set] 
	 * \li \c 0 : Play (Send)
	 * \li \c 1 : Pause	(Send)
	 *	 
	 * [get] 
	 * \li \c 0 : Play (Send)
	 * \li \c 1 : Pause (Send)
	 * \return \c number	 	 
	 */		
	this.VideoSendPause = self.Base + 100;
	
	/**
	 * Send Video Pause Toggle
	 * @type number
	 * 
	 * [set]
	 * \li \c null : Toggle Send Video Pause
	 *
	 * [get]
	 * \li \c undefined : N/A
	 * @return \c undefined 	 	 
	 */			
	this.VideoSendToggle = self.Base + 102;
	
	/**
	 * Receive Video Pause
	 * @type number
	 * 
	 * [set] 
	 * \li \c 0 : Play (Receive)
	 * \li \c 1 : Pause	(Receive)
	 *	 
	 * [get] 
	 * \li \c 0 : Play (Receive)
	 * \li \c 1 : Pause (Receive)
	 * \return \c number	 	 
	 */			
	this.VideoRecvPause = self.Base + 101;
	
	/**
	 * Receive Video Pause Toggle
	 * @type number
	 * 
	 * [set]
	 * \li \c null : Toggle Receive Video Pause
	 *
	 * [get]
	 * \li \c undefined : N/A
	 * @return \c undefined 	 	 
	 */		
	this.VideoRcvToggle = self.Base + 103;
	
	////////////////////////////////
	// PIP options
	////////////////////////////////	
	
	/**
	 * PIP (Picture in Picture) Display
	 * @type number
	 * 
	 * [set] 
	 * \li \c 0 : Inactive PIP 
	 * \li \c 1 : Active (Displayed) PIP
	 *	 
	 * [get] 
	 * \li \c 0 : Inactive PIP 
	 * \li \c 1 : Active (Displayed) PIP
	 * \return \c number	 	 
	 */			
	this.PipDisp = self.Base + 1024;
	
	/**
	 * PIP (Picture in Picture) Display Toggle
	 * @type number
	 * 
	 * [set]
	 * \li \c null : PIP (Picture in Picture) Display Toggle
	 *
	 * [get]
	 * \li \c undefined : N/A
	 * @return \c undefined 	 	 
	 */			
	this.PipDispToggle = self.Base + 1025;
	
	/**
	 * PIP (Picture in Picture) Source
	 * \n Allows switching the sources of the main and pip windows.	 
	 * @type number
	 * 
	 * [set] 
	 * \li \c 0 : Local in PIP, Remote in Main 
	 * \li \c 1 : Remote in PIP, Local in Main
	 *	 
	 * [get] 
	 * \li \c 0 : Local in PIP, Remote in Main 
	 * \li \c 1 : Remote in PIP, Local in Main
	 * \return \c number	 	 
	 */
	this.PipSrc = self.Base + 1028;
	
	/**
	 * PIP (Picture in Picture) Source Toggle
	 * \n Switches the sources of the main and pip windows.
	 * @type null
	 * 
	 * [set]
	 * \li \c null : PIP (Picture in Picture) Source Toggle
	 *
	 * [get]
	 * \li \c undefined : N/A
	 * @return \c undefined
	 */				
	this.PipSrcToggle = self.Base + 1029;
	
	////////////////////////////////
	// FullScreen
	////////////////////////////////	

	/**
	 * Fullscreen Toggle
	 * @type null
	 * 
	 * [set]
	 * \li \c null : Toggle Fullscreen mode
	 *
	 * [get]
	 * \li \c undefined : N/A
	 * @return \c undefined
	 * \note This effectlivey is a set active for Fullscreen as the current windows
	 * specification does not allow for turning off Fullscreen mode programmatically.
	 */					
	this.FullScreenToggle = self.Base + 1026;

	////////////////////////////////
	// Audio Options
	////////////////////////////////	

	/**
	 * Audio Capture (Microphone) Play / Mute 
	 * @type number
	 * 
	 * [set] 
	 * \li \c 0 : Send captured audio 
	 * \li \c 1 : Mute captured audio
	 *	 
	 * [get] 
	 * \li \c 0 : Send captured audio
	 * \li \c 1 : Mute captured audio
	 * \return \c number	 	 
	 */	
	this.AudioCaptMute = self.Base + 250;
	
	/**
	 * Audio Capture (Microphone) Play / Mute Toggle
	 * @type null
	 * 
	 * [set]
	 * \li \c null : Audio Capture (Microphone) Play / Mute Toggle
	 *
	 * [get]
	 * \li \c undefined : N/A
	 * @return \c undefined
	 */					
	this.AudioCaptToggle = self.Base + 252;
	
	/**
	 * Audio Capture (Microphone) Volume
	 * @type number
	 * 
	 * [set] 
	 * \li \c number : 0 - 65535 (0 = min, 65535 = max) 
	 *	 
	 * [get] 
	 * \li \c number : 0 - 65535 (0 = min, 65535 = max) 
	 * \return \c number	 	 
	 */					
	this.AudioCaptVol = self.Base + 260;
	
	/**
	 * Audio Playback (Incoming Audio) Play / Mute 
	 * @type number
	 * 
	 * [set] 
	 * \li \c 0 : Play incoming audio
	 * \li \c 1 : Mute incoming audio
	 *	 
	 * [get] 
	 * \li \c 0 : Play incoming audio
	 * \li \c 1 : Mute incoming audio
	 * \return \c number	 	 
	 */	
	this.AudioPlayMute = self.Base + 251;
	
	/**
	 * Audio Playback (Incoming Audio) Play / Mute Toggle
	 * @type null
	 * 
	 * [set]
	 * \li \c null : Audio Playback (Incoming Audio) Play / Mute Toggle
	 *
	 * [get]
	 * \li \c undefined : N/A
	 * @return \c undefined
	 */					
	this.AudioPlayToggle = self.Base + 253;
	
	/**
	 * Audio Playback (Incoming Audio) Volume
	 * @type number
	 * 
	 * [set] 
	 * \li \c number : 0 - 65535 (0 = min, 65535 = max) 
	 *	 
	 * [get] 
	 * \li \c number : 0 - 65535 (0 = min, 65535 = max) 
	 * \return \c number	 	 
	 */					
	this.AudioPlayVol = self.Base + 261;
	
	////////////////////////////////
	// Text Chat
	////////////////////////////////	
	
	/**
	 * Send Chat Message
	 * @type string
	 * 
	 * [set] 
	 * \li \c string : Text message to send
	 *
	 * [get] 
	 * \li \c undefined	 
	 * \return \c undefined	 	 	 
	 */			
	this.ConfChatSend = self.Base + 20;

	////////////////////////////////
	// Preferences
	////////////////////////////////	
	/**
	 * Open the preferences wizard
	 * @type null
	 *
	 * [set]
	 * \li \c null : Open the preferences wizard
	 *
	 * [get]
	 * \li \c undefined : N/A
	 * @return \c undefined
	 * \attention This is a blocking call. It will not return until the
	 * preferences wizard is exited.
	 * \note The preferences wizard will not open if a conference is in progress.
	 */		
	this.CntrlPreferences = self.Base + 1027;

	/**
	 * Set Auto-Accept flag in registry
	 * @type number
	 * 
	 * [set] 
	 * \li \c 0 : Request acceptance of incoming calls (default)
	 * \li \c 1 : Auto-accept all calls
	 *	 
	 * [get] 
	 * \li \c 0 : Request acceptance of incoming calls
	 * \li \c 1 : Auto-accept all calls
	 * \return \c number
	 * \note This setting changes the registry value and therefore is persistant
	 * across logins and users for the installation of SightSpeed on the system.	 
	 */		
	this.CntrlPreferencesAutoAccept = self.Base + 6;
	

	////////////////////////////////
	// Multi-party
	// (Currently de-activated)	
	////////////////////////////////	
	/**
	 * @internal
	 * Get whether or not the call in progress is a Multi-Party call.
	 * @type undefined
	 * \note Only accessible after a conference has begun.
	 *
	 * [set]
	 * \li \c undefined : N/A
	 *
	 * [get]
	 * \li \c 0 : One to One call
	 * \li \c 1 : Multi-Party call
	 * \return \c number
	 */	
	this.ConfCallType = self.Base + 7;
	

	////////////////////////////////
	// Media-Mail
	// (Currently de-activated)
	////////////////////////////////
	
	/**
	 * @internal
	 * The next MediaMail ID to record
	 * @type string
	 * 
	 * [set] 
	 * \li \c string : Media Mail Id
	 *
	 * [get] 
	 * \li \c undefined	 
	 * \return \c undefined	 	 	 
	 */
	// this.MediaMailId = self.Base + 1100;
	 
	/**
	 * @internal
	 * Length in seconds for the next mediamail
	 * @type number
	 * 
	 * [set] 
	 * \li \c number : Media Mail Permisssions Bitmask
	 *
	 * [get] 
	 * \li \c undefined	 
	 * \return \c undefined	 	 	 
	 */
	// this.MediaMailLength = self.Base + 1101;

	/**
	 * @internal
	 * The permissions for the next mediamail
	 * @type number
	 * 
	 * [set] 
	 * \li \c number : Media Mail Permisssions Bitmask
	 *
	 * [get] 
	 * \li \c undefined	 
	 * \return \c undefined	 	 	 
	 */
	// this.MediaMailPermissions = self.Base + 1102;
	 	 
	/**
	 * @internal
	 * The location to upload the next mediamail to
	 * @type string
	 * 
	 * [set] 
	 * \li \c string : Location (URL)
	 *
	 * [get] 
	 * \li \c undefined	 
	 * \return \c undefined	 	 	 
	 */
	// this.MediaMailUploadLocation = self.Base + 1103;

	/**
	 * @internal
	 * Include extra step for post upload process
	 * @type number
	 * 
	 * [set] 
	 * \li \c 0 : No extra step
	 * \li \c 1 : One extra step
	 * [get] 
	 * \li \c undefined	 
	 * \return \c undefined	 	
	 * \note This won;t cause the control to load a page that is the containers responsibility, 
	 * it will just set the wizard to have the correct number of steps.
	 */
	// this.MediaMailPostUploadStep = self.Base + 1104;

 	/**
 	 * @internal
	 * Start the record wizard.
	 * @type undefined
	 *
	 * [set]
	 * \li \c undefined : N/A
	 *
	 * [get]
	 * \li \c 0 : Did not Finish (User canceled, etc)
	 * \li \c 1 : Recorded and Uploaded Successfully
	 * @return \c number
	 */		
	// this.MediaMailRecord = self.Base + 1105;
		 
	////////////////////////////////
	// Nicknames
	////////////////////////////////	
	/**
	 * Get the remote user's nickname
	 * @type undefined
	 * \note Only accessible after a conference has begun.
	 *
	 * [set]
	 * \li \c undefined : N/A
	 *
	 * [get]
	 * \li \c string : Get the remote user's nickname
	 * @return \c string
	 */		
	this.UserNameRemote = self.Base + 2000;
	
	/**
	 * Get the local user's nickname
	 * @type undefined
	 *
	 * [set]
	 * \li \c undefined : N/A
	 *
	 * [get]
	 * \li \c string : Get the local user's nickname
	 * @return \c string
	 */			
	this.UserNameLocal = self.Base + 2001;

	////////////////////////////////
	// Partner
	////////////////////////////////	
	/**
	 * Get the local user's partner from the registry
	 * @type undefined
	 *
	 * [set]
	 * \li \c undefined : N/A
	 *
	 * [get]
	 * \li \c string : Get the local user's partner from the registry
	 * @return \c string
	 */				
	this.CntrlPartner = self.Base + 2002;
	
	////////////////////////////////
	// Global Values
	////////////////////////////////	
	
	/**
	 * Current SSAM Web Control Build Number
	 * @type number
	 *
	 * [set]
	 * - @c undefined : N/A
	 *
	 * [get]
	 * - @c number : Build number for SightSpeed Web Control
	 * @return @c number
	 */				
	this.CntrlVersion = self.Base + 10;	
		
	/**
	 * Global Debug Level
	 * @type number
	 *
	 * [set]
	 * \li \c number : (0-100) 0 = no messages (default), 100 = extremely verbose
	 * \n N/A
	 *
	 * [get]
	 * \li \c number : (0-100) 0 = no messages (default), 100 = extremely verbose
	 * @return \c number
	 */				
	this.GlobalDebugLvl = self.Base - 1;
	
	/**
	 * Set the status Update Flags
	 * @type number
	 * 
	 * [set] 
	 * \li \c 0 : Repress Status Update Events (default)
	 * \li \c 1 : Propagate Status Update Events
	 *	 
	 * [get] 
	 * \li \c 0 : Repress Status Update Events
	 * \li \c 1 : Propagate Status Update Events
	 * \return \c number	
	 */				
	this.CntrlStatusUpdtEvents = self.Base - 2;
	
	/**
	 * Set the Timeout of the Userlogin to determine if 
	 * a firewall blocked the process from logging in.
	 * @type number
	 * \deprecated No longer in use, may be removed post release 600.
	 * Login failures are actively passed to the client.
	 * 
	 * [set] 
	 * \li \c number : Number in milliseconds (4000 default)
	 *	 
	 * [get] 
	 * \li \c number : Number in milliseconds 
	 * \return \c number	
	 */				
	this.UserLoginTimeoutLen = self.Base - 3;	
	
	////////////////////////////////
	// Internal String vs Number Calls
	////////////////////////////////	
	
	/**
	 * \internal 
	 * String of a joined array of control options requiring SetOptionString
	 */			
	this.SetStringIds = new Array(self.ConfChatSend, self.ConfRequest).join();
	/**
	 * \internal 
	 * String of a joined array of control options requiring GetOptionString
	 */			
	this.GetStringIds = new Array(self.UserNameRemote, self.UserNameLocal, self.CntrlPartner).join();	
}

/**
 * Used to encode all the get / set options to SSAM.
 * @type ssamOpEnum
 * \attention This object should never be modified!
 * \brief Global instance for SSAM get / set options (#ssamCbEnum) class.
 */
var ssamOp = new ssamOpEnum();
