﻿/**
*	Core
*/
var Core = AbstractModel.extend(
	{
		/**
		*   init
		*
		*   Constructs the core
		*
		*	@param	p - application prefix
		*/
		init: function(p)
		{
			this._super( "Core", p );
			
			// define props
			this.userProfile = null;
			this.pageData = null;
			this.delay = null;
			this.initialised = false;
			this.initTimeOut = 5;
		},
		
		/**
		*   forceInitialise
		*
		*   Forces initialisation of the application if the initial ajax does not fire
		*	This function stands to irradicate intermitemt errors across versions of IE 7
		*	& Safari where the ajax call seems not to work unless user initiated
		*/
		forceInitialise: function()
		{
			//alert( "test 4 : Failed" );
			
			// null the delay
			this.delay = null;
			
			// if the app has initialised
			// then just return
			if ( this.initialised )
				return;
				
			// else....
			// broadcast 'forced' event
			// the logged in user data has been received
			this.broadcast( 'onLoggedInUserReceived', 0 );
		},
		
		/**
		*   getLoggedInUser
		*
		*   Gets the logged in user data from the session object
		*/
		getLoggedInUser: function()
		{
			//alert( "getting logged in user " + this.userProfile );
			
			//alert( "test 3 : Passed" );
			
			// define the class object
			var obj = this;
			
			// if already obtained then return the data object
			if ( this.userProfile != null )
				return this.userProfile;
				
			// set timeout to force init
			// this will catch the error thrown intermittently when no data
			// is returned fro the ajax call
			this.delay = setTimeout( function () { obj.forceInitialise.call( obj ); }, this.initTimeOut*1000 );
			
			// make the ajax call
			$.ajax({
				url: "" + this.getPrefix() + "ajax/ajax.php",
				global: false,
				type: "POST",
				data: ({
					cmd : "get_logged_in_user_prof"
				}),
				dataType: "json",
				success: function( json ) {
				// @@ success object
					//alert( "SUCCESS! " + "Ajax returned logged user data : " + json );
					//alert( "test 4 : Passed" );
					// define as initialised
					obj.initialised = true;
					// clear the time out
					clearTimeout( obj.delay );
					// handle return data
					if ( json.contents == 0 ) {
					// if there has been no xml returned
						// broadcast event
						// the logged in user data has been received
						obj.broadcast( 'onLoggedInUserReceived', json.contents );
					} else {
					// if data has been returned
					
						// register the logged in user data
						obj.userProfile = obj.getSerializedProfileData( json.contents.profile );
					
						// broadcast event
						// the logged in user data has been received
						obj.broadcast( 'onLoggedInUserReceived', obj.userProfile );
					}
					return false;
				},
				error: function( HTTPReq, feedback, error ) {
				// @@ error object
					//alert( "FATAL ERROR! " + "An ajax error occured : " + feedback );
					// broadcast event
					// the logged in user data has not been received
					obj.broadcast( 'onLoggedInUserReceived', 0 );
				}
			});/**/
		},
		
		/**
		*   getSerializedProfileData
		*
		*   Returns the serialized profile data object from the json profile object
		*
		*	@param	d - data
		*/
		getSerializedProfileData: function(d)
		{
			//alert( "serializing : " + d );
			
			if ( !d )
				return;
			
			// create a user profile data object
			var userProfile = new UserProfileData();
			
			if ( d.profile_id != null ) 				userProfile.setProfileId( d.profile_id );
			if ( d.user_id != null ) 					userProfile.setUserId( d.user_id );
			if ( d.user_type != null ) 					userProfile.setUserType( d.user_type );
			if ( d.user_type_string != null ) 			userProfile.setUserTypeString( d.user_type_string );
			if ( d.user_email != null ) 				userProfile.setUserEmail( d.user_email );
			if ( d.user_postcode != null ) 				userProfile.setUserPostCode( d.user_postcode );
			if ( d.user_phone != null ) 				userProfile.setUserPhone( d.user_phone );
			if ( d.user_wallet != null ) 				userProfile.setUserWallet( d.user_wallet );
			if ( d.user_private_photo_views != null ) 	userProfile.setUserPrivatePhotoViews( d.user_private_photo_views );
			if ( d.user_permission_id != null ) 		userProfile.setUserPermissionId( d.user_permission_id );
			if ( d.name != null ) 						userProfile.setName( d.name );
			if ( d.age != null ) 						userProfile.setAge( d.age );
			if ( d.location != null ) 					userProfile.setLocation( d.location );
			if ( d.height != null ) 					userProfile.setHeight( d.height );
			if ( d.eye_colour != null ) 				userProfile.setEyeColour( d.eye_colour );
			if ( d.chest != null ) 						userProfile.setChest( d.chest );
			if ( d.dress_size != null ) 				userProfile.setDressSize( d.dress_size );
			if ( d.category != null ) 					userProfile.setCategory( d.category );
			if ( d.biography != null ) 					userProfile.setBiography( d.biography );
			if ( d.message != null ) 					userProfile.setMessage( d.message );
			if ( d.profile_photo_id != null ) 			userProfile.setProfilePhotoId( d.profile_photo_id );
			if ( d.profile_photo != null ) 				userProfile.setProfilePhoto( d.profile_photo );
			if ( d.thumb_photo_id != null ) 			userProfile.setThumbPhotoId( d.thumb_photo_id );
			if ( d.thumb_photo != null ) 				userProfile.setThumbPhoto( d.thumb_photo );
			if ( d.private_gallery_id != null ) 		userProfile.setPrivateGalleryId( d.private_gallery_id );
			if ( d.url != null ) 						userProfile.setURL( d.url );
			if ( d.directory != null ) 					userProfile.setDirectory( d.directory );
			if ( d.user_directory != null ) 			userProfile.setUserDirectory( d.user_directory );
			if ( d.views != null ) 						userProfile.setViews( d.views );
			if ( d.photos != null ) 					userProfile.setPhotos( d.photos );
			if ( d.accolades != null ) 					userProfile.setAccolades( d.accolades );
			if ( d.fans != null ) 						userProfile.setFans( d.fans );
			
			return userProfile;
		},
		
		/**
		*   getUserProfile
		*
		*   Returns the users profile
		*/
		getUserProfile: function() { return this.userProfile; },
		
		/**
		*   getPageData
		*
		*   Returns the page config data
		*
		*	@param	p - page xml file
		*/
		getPageData: function(p)
		{
			// if already obtained
			if ( this.pageData != null )
				return this.pageData; 
				
			var obj = this;
			$.post( "" + this.getPrefix() + "ajax/ajax_general.php", {
				cmd: "get_page_data",
				pageXML: p
			}, function(json) {
				//alert( "received : " + json );
				
				if ( json.contents == 0 ) {
				// if there has been no xml returned
					// broadcast event
					// the forum data has been received
					obj.broadcast( 'onPageConfigFailed', json.contents );
				} else {
				// if data has been returned
					// set the page config
					this.pageData = json.contents;
					// broadcast event
					// the forum data has been received
					obj.broadcast( 'onPageConfigReceived', json.contents );
				}
				return false;
			}, "json");
		}
	}
);

