
        var ezpSecurity = Class.create();
		ezpSecurity.prototype = {
		initialize: function() {
		this.baseUrl = "/API/";
		this.remotingPage = "ezp.security.rem";
		this.strApi=this.baseUrl + this.remotingPage;
		this.output="json";
		this.binaryProxy="SendMessageForBinary.aspx";
		}
		
		,
		
		/*********
		
    Gets a user, if they exist and if not, creates them and logs you in.
    
		@BrandId : This is the EZPrints assigned brand id.  See your EZPrints representative to determine your brand id
		@UserName : User login.
		@Password : Clear text password typed in by the user

		returns : string Token - This string is used in all subsequent calls to the system to identify the user session.

		*********/
	getUser: function(BrandId,UserName,Password,cb)
		{
			
			EZP.Api.Presentation.Web.Ajax.Security.getUser(BrandId,UserName,Password,cb.success,cb.failure,cb.scope);
		}
		,
		// Form-based short-cut for the above function.
		getUserForm:function ( cb )
		{
			this.getUser(V('BrandId','String'),V('UserName','String'),V('Password','String'),cb);
		}
	
		,
		
		/*********
		
    login is used to establish a user session with the system.  
    
		@BrandId : This is the EZPrints assigned brand id.  See your EZPrints representative to determine your brand id
		@UserName : User login.
		@Password : Clear text password typed in by the user

		returns : string Token - This string is used in all subsequent calls to the system to identify the user session.Thrown for the following:
    Invalid UserInvalid PasswordlogOff

		*********/
	login: function(BrandId,UserName,Password,cb)
		{
			
			EZP.Api.Presentation.Web.Ajax.Security.login(BrandId,UserName,Password,cb.success,cb.failure,cb.scope);
		}
		,
		// Form-based short-cut for the above function.
		loginForm:function ( cb )
		{
			this.login(V('BrandId','String'),V('UserName','String'),V('Password','String'),cb);
		}
	
		,
		
		/*********
		
    logOff is used to end a session with the system.
    All session related data is removed from the system.
    login
		@Token : This is the token returned from login

		returns : true if the user is logged off, false if not.

		*********/
	logOff: function(Token,cb)
		{
			
			EZP.Api.Presentation.Web.Ajax.Security.logOff(Token,cb.success,cb.failure,cb.scope);
		}
		,
		// Form-based short-cut for the above function.
		logOffForm:function ( cb )
		{
			this.logOff(V('Token','String'),cb);
		}
	
		,
		
		/*********
		
    setUserPassword is used to set the user password.
    login
		@Token : This is the token returned from login
		@userPassword : This is the new user passwordlogin

		returns : true if the user login is set, false if not.

		*********/
	setUserPassword: function(Token,userPassword,cb)
		{
			
			EZP.Api.Presentation.Web.Ajax.Security.setUserPassword(Token,userPassword,cb.success,cb.failure,cb.scope);
		}
		,
		// Form-based short-cut for the above function.
		setUserPasswordForm:function ( cb )
		{
			this.setUserPassword(V('Token','String'),V('userPassword','String'),cb);
		}
	
		,
		
		/*********
		
    setUserLogin is used to change the user login.
    login
		@Token : This is the token returned from login
		@userLogin : This is the new user loginlogin

		returns : true if the user login is set, false if not.

		*********/
	setUserLogin: function(Token,userLogin,cb)
		{
			
			EZP.Api.Presentation.Web.Ajax.Security.setUserLogin(Token,userLogin,cb.success,cb.failure,cb.scope);
		}
		,
		// Form-based short-cut for the above function.
		setUserLoginForm:function ( cb )
		{
			this.setUserLogin(V('Token','String'),V('userLogin','String'),cb);
		}
	
		,
		
		/*********
		
    validPassword is used to check a potential password.
    login
		@password : This is the password 

		returns : true if the password is valid, false if not.

		*********/
	validPassword: function(password,cb)
		{
			
			EZP.Api.Presentation.Web.Ajax.Security.validPassword(password,cb.success,cb.failure,cb.scope);
		}
		,
		// Form-based short-cut for the above function.
		validPasswordForm:function ( cb )
		{
			this.validPassword(V('password','String'),cb);
		}
	
		,
		
		/*********
		
    userExists is used to verify that a particular user exists for a specific brand
    
    This call can be used to verify that a user exists before attempting other calls
    
		@BrandId : This is the EZPrints assigned brand id.  See your EZPrints representative to determine your brand id.
		@UserName : This is the user id to verify. This is not case sensitive

		returns : ReturnDescriptiontrueThe user is validfalseThe user does not exist

		*********/
	userExists: function(BrandId,UserName,cb)
		{
			
			EZP.Api.Presentation.Web.Ajax.Security.userExists(BrandId,UserName,cb.success,cb.failure,cb.scope);
		}
		,
		// Form-based short-cut for the above function.
		userExistsForm:function ( cb )
		{
			this.userExists(V('BrandId','Int32'),V('UserName','String'),cb);
		}
	
		,
		
		/*********
		
    userValid is used to verify that a particular user 
    1) exists for a specific brand
    2) matches the First name provided
    
    This call can be used to pre-certify a user before attempting to call 
		@BrandId : This is the EZPrints assigned brand id.  See your EZPrints representative to determine your brand id.
		@UserName : This is the user id to verify. This is not case sensitive
		@FirstName : This is the First Name associated with the user.  This is not case sensitive

		returns : ReturnDescriptiontrueThe user is valid and matches the first name providedfalseThe user is not valid or does not match the first name provided

		*********/
	userValid: function(BrandId,UserName,FirstName,cb)
		{
			
			EZP.Api.Presentation.Web.Ajax.Security.userValid(BrandId,UserName,FirstName,cb.success,cb.failure,cb.scope);
		}
		,
		// Form-based short-cut for the above function.
		userValidForm:function ( cb )
		{
			this.userValid(V('BrandId','Int32'),V('UserName','String'),V('FirstName','String'),cb);
		}
	
		,
		
		/*********
		
    This sets the user password to a random value and triggers an eMail to be sent to the user with the new password.
    
		@BrandId : This is the EZPrints assigned brand id.  See your EZPrints representative to determine your brand id.
		@UserName : This is the user id to verify. This is not case sensitive
		@FirstName : This is the First Name associated with the user.  This is not case sensitive

		returns : ReturnDescriptiontrueThe password has been resetfalseThe password could not be resetThe user is not valid.   Call  before calling this.

		*********/
	resetPassword: function(BrandId,UserName,FirstName,cb)
		{
			
			EZP.Api.Presentation.Web.Ajax.Security.resetPassword(BrandId,UserName,FirstName,cb.success,cb.failure,cb.scope);
		}
		,
		// Form-based short-cut for the above function.
		resetPasswordForm:function ( cb )
		{
			this.resetPassword(V('BrandId','Int32'),V('UserName','String'),V('FirstName','String'),cb);
		}
	
		}
		var ezpSecuritySdk = new ezpSecurity();



	
		var ezpRegistration = Class.create();
		ezpRegistration.prototype = {
		initialize: function() {
		this.baseUrl = "/API/";
		this.remotingPage = "ezp.registration.rem";
		this.strApi=this.baseUrl + this.remotingPage;
		this.output="json";
		this.binaryProxy="SendMessageForBinary.aspx";
		}
		
		,
		
		/*********
		
    Returns the countries for a brand
    
		@BrandId : Assigned by EZPrints

		returns : CountryList list of countries

		*********/
	getCountriesForBrand: function(BrandId,cb)
		{
			
			EZP.Api.Presentation.Web.Ajax.Registration.getCountriesForBrand(BrandId,cb.success,cb.failure,cb.scope);
		}
		,
		// Form-based short-cut for the above function.
		getCountriesForBrandForm:function ( cb )
		{
			this.getCountriesForBrand(V('BrandId','Int32'),cb);
		}
	
		,
		
		/*********
		
    Returns the contact information for a given account
    
		@Token : The token returned from the Security login method

		returns : RegistrationContact

		*********/
	getContact: function(Token,cb)
		{
			
			EZP.Api.Presentation.Web.Ajax.Registration.getContact(Token,cb.success,cb.failure,cb.scope);
		}
		,
		// Form-based short-cut for the above function.
		getContactForm:function ( cb )
		{
			this.getContact(V('Token','String'),cb);
		}
	
		,
		
		/*********
		
    Adds a user to the EZPrints system.
    
		@BrandId : 
		@UserName : 
		@Password : 
		@CustomerID : 
		@FirstName : 
		@LastName : 
		@Email : 
		@PhoneNumber : 
		@EULA : 
		@EmailConfirmed : 
		@MarketingOptIn : 
		@ShippingAddress1 : 
		@ShippingAddress2 : 
		@ShippingCity : 
		@ShippingStateProvince : 
		@ShippingPostalCode : 
		@ShippingCountry : 
		@ShippingVerified : 
		@BillingSameAsShipping : 
		@BillingAddress1 : 
		@BillingAddress2 : 
		@BillingCity : 
		@BillingStateProvince : 
		@BillingPostalCode : 
		@BillingCountry : 
		@BillingVerified : 

		returns : RegistrationContact

		*********/
	addContact: function(BrandId,UserName,Password,CustomerID,FirstName,LastName,Email,PhoneNumber,EULA,EmailConfirmed,MarketingOptIn,ShippingAddress1,ShippingAddress2,ShippingCity,ShippingStateProvince,ShippingPostalCode,ShippingCountry,ShippingVerified,BillingSameAsShipping,BillingAddress1,BillingAddress2,BillingCity,BillingStateProvince,BillingPostalCode,BillingCountry,BillingVerified,cb)
		{
			
			EZP.Api.Presentation.Web.Ajax.Registration.addContact(BrandId,UserName,Password,CustomerID,FirstName,LastName,Email,PhoneNumber,EULA,EmailConfirmed,MarketingOptIn,ShippingAddress1,ShippingAddress2,ShippingCity,ShippingStateProvince,ShippingPostalCode,ShippingCountry,ShippingVerified,BillingSameAsShipping,BillingAddress1,BillingAddress2,BillingCity,BillingStateProvince,BillingPostalCode,BillingCountry,BillingVerified,cb.success,cb.failure,cb.scope);
		}
		,
		// Form-based short-cut for the above function.
		addContactForm:function ( cb )
		{
			this.addContact(V('BrandId','Int32'),V('UserName','String'),V('Password','String'),V('CustomerID','String'),V('FirstName','String'),V('LastName','String'),V('Email','String'),V('PhoneNumber','String'),V('EULA','Boolean'),V('EmailConfirmed','Boolean'),V('MarketingOptIn','Boolean'),V('ShippingAddress1','String'),V('ShippingAddress2','String'),V('ShippingCity','String'),V('ShippingStateProvince','String'),V('ShippingPostalCode','String'),V('ShippingCountry','String'),V('ShippingVerified','Boolean'),V('BillingSameAsShipping','Boolean'),V('BillingAddress1','String'),V('BillingAddress2','String'),V('BillingCity','String'),V('BillingStateProvince','String'),V('BillingPostalCode','String'),V('BillingCountry','String'),V('BillingVerified','Boolean'),cb);
		}
	
		,
		
		/*********
		
    Updates the contact information for a given user
    
		@Token : The token returned from the Security login method
		@CustomerID : 
		@FirstName : 
		@LastName : 
		@Email : 
		@PhoneNumber : 
		@EULA : 
		@EmailConfirmed : 
		@MarketingOptIn : 
		@ShippingAddress1 : 
		@ShippingAddress2 : 
		@ShippingCity : 
		@ShippingStateProvince : 
		@ShippingPostalCode : 
		@ShippingCountry : 
		@ShippingVerified : 
		@BillingSameAsShipping : 
		@BillingAddress1 : 
		@BillingAddress2 : 
		@BillingCity : 
		@BillingStateProvince : 
		@BillingPostalCode : 
		@BillingCountry : 
		@BillingVerified : 

		returns : RegistrationContact

		*********/
	updateContact: function(Token,CustomerID,FirstName,LastName,Email,PhoneNumber,EULA,EmailConfirmed,MarketingOptIn,ShippingAddress1,ShippingAddress2,ShippingCity,ShippingStateProvince,ShippingPostalCode,ShippingCountry,ShippingVerified,BillingSameAsShipping,BillingAddress1,BillingAddress2,BillingCity,BillingStateProvince,BillingPostalCode,BillingCountry,BillingVerified,cb)
		{
			
			EZP.Api.Presentation.Web.Ajax.Registration.updateContact(Token,CustomerID,FirstName,LastName,Email,PhoneNumber,EULA,EmailConfirmed,MarketingOptIn,ShippingAddress1,ShippingAddress2,ShippingCity,ShippingStateProvince,ShippingPostalCode,ShippingCountry,ShippingVerified,BillingSameAsShipping,BillingAddress1,BillingAddress2,BillingCity,BillingStateProvince,BillingPostalCode,BillingCountry,BillingVerified,cb.success,cb.failure,cb.scope);
		}
		,
		// Form-based short-cut for the above function.
		updateContactForm:function ( cb )
		{
			this.updateContact(V('Token','String'),V('CustomerID','String'),V('FirstName','String'),V('LastName','String'),V('Email','String'),V('PhoneNumber','String'),V('EULA','Boolean'),V('EmailConfirmed','Boolean'),V('MarketingOptIn','Boolean'),V('ShippingAddress1','String'),V('ShippingAddress2','String'),V('ShippingCity','String'),V('ShippingStateProvince','String'),V('ShippingPostalCode','String'),V('ShippingCountry','String'),V('ShippingVerified','Boolean'),V('BillingSameAsShipping','Boolean'),V('BillingAddress1','String'),V('BillingAddress2','String'),V('BillingCity','String'),V('BillingStateProvince','String'),V('BillingPostalCode','String'),V('BillingCountry','String'),V('BillingVerified','Boolean'),cb);
		}
	
		}
		var ezpRegistrationSdk = new ezpRegistration();



	
		var ezpJcm = Class.create();
		ezpJcm.prototype = {
		initialize: function() {
		this.baseUrl = "/API/";
		this.remotingPage = "ezp.jcm.rem";
		this.strApi=this.baseUrl + this.remotingPage;
		this.output="json";
		this.binaryProxy="SendMessageForBinary.aspx";
		}
		
		,
		
		/*********
		
    This returns a collection of PhotoPasses for a given account
    
		@Token : The token returned from the Security login method

		returns : A collection of PhotoPasses

		*********/
	photoPassGet: function(Token,cb)
		{
			
			EZP.Api.Presentation.Web.Ajax.JCM.photoPassGet(Token,cb.success,cb.failure,cb.scope);
		}
		,
		// Form-based short-cut for the above function.
		photoPassGetForm:function ( cb )
		{
			this.photoPassGet(V('Token','String'),cb);
		}
	
		,
		
		/*********
		
    This removes all photopasses for an account
    
		@Token : The security token of the account

		returns : true the photopass can be assigned, false it cannot

		*********/
	removeAccountImages: function(Token,cb)
		{
			
			EZP.Api.Presentation.Web.Ajax.JCM.removeAccountImages(Token,cb.success,cb.failure,cb.scope);
		}
		,
		// Form-based short-cut for the above function.
		removeAccountImagesForm:function ( cb )
		{
			this.removeAccountImages(V('Token','String'),cb);
		}
	
		,
		
		/*********
		
    This removes a photopass from its account
    
		@PhotoPass : The photo pass to be removed

		returns : true the photopass can be assigned, false it cannot

		*********/
	removePhotoPass: function(PhotoPass,cb)
		{
			
			EZP.Api.Presentation.Web.Ajax.JCM.removePhotoPass(PhotoPass,cb.success,cb.failure,cb.scope);
		}
		,
		// Form-based short-cut for the above function.
		removePhotoPassForm:function ( cb )
		{
			this.removePhotoPass(V('PhotoPass','String'),cb);
		}
	
		,
		
		/*********
		
    This returns a list of valid assets
    
		@LocationCode : The location of the image

		returns : true the photopass can be assigned, false it cannot

		*********/
	assetList: function(LocationCode,cb)
		{
			
			EZP.Api.Presentation.Web.Ajax.JCM.assetList(LocationCode,cb.success,cb.failure,cb.scope);
		}
		,
		// Form-based short-cut for the above function.
		assetListForm:function ( cb )
		{
			this.assetList(V('LocationCode','String'),cb);
		}
	
		,
		
		/*********
		
    This determines whether or not the photopass is valid and available to be used
    
		@PhotoPass : The photo pass to be validated

		returns : true the photopass can be assigned, false it cannot

		*********/
	validPhotoPass: function(PhotoPass,cb)
		{
			
			EZP.Api.Presentation.Web.Ajax.JCM.validPhotoPass(PhotoPass,cb.success,cb.failure,cb.scope);
		}
		,
		// Form-based short-cut for the above function.
		validPhotoPassForm:function ( cb )
		{
			this.validPhotoPass(V('PhotoPass','String'),cb);
		}
	
		,
		pingAccount: function(Token,cb)
		{
			
			EZP.Api.Presentation.Web.Ajax.JCM.pingAccount(Token,cb.success,cb.failure,cb.scope);
		}
		,
		// Form-based short-cut for the above function.
		pingAccountForm:function ( cb )
		{
			this.pingAccount(V('Token','String'),cb);
		}
	
		,
		
		/*********
		
    login is used to establish a user session with the system.  
    
		@BrandId : The brand id.
		@UserName : User login.
		@Password : Clear text password typed in by the user

		returns : string Token - This string is used in all subsequent calls to the system to identify the user session.Thrown for the following:
    Invalid UserInvalid PasswordlogOff

		*********/
	loginDisney: function(BrandId,UserName,Password,cb)
		{
			
			EZP.Api.Presentation.Web.Ajax.JCM.loginDisney(BrandId,UserName,Password,cb.success,cb.failure,cb.scope);
		}
		,
		// Form-based short-cut for the above function.
		loginDisneyForm:function ( cb )
		{
			this.loginDisney(V('BrandId','String'),V('UserName','String'),V('Password','String'),cb);
		}
	
		,
		
		/*********
		
    This sets the user password to a random value and triggers an eMail to be sent to the user with the new password.
    
		@BrandId : This is the EZPrints assigned brand id.  See your EZPrints representative to determine your brand id.
		@UserName : This is the user id to verify. This is not case sensitive
		@FirstName : This is the First Name associated with the user.  This is not case sensitive

		returns : ReturnDescriptiontrueThe password has been resetfalseThe password could not be reset

		*********/
	resetDisneyPassword: function(BrandId,UserName,FirstName,cb)
		{
			
			EZP.Api.Presentation.Web.Ajax.JCM.resetDisneyPassword(BrandId,UserName,FirstName,cb.success,cb.failure,cb.scope);
		}
		,
		// Form-based short-cut for the above function.
		resetDisneyPasswordForm:function ( cb )
		{
			this.resetDisneyPassword(V('BrandId','Int32'),V('UserName','String'),V('FirstName','String'),cb);
		}
	
		,
		
		/*********
		
    logOff is used to end a session with the system.
    All session related data is removed from the system.
    login
		@Token : This is the token returned from login

		returns : true if the user is logged off, false if not.

		*********/
	logOffDisney: function(Token,cb)
		{
			
			EZP.Api.Presentation.Web.Ajax.JCM.logOffDisney(Token,cb.success,cb.failure,cb.scope);
		}
		,
		// Form-based short-cut for the above function.
		logOffDisneyForm:function ( cb )
		{
			this.logOffDisney(V('Token','String'),cb);
		}
	
		,
		
		/*********
		
    Adds a share account to be used for a shopping cart
    
		@BrandId : 
		@AccountId : 

		returns : 

		*********/
	addDisneyContactGuest: function(BrandId,AccountId,cb)
		{
			
			EZP.Api.Presentation.Web.Ajax.JCM.addDisneyContactGuest(BrandId,AccountId,cb.success,cb.failure,cb.scope);
		}
		,
		// Form-based short-cut for the above function.
		addDisneyContactGuestForm:function ( cb )
		{
			this.addDisneyContactGuest(V('BrandId','Int32'),V('AccountId','String'),cb);
		}
	
		,
		
		/*********
		
    Adds a share account to be used for a shopping cart
    
		@BrandId : 
		@AccountId : 

		returns : 

		*********/
	addDisneyContact: function(BrandId,Password,FirstName,LastName,Email,PhoneNumber,EULA,EmailConfirmed,MarketingOptIn,ShippingAddress1,ShippingAddress2,ShippingCity,ShippingStateProvince,ShippingPostalCode,ShippingCountry,ShippingVerified,BillingSameAsShipping,BillingAddress1,BillingAddress2,BillingCity,BillingStateProvince,BillingPostalCode,BillingCountry,BillingVerified,PhotoPass,cb)
		{
			
			EZP.Api.Presentation.Web.Ajax.JCM.addDisneyContact(BrandId,Password,FirstName,LastName,Email,PhoneNumber,EULA,EmailConfirmed,MarketingOptIn,ShippingAddress1,ShippingAddress2,ShippingCity,ShippingStateProvince,ShippingPostalCode,ShippingCountry,ShippingVerified,BillingSameAsShipping,BillingAddress1,BillingAddress2,BillingCity,BillingStateProvince,BillingPostalCode,BillingCountry,BillingVerified,PhotoPass,cb.success,cb.failure,cb.scope);
		}
		,
		// Form-based short-cut for the above function.
		addDisneyContactForm:function ( cb )
		{
			this.addDisneyContact(V('BrandId','Int32'),V('Password','String'),V('FirstName','String'),V('LastName','String'),V('Email','String'),V('PhoneNumber','String'),V('EULA','Boolean'),V('EmailConfirmed','Boolean'),V('MarketingOptIn','Boolean'),V('ShippingAddress1','String'),V('ShippingAddress2','String'),V('ShippingCity','String'),V('ShippingStateProvince','String'),V('ShippingPostalCode','String'),V('ShippingCountry','String'),V('ShippingVerified','Boolean'),V('BillingSameAsShipping','Boolean'),V('BillingAddress1','String'),V('BillingAddress2','String'),V('BillingCity','String'),V('BillingStateProvince','String'),V('BillingPostalCode','String'),V('BillingCountry','String'),V('BillingVerified','Boolean'),V('PhotoPass','String'),cb);
		}
	
		,
		
		/*********
		
    This returns the affinity of the account
    
		@Token : login token

		returns : The affinity

		*********/
	getAccountAffinity: function(Token,cb)
		{
			
			EZP.Api.Presentation.Web.Ajax.JCM.getAccountAffinity(Token,cb.success,cb.failure,cb.scope);
		}
		,
		// Form-based short-cut for the above function.
		getAccountAffinityForm:function ( cb )
		{
			this.getAccountAffinity(V('Token','String'),cb);
		}
	
		,
		
		/*********
		
    This associates a PhotoPass with an existing account
    
		@Token : The token returned from the Security login method
		@PhotoPass : 

		returns : true if the account was associated.

		*********/
	addPhotoPassToAccount: function(Token,PhotoPass,cb)
		{
			
			EZP.Api.Presentation.Web.Ajax.JCM.addPhotoPassToAccount(Token,PhotoPass,cb.success,cb.failure,cb.scope);
		}
		,
		// Form-based short-cut for the above function.
		addPhotoPassToAccountForm:function ( cb )
		{
			this.addPhotoPassToAccount(V('Token','String'),V('PhotoPass','String'),cb);
		}
	
		,
		
		/*********
		
    Updates the contact information for a given user
    
		@Token : The token returned from the Security login method
		@FirstName : 
		@LastName : 
		@Email : 
		@PhoneNumber : 
		@EULA : 
		@EmailConfirmed : 
		@MarketingOptIn : 
		@ShippingAddress1 : 
		@ShippingAddress2 : 
		@ShippingCity : 
		@ShippingStateProvince : 
		@ShippingPostalCode : 
		@ShippingCountry : 
		@ShippingVerified : 
		@BillingSameAsShipping : 
		@BillingAddress1 : 
		@BillingAddress2 : 
		@BillingCity : 
		@BillingStateProvince : 
		@BillingPostalCode : 
		@BillingCountry : 
		@BillingVerified : 

		returns : RegistrationContact

		*********/
	updateDisneyContact: function(Token,FirstName,LastName,Email,PhoneNumber,EULA,EmailConfirmed,MarketingOptIn,ShippingAddress1,ShippingAddress2,ShippingCity,ShippingStateProvince,ShippingPostalCode,ShippingCountry,ShippingVerified,BillingSameAsShipping,BillingAddress1,BillingAddress2,BillingCity,BillingStateProvince,BillingPostalCode,BillingCountry,BillingVerified,cb)
		{
			
			EZP.Api.Presentation.Web.Ajax.JCM.updateDisneyContact(Token,FirstName,LastName,Email,PhoneNumber,EULA,EmailConfirmed,MarketingOptIn,ShippingAddress1,ShippingAddress2,ShippingCity,ShippingStateProvince,ShippingPostalCode,ShippingCountry,ShippingVerified,BillingSameAsShipping,BillingAddress1,BillingAddress2,BillingCity,BillingStateProvince,BillingPostalCode,BillingCountry,BillingVerified,cb.success,cb.failure,cb.scope);
		}
		,
		// Form-based short-cut for the above function.
		updateDisneyContactForm:function ( cb )
		{
			this.updateDisneyContact(V('Token','String'),V('FirstName','String'),V('LastName','String'),V('Email','String'),V('PhoneNumber','String'),V('EULA','Boolean'),V('EmailConfirmed','Boolean'),V('MarketingOptIn','Boolean'),V('ShippingAddress1','String'),V('ShippingAddress2','String'),V('ShippingCity','String'),V('ShippingStateProvince','String'),V('ShippingPostalCode','String'),V('ShippingCountry','String'),V('ShippingVerified','Boolean'),V('BillingSameAsShipping','Boolean'),V('BillingAddress1','String'),V('BillingAddress2','String'),V('BillingCity','String'),V('BillingStateProvince','String'),V('BillingPostalCode','String'),V('BillingCountry','String'),V('BillingVerified','Boolean'),cb);
		}
	
		,
		
		/*********
		
    Uploads an image to the JCM service and associates it with the account
    
		@Token : The token returned from the Security login method
		@sLocation : The URI to the requested image

		returns : ImageInfo

		*********/
	imageUpload: function(Token,sLocation,cb)
		{
			
			EZP.Api.Presentation.Web.Ajax.JCM.imageUpload(Token,sLocation,cb.success,cb.failure,cb.scope);
		}
		,
		// Form-based short-cut for the above function.
		imageUploadForm:function ( cb )
		{
			this.imageUpload(V('Token','String'),V('sLocation','String'),cb);
		}
	
		,
		
		/*********
		
    Returns the list of images associated with an account.
    
		@AccountId : The guest account id
		@Type : STOCK, PROFESSIONAL, Uploaded

		returns : List of Images

		*********/
	imagesGetGuest: function(AccountId,Type,cb)
		{
			
			EZP.Api.Presentation.Web.Ajax.JCM.imagesGetGuest(AccountId,Type,cb.success,cb.failure,cb.scope);
		}
		,
		// Form-based short-cut for the above function.
		imagesGetGuestForm:function ( cb )
		{
			this.imagesGetGuest(V('AccountId','String'),V('Type','String'),cb);
		}
	
		,
		imageDetails: function(Token,imageId,cb)
		{
			
			EZP.Api.Presentation.Web.Ajax.JCM.imageDetails(Token,imageId,cb.success,cb.failure,cb.scope);
		}
		,
		// Form-based short-cut for the above function.
		imageDetailsForm:function ( cb )
		{
			this.imageDetails(V('Token','String'),V('imageId','String'),cb);
		}
	
		,
		imageDelete: function(Token,imageId,cb)
		{
			
			EZP.Api.Presentation.Web.Ajax.JCM.imageDelete(Token,imageId,cb.success,cb.failure,cb.scope);
		}
		,
		// Form-based short-cut for the above function.
		imageDeleteForm:function ( cb )
		{
			this.imageDelete(V('Token','String'),V('imageId','String'),cb);
		}
	
		,
		
		/*********
		
    Allows the user to edit an image
    
		@Token : Secrity Token
		@BaseImageId : If this is a new image, please pass the base image id
		@ExistingImageId : If this is an existing image, pass the existing image id
		@Rotation :  Clockwise270,Clockwise180,Clockwise90,None
		@OverlayId : The asset ID of the bug or border
		@Orientation : Portrait,Landscape
		@CropX : The X offset from the rotated origin of the image
		@CropY : The Y offset from the rotated origin of the image
		@CropWidthPercent : The percent of the rotated width of the image  1.0 = 100%
		@CropAspectRatio : EightByTen,FiveBySeven,FourBySix

		returns : ImageInfo

		*********/
	imageEdit: function(Token,BaseImageId,ExistingImageId,Rotation,OverlayId,Orientation,CropX,CropY,CropWidthPercent,CropAspectRatio,BlackAndWhite,cb)
		{
			
			EZP.Api.Presentation.Web.Ajax.JCM.imageEdit(Token,BaseImageId,ExistingImageId,Rotation,OverlayId,Orientation,CropX,CropY,CropWidthPercent,CropAspectRatio,BlackAndWhite,cb.success,cb.failure,cb.scope);
		}
		,
		// Form-based short-cut for the above function.
		imageEditForm:function ( cb )
		{
			this.imageEdit(V('Token','String'),V('BaseImageId','String'),V('ExistingImageId','String'),V('Rotation','String'),V('OverlayId','String'),V('Orientation','String'),V('CropX','String'),V('CropY','String'),V('CropWidthPercent','String'),V('CropAspectRatio','String'),V('BlackAndWhite','Bool'),cb);
		}
	
		,
		
		/*********
		
    Returns the list of images associated with an account.
    
		@AccountId : The guest account id
		@Type : STOCK, PROFESSIONAL, Uploaded

		returns : List of Images

		*********/
	imagesGet: function(Token,Type,cb)
		{
			
			EZP.Api.Presentation.Web.Ajax.JCM.imagesGet(Token,Type,cb.success,cb.failure,cb.scope);
		}

// imagesGet: function(Token,Type,cb) 
 // {
//    var msg = new XMLRPCMessage( "imagesGet" , null);
//    msg.addParameter(Token);
//    msg.addParameter(Type);
//    var request = EZP.util.ConnectionManager.asyncRequest('POST', this.strApi, cb , msg.xml() , this.output);
//  }
		,
		// Form-based short-cut for the above function.
		imagesGetForm:function ( cb )
		{
			this.imagesGet(V('Token','String'),V('Type','String'),cb);
		}
	
		,
		
		/*********
		
    Returns the list of images associated with an account.
    
		@Token : The token returned from the Security login method
		@Type : STOCK, PROFESSIONAL, Uploaded

		returns : List of Images

		*********/
	imagesCache: function(Token,Type,cb)
		{
			
			EZP.Api.Presentation.Web.Ajax.JCM.imagesCache(Token,Type,cb.success,cb.failure,cb.scope);
		}
		,
		// Form-based short-cut for the above function.
		imagesCacheForm:function ( cb )
		{
			this.imagesCache(V('Token','String'),V('Type','String'),cb);
		}
	
		}
		var ezpJcmSdk = new ezpJcm();



	
		var ezpeCommerce = Class.create();
		ezpeCommerce.prototype = {
		initialize: function() {
		this.baseUrl = "/API/";
		this.remotingPage = "ezp.ecommerce.rem";
		this.strApi=this.baseUrl + this.remotingPage;
		this.output="json";
		this.binaryProxy="SendMessageForBinary.aspx";
		}
		
		,
		
		/*********
		
    Removes a promotion code from a cart
    
		@Token : The token returned from the Security login method
		@PromotionCode : The Promotion code of the call

		returns : true if the cart was updated

		*********/
	removePromotionCode: function(Token,PromotionCode,cb)
		{
			
			EZP.Api.Presentation.Web.Ajax.eCommerce.removePromotionCode(Token,PromotionCode,cb.success,cb.failure,cb.scope);
		}
		,
		// Form-based short-cut for the above function.
		removePromotionCodeForm:function ( cb )
		{
			this.removePromotionCode(V('Token','String'),V('PromotionCode','String'),cb);
		}
	
		,
		
		/*********
		
    Applies a promotion code to a cart
    
		@Token : The token returned from the Security login method
		@PromotionCode : The Promotion code of the call

		returns : true if the cart was updated

		*********/
	applyPromotionCode: function(Token,PromotionCode,cb)
		{
			
			EZP.Api.Presentation.Web.Ajax.eCommerce.applyPromotionCode(Token,PromotionCode,cb.success,cb.failure,cb.scope);
		}
		,
		// Form-based short-cut for the above function.
		applyPromotionCodeForm:function ( cb )
		{
			this.applyPromotionCode(V('Token','String'),V('PromotionCode','String'),cb);
		}
	
		,
		
		/*********
		
    Empties the Shopping Cart for the user
    
		@Token : The token returned from the Security login method

		returns : true if the cart was emptied

		*********/
	emptyCart: function(Token,cb)
		{
			
			EZP.Api.Presentation.Web.Ajax.eCommerce.emptyCart(Token,cb.success,cb.failure,cb.scope);
		}
		,
		// Form-based short-cut for the above function.
		emptyCartForm:function ( cb )
		{
			this.emptyCart(V('Token','String'),cb);
		}
	
		,
		
		/*********
		
    Returns the available products
    
		@Token : Security Sets this value

		returns : A list of line items

		*********/
	getProducts: function(Token,cb)
		{
			
			EZP.Api.Presentation.Web.Ajax.eCommerce.getProducts(Token,cb.success,cb.failure,cb.scope);
		}
		,
		// Form-based short-cut for the above function.
		getProductsForm:function ( cb )
		{
			this.getProducts(V('Token','String'),cb);
		}
	
		,
		
		/*********
		
    Sets the shipping address of the cart
    
		@Token : Returned from the security system
		@FirstName : First Name
		@MiddleInitial : MI
		@LastName : Last Name
		@PhoneNumber : Phone Number
		@Address1 : Address Line
		@Address2 : Address Line 2
		@City : City
		@StateProvince : State or Province
		@PostalCode : Postal Code
		@Country : Country

		returns : The updated shopping cart

		*********/
	setCartShippingAddress: function(Token,FirstName,MiddleInitial,LastName,PhoneNumber,Address1,Address2,City,StateProvince,PostalCode,Country,cb)
		{
			
			EZP.Api.Presentation.Web.Ajax.eCommerce.setCartShippingAddress(Token,FirstName,MiddleInitial,LastName,PhoneNumber,Address1,Address2,City,StateProvince,PostalCode,Country,cb.success,cb.failure,cb.scope);
		}
		,
		// Form-based short-cut for the above function.
		setCartShippingAddressForm:function ( cb )
		{
			this.setCartShippingAddress(V('Token','String'),V('FirstName','String'),V('MiddleInitial','String'),V('LastName','String'),V('PhoneNumber','String'),V('Address1','String'),V('Address2','String'),V('City','String'),V('StateProvince','String'),V('PostalCode','String'),V('Country','String'),cb);
		}
	
		,
		
		/*********
		
    Sets the cart billing address
    
		@Token : Returned from the security system
		@FirstName : First Name
		@MiddleInitial : MI
		@LastName : Last Name
		@PhoneNumber : Phone Number
		@Address1 : Address Line
		@Address2 : Address Line 2
		@City : City
		@StateProvince : State or Province
		@PostalCode : Postal Code
		@Country : Country

		returns : The updated shopping cart

		*********/
	setCartBillingAddress: function(Token,FirstName,MiddleInitial,LastName,PhoneNumber,Address1,Address2,City,StateProvince,PostalCode,Country,cb)
		{
			
			EZP.Api.Presentation.Web.Ajax.eCommerce.setCartBillingAddress(Token,FirstName,MiddleInitial,LastName,PhoneNumber,Address1,Address2,City,StateProvince,PostalCode,Country,cb.success,cb.failure,cb.scope);
		}
		,
		// Form-based short-cut for the above function.
		setCartBillingAddressForm:function ( cb )
		{
			this.setCartBillingAddress(V('Token','String'),V('FirstName','String'),V('MiddleInitial','String'),V('LastName','String'),V('PhoneNumber','String'),V('Address1','String'),V('Address2','String'),V('City','String'),V('StateProvince','String'),V('PostalCode','String'),V('Country','String'),cb);
		}
	
		,
		getQuantity: function(Token,itemId,cb)
		{
			
			EZP.Api.Presentation.Web.Ajax.eCommerce.getQuantity(Token,itemId,cb.success,cb.failure,cb.scope);
		}
		,
		// Form-based short-cut for the above function.
		getQuantityForm:function ( cb )
		{
			this.getQuantity(V('Token','String'),V('itemId','String'),cb);
		}
	
		,
		
		/*********
		
    Sets the shipping method
    
		@Token : The token returned from the Security login method
		@shipMethod : The shipping method

		returns : The amount of the shipping charge

		*********/
	setShippingMethod: function(Token,shipMethod,cb)
		{
			
			EZP.Api.Presentation.Web.Ajax.eCommerce.setShippingMethod(Token,shipMethod,cb.success,cb.failure,cb.scope);
		}
		,
		// Form-based short-cut for the above function.
		setShippingMethodForm:function ( cb )
		{
			this.setShippingMethod(V('Token','String'),V('shipMethod','String'),cb);
		}
	
		,
		
		/*********
		
    Adds an item to the cart.
    If the item already exists, the quantity will be incremented
    
		@Token : The token returned from the Security login method
		@photoId : The id of the image associated with this account.  This may be a comma delimited list of ids
		@qty : The additional number of these to purchase.  The total number of items may be set directly using 
		@sku : The sku of the item to add

		returns : true if the item was added to the cart

		*********/
	addToCart: function(Token,photoId,qty,sku,cb)
		{
			
			EZP.Api.Presentation.Web.Ajax.eCommerce.addToCart(Token,photoId,qty,sku,cb.success,cb.failure,cb.scope);
		}
		,
		// Form-based short-cut for the above function.
		addToCartForm:function ( cb )
		{
			this.addToCart(V('Token','String'),V('photoId','String'),V('qty','Int32'),V('sku','String'),cb);
		}
	
		,
		
		/*********
		
    Removes an item from the cart.
    If the item exists, it will be removed
    
		@Token : The token returned from the Security login method
		@photoId : The id of the image associated with this account
		@sku : The sku of the item to remove

		returns : true if the item was added to the cart

		*********/
	removeFromCart: function(Token,photoId,sku,cb)
		{
			
			EZP.Api.Presentation.Web.Ajax.eCommerce.removeFromCart(Token,photoId,sku,cb.success,cb.failure,cb.scope);
		}
		,
		// Form-based short-cut for the above function.
		removeFromCartForm:function ( cb )
		{
			this.removeFromCart(V('Token','String'),V('photoId','String'),V('sku','String'),cb);
		}
	
		,
		
		/*********
		
    Sets the exact number of items of a specific sku and image id in the cart
    If the item already exists, the quantity will be updated to this value
    If it does not exist, the item will be added and the quantity set to the quantity passed
    
		@Token : The token returned from the Security login method
		@photoId : The id of the image associated with this account
		@qty : The additional number of these to purchase.  The total number of items may be set directly using 
		@sku : The sku of the item to add

		returns : true if the item was added to the cart

		*********/
	updateCartQuantity: function(Token,photoId,qty,sku,cb)
		{
			
			EZP.Api.Presentation.Web.Ajax.eCommerce.updateCartQuantity(Token,photoId,qty,sku,cb.success,cb.failure,cb.scope);
		}
		,
		// Form-based short-cut for the above function.
		updateCartQuantityForm:function ( cb )
		{
			this.updateCartQuantity(V('Token','String'),V('photoId','String'),V('qty','Int32'),V('sku','String'),cb);
		}
	
		,
		
		/*********
		
    Returns the current shopping cart for a user
    
		@Token : The token returned from the Security login method

		returns : Shopping Cart

		*********/
	getCart: function(Token,cb)
		{
			
			EZP.Api.Presentation.Web.Ajax.eCommerce.getCart(Token,cb.success,cb.failure,cb.scope);
		}
		,
		// Form-based short-cut for the above function.
		getCartForm:function ( cb )
		{
			this.getCart(V('Token','String'),cb);
		}
	
		,
		
		/*********
		
    Returns the current shopping cart for a user
    
		@EzpOrderId : The G1 reference number

		returns : Shopping Cart

		*********/
	getXmlOrder: function(EzpOrderId,cb)
		{
			
			EZP.Api.Presentation.Web.Ajax.eCommerce.getXmlOrder(EzpOrderId,cb.success,cb.failure,cb.scope);
		}
		,
		// Form-based short-cut for the above function.
		getXmlOrderForm:function ( cb )
		{
			this.getXmlOrder(V('EzpOrderId','String'),cb);
		}
	
		}
		var ezpeCommerceSdk = new ezpeCommerce();



	
		var ezpDPP = Class.create();
		ezpDPP.prototype = {
		initialize: function() {
		this.baseUrl = "/API/";
		this.remotingPage = "ezp.dpp.rem";
		this.strApi=this.baseUrl + this.remotingPage;
		this.output="json";
		this.binaryProxy="SendMessageForBinary.aspx";
		}
		
		,
		sharePhotos: function(Token,Addresses,From,Subj,Message,WebSite,Brand,cb)
		{
			
			EZP.Api.Presentation.Web.Ajax.DPP.sharePhotos(Token,Addresses,From,Subj,Message,WebSite,Brand,cb.success,cb.failure,cb.scope);
		}
		,
		// Form-based short-cut for the above function.
		sharePhotosForm:function ( cb )
		{
			this.sharePhotos(V('Token','String'),V('Addresses','String'),V('From','String'),V('Subj','String'),V('Message','String'),V('WebSite','String'),V('Brand','String'),cb);
		}
	
		,
		notifyPasswordReset: function(Token,Website,cb)
		{
			
			EZP.Api.Presentation.Web.Ajax.DPP.notifyPasswordReset(Token,Website,cb.success,cb.failure,cb.scope);
		}
		,
		// Form-based short-cut for the above function.
		notifyPasswordResetForm:function ( cb )
		{
			this.notifyPasswordReset(V('Token','String'),V('Website','String'),cb);
		}
	
		,
		getGuestOrderHistory: function(Token,cb)
		{
			
			EZP.Api.Presentation.Web.Ajax.DPP.getGuestOrderHistory(Token,cb.success,cb.failure,cb.scope);
		}
		,
		// Form-based short-cut for the above function.
		getGuestOrderHistoryForm:function ( cb )
		{
			this.getGuestOrderHistory(V('Token','String'),cb);
		}
	
		,
		getOrderHistory: function(Token,cb)
		{
			
			EZP.Api.Presentation.Web.Ajax.DPP.getOrderHistory(Token,cb.success,cb.failure,cb.scope);
		}
		,
		// Form-based short-cut for the above function.
		getOrderHistoryForm:function ( cb )
		{
			this.getOrderHistory(V('Token','String'),cb);
		}
	
		,
		getOrder: function(Token,OrderID,cb)
		{
			
			EZP.Api.Presentation.Web.Ajax.DPP.getOrder(Token,OrderID,cb.success,cb.failure,cb.scope);
		}
		,
		// Form-based short-cut for the above function.
		getOrderForm:function ( cb )
		{
			this.getOrder(V('Token','String'),V('OrderID','String'),cb);
		}
	
		,
		getAd: function(siteID,locID,adClass,launch,cb)
		{
			
			EZP.Api.Presentation.Web.Ajax.DPP.getAd(siteID,locID,adClass,launch,cb.success,cb.failure,cb.scope);
		}
		,
		// Form-based short-cut for the above function.
		getAdForm:function ( cb )
		{
			this.getAd(V('siteID','String'),V('locID','String'),V('adClass','String'),V('launch','String'),cb);
		}
	
		,
		getAdAff: function(siteID,locID,adClass,launch,affinity,cb)
		{
			
			EZP.Api.Presentation.Web.Ajax.DPP.getAdAff(siteID,locID,adClass,launch,affinity,cb.success,cb.failure,cb.scope);
		}
		,
		getUCAff: function(siteID,locID,adClass,launch,affinity,title,cb)
		{
			
			EZP.Api.Presentation.Web.Ajax.DPP.getUCAff(siteID,locID,adClass,launch,affinity,title,cb.success,cb.failure,cb.scope);
		}
		,
		getUCAffRules: function(siteID,locID,adClass,launch,affinity,title,rules,cb)
		{
			
			EZP.Api.Presentation.Web.Ajax.DPP.getUCAffRules(siteID,locID,adClass,launch,affinity,title,rules,cb.success,cb.failure,cb.scope);
		}
		,
		getUCAffRulesFlash: function(siteID,locID,adClass,launch,affinity,title,rules,cb)
		{
			
			EZP.Api.Presentation.Web.Ajax.DPP.getUCAffRulesFlash(siteID,locID,adClass,launch,affinity,title,rules,cb.success,cb.failure,cb.scope);
		}
		,
		// Form-based short-cut for the above function.
		getAdAffForm:function ( cb )
		{
			this.getAdAff(V('siteID','String'),V('locID','String'),V('adClass','String'),V('launch','String'),V('affinity','String'),cb);
		}
	    ,
	    getAdTextAff: function(siteID,locID,adClass,launch,affinity,cb)
		{
			
			EZP.Api.Presentation.Web.Ajax.DPP.getAdTextAff(siteID,locID,adClass,launch,affinity,cb.success,cb.failure,cb.scope);
		}
		
		,
		checkWords: function(testWords,cb)
		{
			
			EZP.Api.Presentation.Web.Ajax.DPP.checkWords(testWords,cb.success,cb.failure,cb.scope);
		}
		,
		// Form-based short-cut for the above function.
		checkWordsForm:function ( cb )
		{
			this.checkWords(V('testWords','String'),cb);
		},
		 getPopover: function(TileId,cb)
		{
			
			EZP.Api.Presentation.Web.Ajax.DPP.getPopover(TileId,cb.success,cb.failure,cb.scope);
		}
	
		}
		var ezpDPPSdk = new ezpDPP();



	