/**
*   Class : UserProfileData
*
*   Class holds all data necessary to esatblish a user profile
*
*   @usage    Used by application model
*   @author   Daniel Ivanovic dan@substance001.com
*/
var UserProfileData = AbstractObject.extend(
	{
		/**
		*   init
		*
		*   Constructs the button dat6a object
		*/
		init: function()
		{
			this._super( "UserProfileData" );
			
			this.profileId = 0;
			this.userId = 0;
			this.userType = 0;
			this.userTypeString = '';
			this.userEmail = "";
			this.userPostCode = "";
			this.userPhone = "";
			this.userWallet = "";
			this.userPrivatePhotoViews = "";
			this.userPermissionId = 0;
			this.name = '';
			this.age = '';
			this.location = '';
			this.height = '';
			this.eyeColour = '';
			this.chest = '';
			this.dressSize = 0;
			this.category = '';
			this.biography = '';
			this.message = '';
			this.profilePhotoId = 0;
			this.profilePhoto = '';
			this.thumbPhotoId = 0;
			this.thumbPhoto = '';
			this.privateGalleryId = 0;
			this.url = '';
			this.directory = '';
			this.userDirectory = '';
			this.views = 0;
			this.photos = '';
			this.accolades = '';
			this.fans = '';
		},
		
		/**
		*   setProfileId / getProfileId
		*
		*   Sets / Returns the profile id
		*/
		setProfileId: function(s) { this.profileId = s; },
		getProfileId: function() { return this.profileId; },
		
		/**
		*   setUserId / getUserId
		*
		*   Sets / Returns the user id
		*/
		setUserId: function(s) { this.userId = s; },
		getUserId: function() { return this.userId; },
		
		/**
		*   setUserType / getUserType
		*
		*   Sets / Returns the user type
		*/
		setUserType: function(s) { this.userType = s; },
		getUserType: function() { return this.userType; },
		
		/**
		*   setUserTypeString / getUserTypeString
		*
		*   Sets / Returns the user type
		*/
		setUserTypeString: function(s) { this.userTypeString = s; },
		getUserTypeString: function() { return this.userTypeString; },
		
		/**
		*   setUserEmail / getUserEmail
		*
		*   Sets / Returns the user email
		*/
		setUserEmail: function(s) { this.userEmail = s; },
		getUserEmail: function() { return this.userEmail; },
		
		/**
		*   setUserPostCode / getUserPostCode
		*
		*   Sets / Returns the user postcode
		*/
		setUserPostCode: function(s) { this.userPostCode = s; },
		getUserPostCode: function() { return this.userPostCode; },
		
		/**
		*   setUserPhone / getUserPhone
		*
		*   Sets / Returns the user phone number
		*/
		setUserPhone: function(s) { this.userPhone = s; },
		getUserPhone: function() { return this.userPhone; },
		
		/**
		*   setUserWallet / getUserWallet
		*
		*   Sets / Returns the user wallet data object
		*/
		setUserWallet: function(s) { this.userWallet = s; },
		getUserWallet: function() { return this.userWallet; },
		
		/**
		*   setUserPrivatePhotoViews / getUserPrivatePhotoViews
		*
		*   Sets / Returns the user private photo views array
		*/
		setUserPrivatePhotoViews: function(s) { this.userPrivatePhotoViews = s; },
		getUserPrivatePhotoViews: function() { return this.userPrivatePhotoViews; },
		
		/**
		*   setUserPermissionId / getUserPermissionId
		*
		*   Sets / Returns the users permission id
		*/
		setUserPermissionId: function(s) { this.userPermissionId = s; },
		getUserPermissionId: function() { return this.userPermissionId; },
		
		/**
		*   setName / getName
		*
		*   Sets / Returns the name
		*/
		setName: function(s) { this.name = s; },
		getName: function() { return this.name; },
		
		/**
		*   setAge / getAge
		*
		*   Sets / Returns the age
		*/
		setAge: function(s) { this.age = s; },
		getAge: function() { return this.age; },
		
		/**
		*   setLocation / getLocation
		*
		*   Sets / Returns the location
		*/
		setLocation: function(s) { this.location = s; },
		getLocation: function() { return this.location; },
		
		/**
		*   setHeight / getHeight
		*
		*   Sets / Returns the height
		*/
		setHeight: function(s) { this.height = s; },
		getHeight: function() { return this.height; },
		
		/**
		*   setEyeColour / getEyeColour
		*
		*   Sets / Returns the eye colour
		*/
		setEyeColour: function(s) { this.eyeColour = s; },
		getEyeColour: function() { return this.eyeColour; },
		
		/**
		*   setChest / getChest
		*
		*   Sets / Returns the chest size
		*/
		setChest: function(s) { this.chest = s; },
		getChest: function() { return this.chest; },
		
		/**
		*   setDressSize / getDressSize
		*
		*   Sets / Returns the dress size
		*/
		setDressSize: function(s) { this.dressSize = s; },
		getDressSize: function() { return this.dressSize; },
		
		/**
		*   setCategory / getCategory
		*
		*   Sets / Returns the category
		*/
		setCategory: function(s) { this.category = s; },
		getCategory: function() { return this.category; },
		
		/**
		*   setBiography / getBiography
		*
		*   Sets / Returns the biography
		*/
		setBiography: function(s) { this.biography = s; },
		getBiography: function() { return this.biography; },
		
		/**
		*   setMessage / getMessage
		*
		*   Sets / Returns the message
		*/
		setMessage: function(s) { this.message = s; },
		getMessage: function() { return this.message; },
		
		/**
		*   setProfilePhotoId / getProfilePhotoId
		*
		*   Sets / Returns the profile photo id
		*/
		setProfilePhotoId: function(s) { this.profilePhotoId = s; },
		getProfilePhotoId: function() { return this.profilePhotoId; },
		
		/**
		*   setProfilePhoto / getProfilePhoto
		*
		*   Sets / Returns the profile photo file
		*/
		setProfilePhoto: function(s) { this.profilePhoto = s; },
		getProfilePhoto: function() { return this.profilePhoto; },
		
		/**
		*   setThumbPhotoId / getThumbPhotoId
		*
		*   Sets / Returns the thumb photo id
		*/
		setThumbPhotoId: function(s) { this.thumbPhotoId = s; },
		getThumbPhotoId: function() { return this.thumbPhotoId; },
		
		/**
		*   setThumbPhoto / getThumbPhoto
		*
		*   Sets / Returns the thumb photo file string
		*/
		setThumbPhoto: function(s) { this.thumbPhoto = s; },
		getThumbPhoto: function() { return this.thumbPhoto; },
		
		/**
		*   setPrivateGalleryId / getPrivateGalleryId
		*
		*   Sets / Returns the users private gallery id
		*/
		setPrivateGalleryId: function(s) { this.privateGalleryId = s; },
		getPrivateGalleryId: function() { return this.privateGalleryId; },
		
		/**
		*   setURL / getURL
		*
		*   Sets / Returns the url
		*/
		setURL: function(s) { this.url = s; },
		getURL: function() { return this.url; },
		
		/**
		*   setDirectory / getDirectory
		*
		*   Sets / Returns the directory
		*/
		setDirectory: function(s) { this.directory = s; },
		getDirectory: function() { return this.directory; },
		
		/**
		*   setUserDirectory / getUserDirectory
		*
		*   Sets / Returns the users specific directory
		*/
		setUserDirectory: function(s) { this.userDirectory = s; },
		getUserDirectory: function() { return this.userDirectory; },
		
		/**
		*   setViews / getViews
		*
		*   Sets / Returns the users views
		*/
		setViews: function(s) { this.views = s; },
		getViews: function() { return this.views; },
		
		/**
		*   setPhotos / getPhotos
		*
		*   Sets / Returns the users photos
		*/
		setPhotos: function(s) { this.photos = s; },
		getPhotos: function() { return this.photos; },
		
		/**
		*   setAccolades / getAccolades
		*
		*   Sets / Returns the users accolades
		*/
		setAccolades: function(s) { this.accolades = s; },
		getAccolades: function() { return this.accolades; },
		
		/**
		*   setFans / getFans
		*
		*   Sets / Returns the users fans
		*/
		setFans: function(s) { this.fans = s; },
		getFans: function() { return this.fans; }
	}
);

/**
*   Class : CreditChargeData
*
*   Class holds all data necessary to esatblish a credit charge
*
*   @usage    Used by credit control
*   @author   Daniel Ivanovic dan@substance001.com
*/
var CreditChargeData = AbstractObject.extend(
	{
		/**
		*   init
		*
		*   Constructs the credit charge object
		*/
		init: function()
		{
			this._super( "CreditChargeData" );
			
			this.chargeId = 0;
			this.name = "";
			this.code = "";
			this.charge = 0;
			this.reqData = null;
		},
		
		/**
		*   setChargeId / getChargeId
		*
		*   Sets / Returns the charge id
		*/
		setChargeId: function(s) { this.chargeId = s; },
		getChargeId: function() { return this.chargeId; },
		
		/**
		*   setName / getName
		*
		*   Sets / Returns the charge name
		*/
		setName: function(s) { this.name = s; },
		getName: function() { return this.name; },
		
		/**
		*   setCode / getCode
		*
		*   Sets / Returns the charge code
		*/
		setCode: function(s) { this.code = s; },
		getCode: function() { return this.code; },
		
		/**
		*   setCharge / getCharge
		*
		*   Sets / Returns the charge
		*/
		setCharge: function(s) { this.charge = s; },
		getCharge: function() { return this.charge; },
		
		/**
		*   setReqData / getReqData
		*
		*   Sets / Returns the request charge data
		*/
		setReqData: function(s) { this.reqData = s; },
		getReqData: function() { return this.reqData; }
	}
);

/**
*   Class : RequestData
*
*   Class holds all data necessary to esatblish a new request
*
*   @usage    Used by requests control control
*   @author   Daniel Ivanovic dan@substance001.com
*/
var RequestData = AbstractObject.extend(
	{
		/**
		*   init
		*
		*   Constructs the credit charge object
		*/
		init: function()
		{
			this._super( "RequestData" );
			
			this.requestId = 0;
			this.requestType = 0;
			this.requestAuthor = null;
		},
		
		/**
		*   setRequestId / getRequestId
		*
		*   Sets / Returns the request id
		*/
		setRequestId: function(s) { this.requestId = s; },
		getRequestId: function() { return this.requestId; },
		
		/**
		*   setRequestType / getRequestType
		*
		*   Sets / Returns the request type 
		*/
		setRequestType: function(s) { this.requestType = s; },
		getRequestType: function() { return this.requestType; },
		
		/**
		*   setRequestAuthor / getRequestAuthor
		*
		*   Sets / Returns the requests author user data
		*/
		setRequestAuthor: function(s) { this.requestAuthor = s; },
		getRequestAuthor: function() { return this.requestAuthor; }
	}
);

/**
*   Class : PlacementData
*
*   Class holds all data necessary to esatblish an ad placement
*
*   @usage    Used by all elements
*   @author   Daniel Ivanovic dan@substance001.com
*/
var PlacementData = AbstractObject.extend(
	{
		/**
		*   init
		*
		*   Constructs the data object
		*/
		init: function()
		{
			this._super( "PlacementData" );
			
			this.placementId = 0;
			this.width = 0;
			this.height = 0;
			this.directory = "";
		},
		
		/**
		*   setPlacementId / getPlacementId
		*
		*   Sets / Returns the placement id
		*/
		setPlacementId: function(s) { this.placementId = s; },
		getPlacementId: function() { return this.placementId; },
		
		/**
		*   setWidth / getWidth
		*
		*   Sets / Returns the placement width
		*/
		setWidth: function(s) { this.width = s; },
		getWidth: function() { return this.width; },
		
		/**
		*   setHeight / getHeight
		*
		*   Sets / Returns the placement height
		*/
		setHeight: function(s) { this.height = s; },
		getHeight: function() { return this.height; },
		
		/**
		*   setDirectory / getDirectory
		*
		*   Sets / Returns the placement directory
		*/
		setDirectory: function(s) { this.directory = s; },
		getDirectory: function() { return this.directory; }
	}
);

/**
*   Class : LeagueTableData
*
*   Class holds all data necessary to esatblish a league table element
*
*   @usage    Used by all forum elements
*   @author   Daniel Ivanovic dan@substance001.com
*
*	@param	name - element name
*	@param	action - element action
*/
var LeagueTableData = AbstractObject.extend(
	{
		/**
		*   init
		*
		*   Constructs the button dat6a object
		*/
		init: function()
		{
			this._super( "LeagueTableData" );
			
			this.users = new Array();
		},
		
		/**
		*   setUsers / getUsers
		*
		*   Sets / Returns the users array
		*/
		setUsers: function(s) { this.users = s; },
		getUsers: function() { return this.users; }
	}
);

/**
*   Class : PhotosData
*
*   Class holds all data necessary to esatblish a photo collection
*
*   @usage    Used by application model
*   @author   Daniel Ivanovic dan@substance001.com
*/
var PhotosData = AbstractObject.extend(
	{
		/**
		*   init
		*
		*   Constructs the data object
		*/
		init: function()
		{
			this._super( "PhotosData" );
			
			this.photos = new Array();
		},
		
		/**
		*   setPhotos / getPhotos
		*
		*   Sets / Returns the photos array
		*/
		setPhotos: function(s) { this.photos = s; },
		getPhotos: function() { return this.photos; }
	}
);

/**
*   Class : PhotoData
*
*   Class holds all data necessary to esatblish a photo element
*
*   @usage    Used by application model
*   @author   Daniel Ivanovic dan@substance001.com
*/
var PhotoData = AbstractObject.extend(
	{
		/**
		*   init
		*
		*   Constructs the data object
		*/
		init: function()
		{
			this._super( "PhotoData" );
			
			this.photoId = 0;
			this.file = "";
		},
		
		/**
		*   setPhotoId / getPhotoId
		*
		*   Sets / Returns the photo id
		*/
		setPhotoId: function(s) { this.photoId = s; },
		getPhotoId: function() { return this.photoId; },
		
		/**
		*   setFile / getFile
		*
		*   Sets / Returns the photo file
		*/
		setFile: function(s) { this.file = s; },
		getFile: function() { return this.file; }
	}
);

/**
*   Class : PrivatePhotosData
*
*   Class holds all data necessary to esatblish a private photo collection
*
*   @usage    Used by application model
*   @author   Daniel Ivanovic dan@substance001.com
*/
var PrivatePhotosData = AbstractObject.extend(
	{
		/**
		*   init
		*
		*   Constructs the data object
		*/
		init: function()
		{
			this._super( "PrivatePhotosData" );
			
			this.photos = new Array();
		},
		
		/**
		*   setPhotos / getPhotos
		*
		*   Sets / Returns the photos array
		*/
		setPhotos: function(s) { this.photos = s; },
		getPhotos: function() { return this.photos; }
	}
);

/**
*   Class : PrivatePhotoData
*
*   Class holds all data necessary to esatblish a private photo element
*
*   @usage    Used by application model
*   @author   Daniel Ivanovic dan@substance001.com
*/
var PrivatePhotoData = AbstractObject.extend(
	{
		/**
		*   init
		*
		*   Constructs the data object
		*/
		init: function()
		{
			this._super( "PrivatePhotoData" );
			
			this.photoId = 0;
			this.file = "";
			this.label = "";
		},
		
		/**
		*   setPhotoId / getPhotoId
		*
		*   Sets / Returns the photo id
		*/
		setPhotoId: function(s) { this.photoId = s; },
		getPhotoId: function() { return this.photoId; },
		
		/**
		*   setFile / getFile
		*
		*   Sets / Returns the photo file
		*/
		setFile: function(s) { this.file = s; },
		getFile: function() { return this.file; },
		
		/**
		*   setLabel / getLabel
		*
		*   Sets / Returns the photo label
		*/
		setLabel: function(s) { this.label = s; },
		getLabel: function() { return this.label; }
	}
);

/**
*   Class : PhotoCommentsData
*
*   Class holds all data necessary to esatblish a photo comments element
*
*   @usage    Used by all comments elements
*   @author   Daniel Ivanovic dan@substance001.com
*
*	@param	name - element name
*	@param	action - element action
*/
var PhotoCommentsData = AbstractObject.extend(
	{
		/**
		*   init
		*
		*   Constructs the data object
		*/
		init: function()
		{
			this._super( "PhotoCommentsData" );
			
			// comments active
			this.commentsActive = false;
			// comments id
			this.commentsId = 0;
			// comments type
			this.commentsType = '';
			// owner id
			this.commentsOwner = 0;
			// photo id
			this.commentsPhoto = 0;
			// comments posts
			this.commentsPosts = [];
		},
		
		/**
		*   setCommentsActive / getCommentsActive
		*
		*   Sets / Returns the comments active boolean
		*/
		setCommentsActive: function(s) { this.commentsActive = s; },
		getCommentsActive: function() { return this.commentsActive; },
		
		/**
		*   setCommentsId / getCommentsId
		*
		*   Sets / Returns the comments id
		*/
		setCommentsId: function(s) { this.commentsId = s; },
		getCommentsId: function() { return this.commentsId; },
		
		/**
		*   setCommentsType / getCommentsType
		*
		*   Sets / Returns the comments type
		*/
		setCommentsType: function(s) { this.commentsType = s; },
		getCommentsType: function() { return this.commentsType; },
		
		/**
		*   setCommentsOwner / getCommentsOwner
		*
		*   Sets / Returns the comments owner's user id
		*/
		setCommentsOwner: function(s) { this.commentsOwner = s; },
		getCommentsOwner: function() { return this.commentsOwner; },
		
		/**
		*   setCommentsPhoto / getCommentsPhoto
		*
		*   Sets / Returns the comments photo id
		*/
		setCommentsPhoto: function(s) { this.commentsPhoto = s; },
		getCommentsPhoto: function() { return this.commentsPhoto; },
		
		/**
		*   setCommentsPosts / getCommentsPosts
		*
		*   Sets / Returns the comments posts array
		*/
		setCommentsPosts: function(s) { this.commentsPosts = s; },
		getCommentsPosts: function() { return this.commentsPosts; }
	}
);

/**
*   Class : PhotoCommentData
*
*   Class holds all data necessary to esatblish a photo comment element
*
*   @usage    Used by all comment box elements
*   @author   Daniel Ivanovic dan@substance001.com
*/
var PhotoCommentData = AbstractObject.extend(
	{
		/**
		*   init
		*
		*   Constructs the data object
		*/
		init: function()
		{
			this._super( "PhotoCommentData" );
			
			// comment id
			this.commentId = 0;
			// comment
			this.comment = '';
			// date
			this.date = '';
			// author
			this.author = 0;
			// author name
			this.authorName = '';
			// author profile
			this.authorProfile = null;
		},
		
		/**
		*   setCommentId / getCommentId
		*
		*   Sets / Returns the post id
		*/
		setCommentId: function(s) { this.commentId = s; },
		getCommentId: function() { return this.commentId; },
		
		/**
		*   setComment / getComment
		*
		*   Sets / Returns the post string
		*/
		setComment: function(s) { this.comment = s; },
		getComment: function() { return this.comment; },
		
		/**
		*   setCommentDate / getCommentDate
		*
		*   Sets / Returns the post date
		*/
		setCommentDate: function(s) { this.date = s; },
		getCommentDate: function() { return this.date; },
		
		/**
		*   setCommentAuthor / getCommentAuthor 
		*
		*   Sets / Returns the post author
		*/
		setCommentAuthor: function(s) { this.author = s; },
		getCommentAuthor: function() { return this.author; },
		
		/**
		*   setCommentAuthorName / getCommentAuthorNmae 
		*
		*   Sets / Returns the post author name
		*/
		setCommentAuthorName: function(s) { this.authorName = s; },
		getCommentAuthorName: function() { return this.authorName; },
		
		/**
		*   setCommentAuthorProfile / getCommentAuthorProfile 
		*
		*   Sets / Returns the comment author profile data object
		*/
		setCommentAuthorProfile: function(s) { this.authorProfile = s; },
		getCommentAuthorProfile: function() { return this.authorProfile; }
	}
);

/**
*   Class : ForumData
*
*   Class holds all data necessary to esatblish a forum element
*
*   @usage    Used by all forum elements
*   @author   Daniel Ivanovic dan@substance001.com
*
*	@param	name - element name
*	@param	action - element action
*/
var ForumData = AbstractObject.extend(
	{
		/**
		*   init
		*
		*   Constructs the data object
		*/
		init: function()
		{
			this._super( "ForumData" );
			
			// forum active
			this.forumActive = false;
			// forum id
			this.forumId = 0;
			// forum type
			this.forumType = '';
			// owner id
			this.forumOwner = 0;
			// forum posts
			this.forumPosts = [];
		},
		
		/**
		*   setForumActive / getForumActive
		*
		*   Sets / Returns the forum active boolean
		*/
		setForumActive: function(s) { this.forumActive = s; },
		getForumActive: function() { return this.forumActive; },
		
		/**
		*   setForumId / getForumId
		*
		*   Sets / Returns the forum id
		*/
		setForumId: function(s) { this.forumId = s; },
		getForumId: function() { return this.forumId; },
		
		/**
		*   setForumType / getForumType
		*
		*   Sets / Returns the forum type
		*/
		setForumType: function(s) { this.forumType = s; },
		getForumType: function() { return this.forumType; },
		
		/**
		*   setForumOwner / getForumOwner
		*
		*   Sets / Returns the forum owner's user id
		*/
		setForumOwner: function(s) { this.forumOwner = s; },
		getForumOwner: function() { return this.forumOwner; },
		
		/**
		*   setForumPosts / getForumPosts
		*
		*   Sets / Returns the forum posts array
		*/
		setForumPosts: function(s) { this.forumPosts = s; },
		getForumPosts: function() { return this.forumPosts; },
		
		/**
		*   setForumActive / getForumActive
		*
		*   Sets / Returns the forum active boolean
		*/
		setForumActive: function(s) { this.forumActive = s; },
		getForumActive: function() { return this.forumActive; },
		
		/**
		*   setForumId / getForumId
		*
		*   Sets / Returns the forum id
		*/
		setForumId: function(s) { this.forumId = s; },
		getForumId: function() { return this.forumId; },
		
		/**
		*   setForumType / getForumType
		*
		*   Sets / Returns the forum type
		*/
		setForumType: function(s) { this.forumType = s; },
		getForumType: function() { return this.forumType; },
		
		/**
		*   setForumOwner / getForumOwner
		*
		*   Sets / Returns the forum owner's user id
		*/
		setForumOwner: function(s) { this.forumOwner = s; },
		getForumOwner: function() { return this.forumOwner; },
		
		/**
		*   setForumPosts / getForumPosts
		*
		*   Sets / Returns the forum posts array
		*/
		setForumPosts: function(s) { this.forumPosts = s; },
		getForumPosts: function() { return this.forumPosts; }
	}
);

/**
*   Class : ForumPostData
*
*   Class holds all data necessary to esatblish a forum post element
*
*   @usage    Used by all forum elements
*   @author   Daniel Ivanovic dan@substance001.com
*/
var ForumPostData = AbstractObject.extend(
	{
		/**
		*   init
		*
		*   Constructs the data object
		*/
		init: function()
		{
			this._super( "ForumPostData" );
			
			// post id
			this.postId = 0;
			// post
			this.post = '';
			// date
			this.date = '';
			// author
			this.author = 0;
			// author name
			this.authorName = '';
			// author profile
			this.authorProfile = null;
			
		},
		
		/**
		*   setPostId / getPostId
		*
		*   Sets / Returns the post id
		*/
		setPostId: function(s) { this.postId = s; },
		getPostId: function() { return this.postId; },
		
		/**
		*   setPost / getPost
		*
		*   Sets / Returns the post string
		*/
		setPost: function(s) { this.post = s; },
		getPost: function() { return this.post; },
		
		/**
		*   setDate / getDate
		*
		*   Sets / Returns the post date
		*/
		setPostDate: function(s) { this.date = s; },
		getPostDate: function() { return this.date; },
		
		/**
		*   setAuthor / getAuthor 
		*
		*   Sets / Returns the post author
		*/
		setPostAuthor: function(s) { this.author = s; },
		getPostAuthor: function() { return this.author; },
		
		/**
		*   setAuthorName / getAuthorNmae 
		*
		*   Sets / Returns the post author name
		*/
		setPostAuthorName: function(s) { this.authorName = s; },
		getPostAuthorName: function() { return this.authorName; },
		
		/**
		*   setPostAuthorProfile / getPostAuthorProfile 
		*
		*   Sets / Returns the post author profile data object
		*/
		setPostAuthorProfile: function(s) { this.authorProfile = s; },
		getPostAuthorProfile: function() { return this.authorProfile; }
	}
);

/**
*	ImageWizardData
*/
var ImageWizardData = AbstractObject.extend(
	{
		/**
		*   init
		*
		*   Constructs the image wizard data object
		*/
		init: function()
		{
			this._super( "ImageWizardData" );
			
			// define props
			this.wizardId = "";
			this.crops = new Array();
			this.resizes = new Array();
			this.upload = null;
			this.crop = null;
			this.resize = null;
			this.directory = null;
			this.uploadfolder = null;
			this.uploadscript = null;
			this.returnscript = null;
			this.types = null;
			this.uploadsMax = 25;
			this.fileSizeMax = 350000;
			this.customVars = new Array();
			this.wizardXML = null;
		},
		
		/**
		*   setWizardId / getWizardId
		*
		*   Sets / Returns the button id
		*/
		setWizardId: function(s) { this.wizardId = s; },
		getWizardId: function() { return this.wizardId; },
		
		/**
		*   setWizardCrops / getWizardCrops
		*
		*   Sets / Returns the crops array
		*/
		setWizardCrops: function(s) { this.crops = s; },
		getWizardCrops: function() { return this.crops; },
		
		/**
		*   setWizardResizes / getWizardResizes
		*
		*   Sets / Returns the resizes array
		*/
		setWizardResizes: function(s) { this.resizes = s; },
		getWizardResizes: function() { return this.resizes; },
		
		/**
		*   setWizardUpload / getWizardUpload
		*
		*   Sets / Returns the upload boolean
		*/
		setWizardUpload: function(s) { this.upload = s; },
		getWizardUpload: function() { return this.upload; },
		
		/**
		*   setUploadsMax / getUploadsMax
		*
		*   Sets / Returns the upload max value
		*/
		setWizardUploadsMax: function(f) { this.uploadsMax = f; },
		getWizardUploadsMax: function() { return this.uploadsMax; },
		
		/**
		*   setFileSizeMax / getFileSizeMax
		*
		*   Sets / Returns the upload max value
		*/
		setWizardFileSizeMax: function(f) { this.fileSizeMax = f; },
		getWizardFileSizeMax: function() { return this.fileSizeMax; },
		
		/**
		*   setWizardCrop / getWizardCrop
		*
		*   Sets / Returns the crop boolean
		*/
		setWizardCrop: function(s) { this.crop = s; },
		getWizardCrop: function() { return this.crop; },
		
		/**
		*   setWizardResize / getWizardResize
		*
		*   Sets / Returns the resize boolean
		*/
		setWizardResize: function(s) { this.resize = s; },
		getWizardResize: function() { return this.resize; },
		
		/**
		*   setWizardDirectory / getWizardDirectory
		*
		*   Sets / Returns the wizard directory string
		*/
		setWizardDirectory: function(s) { this.directory = s; },
		getWizardDirectory: function() { return this.directory; },
		
		/**
		*   setWizardUploadFolder / getWizardUploadFolder
		*
		*   Sets / Returns the upload folder
		*/
		setWizardUploadFolder: function(f) { this.uploadfolder = f; },
		getWizardUploadFolder: function() { return this.uploadfolder; },
		
		/**
		*   setWizardUploadScript / getWizardUploadScript
		*
		*   Sets / Returns the upload script
		*/
		setWizardUploadScript: function(f) { this.uploadscript = f; },
		getWizardUploadScript: function() { return this.uploadscript; },
		
		/**
		*   setWizardReturnScript / getWizardReturnScript
		*
		*   Sets / Returns the return script
		*/
		setWizardReturnScript: function(f) { this.returnscript = f; },
		getWizardReturnScript: function() { return this.returnscript; },
		
		/**
		*   setWizardTypes / getWizardTypes
		*
		*   Sets / Returns the file types
		*/
		setWizardTypes: function(f) { this.types = f; },
		getWizardTypes: function() { return this.types; },
		
		/**
		*   setCustomVars / getCustomVars
		*
		*   Sets / Returns the custom vars
		*/
		setCustomVars: function(f) { this.customVars = f; },
		getCustomVars: function() { return this.customVars; },
		
		/**
		*   setWizardXML / getWizardXML
		*
		*   Sets / Returns the wizard xml file path
		*/
		setWizardXML: function(f) { this.wizardXML = f; },
		getWizardXML: function() { return this.wizardXML; }
	}
);

/**
*   Class : ErrorData
*
*   Class holds all data necessary to esatblish an error
*
*   @usage    Used by all elements
*   @author   Daniel Ivanovic dan@substance001.com
*/
var ErrorData = AbstractObject.extend(
	{
		/**
		*   init
		*
		*   Constructs the data object
		*/
		init: function()
		{
			this._super( "ErrorData" );
			
			// define props
			this.errorType = "";
			this.errorData = null;
		},
		
		/**
		*   setErrorType / getErrorType
		*
		*   Sets / Returns the error type
		*/
		setErrorType: function(s) { this.errorType = s; },
		getErrorType: function() { return this.errorType; },
		
		/**
		*   setErrorData / getErrorData
		*
		*   Sets / Returns the error data
		*/
		setErrorData: function(s) { this.errorData = s; },
		getErrorData: function() { return this.errorData; }
	}
);

/**
*   Class : ScreenData
*
*   Class holds all data necessary to esatblish a screen element
*
*   @usage    Used by all screens
*   @author   Daniel Ivanovic dan@substance001.com
*/
var ScreenData = AbstractObject.extend(
	{
		/**
		*   init
		*
		*   Constructs the data object
		*/
		init: function()
		{
			this._super( "ScreenData" );
		}
	}
);

/**
*   Class : CastingData
*
*   Class holds all data necessary to esatblish a new casting
*
*   @usage    Used by credit control
*   @author   Daniel Ivanovic dan@substance001.com
*/
var CastingData = AbstractObject.extend(
	{
		/**
		*   init
		*
		*   Constructs the product object
		*/
		init: function()
		{
			this._super( "CastingData" );
			
			this.castingId = 0;
			this.title = "";
			this.image = 0;
			this.imageId = 0;
			this.shortDescription = "";
			this.longDescription = "";
			this.postcode = "";
			this.latitude = "";
			this.longitude = "";
			this.location = "";
			this.startDate = "";
			this.endDate = "";
			this.categories = new Array();
			this.author = null;
		},
		
		/**
		*   setCastingId / getCastingId
		*
		*   Sets / Returns the casting id
		*/
		setCastingId: function(s) { this.castingId = s; },
		getCastingId: function() { return this.castingId; },
		
		/**
		*   setTitle / getTitle
		*
		*   Sets / Returns the casting title
		*/
		setTitle: function(s) { this.title = s; },
		getTitle: function() { return this.title; },
		
		/**
		*   setImage / getImage
		*
		*   Sets / Returns the casting image file
		*/
		setImage: function(s) { this.image = s; },
		getImage: function() { return this.image; },
		
		/**
		*   setImageId / getImageId
		*
		*   Sets / Returns the casting image id
		*/
		setImageId: function(s) { this.imageId = s; },
		getImageId: function() { return this.imageId; },
		
		/**
		*   setShortDescription / getShortDescription
		*
		*   Sets / Returns the casting short description
		*/
		setShortDescription: function(s) { this.shortDescription = s; },
		getShortDescription: function() { return this.shortDescription; },
		
		/**
		*   setLongDescription / getLongDescription
		*
		*   Sets / Returns the casting long description
		*/
		setLongDescription: function(s) { this.longDescription = s; },
		getLongDescription: function() { return this.longDescription; },
		
		/**
		*   setPostcode / getPostcode
		*
		*   Sets / Returns the casting postal code
		*/
		setPostcode: function(s) { this.postcode = s; },
		getPostcode: function() { return this.postcode; },
		
		/**
		*   setLatitude / getLatitude
		*
		*   Sets / Returns the casting latitude
		*/
		setLatitude: function(s) { this.latitude = s; },
		getLatitude: function() { return this.latitude; },
		
		/**
		*   setLongitude / getLongitude
		*
		*   Sets / Returns the casting longitude
		*/
		setLongitude: function(s) { this.longitude = s; },
		getLongitude: function() { return this.longitude; },
		
		/**
		*   setLocation / getLocation
		*
		*   Sets / Returns the casting location
		*/
		setLocation: function(s) { this.location = s; },
		getLocation: function() { return this.location; },
		
		/**
		*   setStartDate / getStartDate
		*
		*   Sets / Returns the casting start date
		*/
		setStartDate: function(s) { this.startDate = s; },
		getStartDate: function() { return this.startDate; },
		
		/**
		*   setEndDate / getEndDate
		*
		*   Sets / Returns the casting end date
		*/
		setEndDate: function(s) { this.endDate = s; },
		getEndDate: function() { return this.endDate; },
		
		/**
		*   setCategories / getCategories
		*
		*   Sets / Returns the categories array
		*/
		setCategories: function(s) { this.categories = s; },
		getCategories: function() { return this.categories; },
		
		/**
		*   setAuthor / getAuthor
		*
		*   Sets / Returns the castings author user data
		*/
		setAuthor: function(s) { this.author = s; },
		getAuthor: function() { return this.author; },
		
		/**
		*   addCategory
		*
		*   Adds a category to the categories array
		*
		*	@param	v - category value
		*/
		addCategory: function(v) 
		{ 
			this.categories.push( v ); 
		}
	}
);

/**
*   Class : CreditTopupData
*
*   Class holds all data necessary to esatblish a credit top up
*
*   @usage    Used by credit control
*   @author   Daniel Ivanovic dan@substance001.com
*/
var CreditTopupData = AbstractObject.extend(
	{
		/**
		*   init
		*
		*   Constructs the credit topup object
		*/
		init: function()
		{
			this._super( "CreditTopupData" );
			
			this.topupId = 0;
			this.credits = 0;
			this.addOn = 0;
		},
		
		/**
		*   setTopupId / getTopupId
		*
		*   Sets / Returns the top up id
		*/
		setTopupId: function(s) { this.topupId = s; },
		getTopupId: function() { return this.topupId; },
		
		/**
		*   setCredits / getCredits
		*
		*   Sets / Returns the amount of credits awarded
		*/
		setCredits: function(s) { this.credits = s; },
		getCredits: function() { return this.credits; },
		
		/**
		*   setAddOn / getAddOn
		*
		*   Sets / Returns the add on amount
		*/
		setAddOn: function(s) { this.addOn = s; },
		getAddOn: function() { return this.addOn; }
	}
);

/**
*   Class : ProductData
*
*   Class holds all data necessary to esatblish a new product
*
*   @usage    Used by credit control
*   @author   Daniel Ivanovic dan@substance001.com
*/
var ProductData = AbstractObject.extend(
	{
		/**
		*   init
		*
		*   Constructs the product object
		*/
		init: function()
		{
			this._super( "ProductData" );
			
			this.productId = 0;
			this.productType = "";
			this.productName = "";
			this.productCode = "";
			this.productPrice = 0;
			this.productTypeData = null;
			this.productAddOns = new Array();
		},
		
		/**
		*   setProductId / getProductId
		*
		*   Sets / Returns the product id
		*/
		setProductId: function(s) { this.productId = s; },
		getProductId: function() { return this.productId; },
		
		/**
		*   setProductType / getProductType
		*
		*   Sets / Returns the product type
		*/
		setProductType: function(s) { this.productType = s; },
		getProductType: function() { return this.productType; },
		
		/**
		*   setProductName / getProductName
		*
		*   Sets / Returns the product name
		*/
		setProductName: function(s) { this.productName = s; },
		getProductName: function() { return this.productName; },
		
		/**
		*   setProductPrice / getProductPrice
		*
		*   Sets / Returns the product price
		*/
		setProductPrice: function(s) { this.productPrice = s; },
		getProductPrice: function() { return this.productPrice; },
		
		/**
		*   setProductTypeData / getProductTypeData
		*
		*   Sets / Returns the product type data object
		*/
		setProductTypeData: function(s) { this.productTypeData = s; },
		getProductTypeData: function() { return this.productTypeData; },
		
		/**
		*   setProductAddOns / getProductAddOns
		*
		*   Sets / Returns the product add ons array
		*/
		setProductAddOns: function(s) { this.productAddOns = s; },
		getProductAddOns: function() { return this.productAddOns; },
		
		/**
		*   addProductAddOn
		*
		*   Adds a product add-on to the add ons array
		*
		*	@param	s - product add on title
		*	@param	v - product add on value
		*/
		addProductAddOn: function(s, v) 
		{ 
			this.productAddOns.push( { title: s, value: v } ); 
		}
	}
);

/**
*   Class : PaymentData
*
*   Class holds all data necessary to esatblish a new payment
*
*   @usage    Used by credit control
*   @author   Daniel Ivanovic dan@substance001.com
*/
var PaymentData = AbstractObject.extend(
	{
		/**
		*   init
		*
		*   Constructs the credit charge object
		*/
		init: function()
		{
			this._super( "PaymentData" );
			
			this.paymentId = 0;
			this.productData = null;
			this.customerName = "";
			this.cardNumber = "";
			this.cardStart = "";
			this.cardEnd = "";
			this.cardIssue = "";
			this.cardCVV = "";
			this.customerAddress = "";
			this.customerPostCode = "";
			this.customerCountry = "";
			this.customerIP = "";
			this.customerEmail = "";
			this.customerTel = "";
			this.transactionRef = "";
			this.transactionDescription = "";
			this.transactionAmount = "";
			this.transactionCurrency = "";
			this.transactionTestMode = "";
			this.transactionType = "";
			this.transactionClass = "";
			this.transactionOriginId = "";
		},
		
		/**
		*   setPaymentId / getPaymentId
		*
		*   Sets / Returns the payment id
		*/
		setPaymentId: function(s) { this.paymentId = s; },
		getPaymentId: function() { return this.paymentId; },
		
		/**
		*   setProductData / getProductData
		*
		*   Sets / Returns the assosciated product data
		*/
		setProductData: function(s) { this.productData = s; },
		getProductData: function() { return this.productData; },
		
		/**
		*   setCustomerName / getCustomerName
		*
		*   Sets / Returns the assosciated customer name
		*/
		setCustomerName: function(s) { this.customerName = s; },
		getCustomerName: function() { return this.customerName; },
		
		/**
		*   setCardNumber / getCardNumber
		*
		*   Sets / Returns the assosciated card number
		*/
		setCardNumber: function(s) { this.cardNumber = s; },
		getCardNumber: function() { return this.cardNumber; },
		
		/**
		*   setCardStart / getCardStart
		*
		*   Sets / Returns the assosciated card start date
		*/
		setCardStart: function(s) { this.cardStart = s; },
		getCardStart: function() { return this.cardStart; },
		
		/**
		*   setCardEnd / getCardEnd
		*
		*   Sets / Returns the assosciated card expiry date
		*/
		setCardEnd: function(s) { this.cardEnd = s; },
		getCardEnd: function() { return this.cardEnd; },
		
		/**
		*   setCardIssue / getCardIssue
		*
		*   Sets / Returns the assosciated card issue date
		*/
		setCardIssue: function(s) { this.cardIssue = s; },
		getCardIssue: function() { return this.cardIssue; },
		
		/**
		*   setCardCVV / getCardCVV
		*
		*   Sets / Returns the assosciated card CVV security number
		*/
		setCardCVV: function(s) { this.cardCVV = s; },
		getCardCVV: function() { return this.cardCVV; },
		
		/**
		*   setCustomerAddress / getCustomerAddress
		*
		*   Sets / Returns the assosciated customer address
		*/
		setCustomerAddress: function(s) { this.customerAddress = s; },
		getCustomerAddress: function() { return this.customerAddress; },
		
		/**
		*   setCustomerPostCode / getCustomerPostCode
		*
		*   Sets / Returns the assosciated customer post code
		*/
		setCustomerPostCode: function(s) { this.customerPostCode = s; },
		getCustomerPostCode: function() { return this.customerPostCode; },
		
		/**
		*   setCustomerCountry / getCustomerCountry
		*
		*   Sets / Returns the assosciated customer country code
		*/
		setCustomerCountry: function(s) { this.customerCountry = s; },
		getCustomerCountry: function() { return this.customerCountry; },
		
		/**
		*   setCustomerIP / getCustomerIP
		*
		*   Sets / Returns the assosciated customer IP address
		*/
		setCustomerIP: function(s) { this.customerIP = s; },
		getCustomerIP: function() { return this.customerIP; },
		
		/**
		*   setCustomerEmail / getCustomerEmail
		*
		*   Sets / Returns the assosciated customer email
		*/
		setCustomerEmail: function(s) { this.customerEmail = s; },
		getCustomerEmail: function() { return this.customerEmail; },
		
		/**
		*   setCustomerTel / getCustomerTel
		*
		*   Sets / Returns the assosciated customer telephone number
		*/
		setCustomerTel: function(s) { this.customerTel = s; },
		getCustomerTel: function() { return this.customerTel; },
		
		/**
		*   setTransactionRef / getTransactionRef
		*
		*   Sets / Returns the assosciated transaction reference
		*/
		setTransactionRef: function(s) { this.transactionRef = s; },
		getTransactionRef: function() { return this.transactionRef; },
		
		/**
		*   setTransactionDescription / getTransactionDescription
		*
		*   Sets / Returns the assosciated transaction description
		*/
		setTransactionDescription: function(s) { this.transactionDescription = s; },
		getTransactionDescription: function() { return this.transactionDescription; },
		
		/**
		*   setTransactionAmount / getTransactionAmount
		*
		*   Sets / Returns the assosciated transaction amount
		*/
		setTransactionAmount: function(s) { this.transactionAmount = s; },
		getTransactionAmount: function() { return this.transactionAmount; },
		
		/**
		*   setTransactionCurrency / getTransactionCurrency
		*
		*   Sets / Returns the assosciated transaction currency
		*/
		setTransactionCurrency: function(s) { this.transactionCurrency = s; },
		getTransactionCurrency: function() { return this.transactionCurrency; },
		
		/**
		*   setTransactionTestMode / getTransactionTestMode
		*
		*   Sets / Returns the assosciated transaction test mode
		*/
		setTransactionTestMode: function(s) { this.transactionTestMode = s; },
		getTransactionTestMode: function() { return this.transactionTestMode; },
		
		/**
		*   setTransactionType / getTransactionType
		*
		*   Sets / Returns the assosciated transaction type
		*/
		setTransactionType: function(s) { this.transactionType = s; },
		getTransactionType: function() { return this.transactionType; },
		
		/**
		*   setTransactionClass / getTransactionClass
		*
		*   Sets / Returns the assosciated transaction class
		*/
		setTransactionClass: function(s) { this.transactionClass = s; },
		getTransactionClass: function() { return this.transactionClass; },
		
		/**
		*   setTransactionOriginId / setTransactionOriginId
		*
		*   Sets / Returns the assosciated transaction origin id
		*/
		setTransactionOriginId: function(s) { this.transactionOriginId = s; },
		getTransactionOriginId: function() { return this.transactionOriginId; }
	}
);