if(typeof(X2O.X2OBaseItem) == 'undefined')
{
	throw('Cannot use this file unless you have included Base.js');
}
X2O.RecipeCollectionVO = function(){};
X2O.RecipeCollectionVO.Inherits(X2O.X2OBaseCollection);
	X2O.RecipeCollectionVO = function()
	{
		this.Inherits(X2O.X2OBaseCollection,'X2O.RecipeCollectionVO', 'X2O.RecipeVO', 'Recipes');
		
		/*PUBLIC METHODS*/
				this.loadAll = function(startIndex, endIndex, bLoadDeep)
		{
			
			var service_uri = X2O.X2OManager.hostURL + this.serviceName + ".x2o?jsid=" + this.getUID();

			var request_vars = '&x2o_token=' + X2O.X2ORequest.getEncryptedRequestToken();
			if(typeof(bLoadDeep) != 'undefined')
			{
				request_vars += '&LoadDeep=' + bLoadDeep.toString();
			}
			if(typeof(startIndex) != 'undefined')
			{
				request_vars += '&X2O_StartIndex=' + X2O.X2ORequest.encrypt(startIndex.toString());
			}
			else
			{
				request_vars += '&X2O_StartIndex=' + X2O.X2ORequest.encrypt("-1");
			}
			if(typeof(endIndex) != 'undefined')
			{
				request_vars += '&X2O_EndIndex=' + X2O.X2ORequest.encrypt(endIndex.toString());
			}
			else
			{
				request_vars += '&X2O_EndIndex=' + X2O.X2ORequest.encrypt("-1");
			}
			
			
			if(typeof("LoadAll") != 'undefined')
{
request_vars += '&Action=' + X2O.X2ORequest.encrypt("LoadAll");
}

			
			service_uri += request_vars;
			
			try
			{
				this.jsonRequester = new JSONscriptRequest(service_uri);
				this.jsonRequester.buildScriptTag();
				this.jsonRequester.addScriptTag(); //make the call
			}
			catch (error)
			{
				this.callFaultHandler('A fault was dispatched from loadAll: ' + error);
			}
		}

		this.loadAllWhereIDInList = function(IDListCommaSeparated, bLoadDeep)
		{
			
			var service_uri = X2O.X2OManager.hostURL + this.serviceName + ".x2o?jsid=" + this.getUID();

			var request_vars = '&x2o_token=' + X2O.X2ORequest.getEncryptedRequestToken();
			if(typeof(bLoadDeep) != 'undefined')
			{
				request_vars += '&LoadDeep=' + bLoadDeep.toString();
			}
			if(typeof(startIndex) != 'undefined')
			{
				request_vars += '&X2O_StartIndex=' + X2O.X2ORequest.encrypt(startIndex.toString());
			}
			else
			{
				request_vars += '&X2O_StartIndex=' + X2O.X2ORequest.encrypt("-1");
			}
			if(typeof(endIndex) != 'undefined')
			{
				request_vars += '&X2O_EndIndex=' + X2O.X2ORequest.encrypt(endIndex.toString());
			}
			else
			{
				request_vars += '&X2O_EndIndex=' + X2O.X2ORequest.encrypt("-1");
			}
			
			
			if(typeof("LoadAllWherePKInList") != 'undefined')
{
request_vars += '&Action=' + X2O.X2ORequest.encrypt("LoadAllWherePKInList");
}
if(typeof(IDListCommaSeparated) != 'undefined')
{
request_vars += '&PKInList=' + X2O.X2ORequest.encrypt(IDListCommaSeparated);
}

			
			service_uri += request_vars;
			
			try
			{
				this.jsonRequester = new JSONscriptRequest(service_uri);
				this.jsonRequester.buildScriptTag();
				this.jsonRequester.addScriptTag(); //make the call
			}
			catch (error)
			{
				this.callFaultHandler('A fault was dispatched from loadAllWhereIDInList: ' + error);
			}
		}

		this.loadAllByRelatedStyleItemID = function(RelatedStyleID, startIndex, endIndex, bLoadDeep)
		{
			
			var service_uri = X2O.X2OManager.hostURL + this.serviceName + ".x2o?jsid=" + this.getUID();

			var request_vars = '&x2o_token=' + X2O.X2ORequest.getEncryptedRequestToken();
			if(typeof(bLoadDeep) != 'undefined')
			{
				request_vars += '&LoadDeep=' + bLoadDeep.toString();
			}
			if(typeof(startIndex) != 'undefined')
			{
				request_vars += '&X2O_StartIndex=' + X2O.X2ORequest.encrypt(startIndex.toString());
			}
			else
			{
				request_vars += '&X2O_StartIndex=' + X2O.X2ORequest.encrypt("-1");
			}
			if(typeof(endIndex) != 'undefined')
			{
				request_vars += '&X2O_EndIndex=' + X2O.X2ORequest.encrypt(endIndex.toString());
			}
			else
			{
				request_vars += '&X2O_EndIndex=' + X2O.X2ORequest.encrypt("-1");
			}
			
			
			if(typeof(RelatedStyleID) != 'undefined')
{
request_vars += '&RelatedStyleID=' + X2O.X2ORequest.encrypt(RelatedStyleID);
}
if(typeof("LoadAllByRelatedStyleItemFK") != 'undefined')
{
request_vars += '&Action=' + X2O.X2ORequest.encrypt("LoadAllByRelatedStyleItemFK");
}

			
			service_uri += request_vars;
			
			try
			{
				this.jsonRequester = new JSONscriptRequest(service_uri);
				this.jsonRequester.buildScriptTag();
				this.jsonRequester.addScriptTag(); //make the call
			}
			catch (error)
			{
				this.callFaultHandler('A fault was dispatched from loadAllByRelatedStyleItemID: ' + error);
			}
		}

		this.loadAllWhereNameEqualTo = function(Name, startIndex, endIndex, bLoadDeep)
		{
			
			var service_uri = X2O.X2OManager.hostURL + this.serviceName + ".x2o?jsid=" + this.getUID();

			var request_vars = '&x2o_token=' + X2O.X2ORequest.getEncryptedRequestToken();
			if(typeof(bLoadDeep) != 'undefined')
			{
				request_vars += '&LoadDeep=' + bLoadDeep.toString();
			}
			if(typeof(startIndex) != 'undefined')
			{
				request_vars += '&X2O_StartIndex=' + X2O.X2ORequest.encrypt(startIndex.toString());
			}
			else
			{
				request_vars += '&X2O_StartIndex=' + X2O.X2ORequest.encrypt("-1");
			}
			if(typeof(endIndex) != 'undefined')
			{
				request_vars += '&X2O_EndIndex=' + X2O.X2ORequest.encrypt(endIndex.toString());
			}
			else
			{
				request_vars += '&X2O_EndIndex=' + X2O.X2ORequest.encrypt("-1");
			}
			
			
			if(typeof("loadAllWhereNameEqualTo") != 'undefined')
{
request_vars += '&Action=' + X2O.X2ORequest.encrypt("loadAllWhereNameEqualTo");
}
if(typeof(Name) != 'undefined')
{
request_vars += '&Name=' + X2O.X2ORequest.encrypt(Name);
}

			
			service_uri += request_vars;
			
			try
			{
				this.jsonRequester = new JSONscriptRequest(service_uri);
				this.jsonRequester.buildScriptTag();
				this.jsonRequester.addScriptTag(); //make the call
			}
			catch (error)
			{
				this.callFaultHandler('A fault was dispatched from loadAllWhereNameEqualTo: ' + error);
			}
		}

		this.loadAllWhereNameLike = function(Name, startIndex, endIndex, bLoadDeep)
		{
			
			var service_uri = X2O.X2OManager.hostURL + this.serviceName + ".x2o?jsid=" + this.getUID();

			var request_vars = '&x2o_token=' + X2O.X2ORequest.getEncryptedRequestToken();
			if(typeof(bLoadDeep) != 'undefined')
			{
				request_vars += '&LoadDeep=' + bLoadDeep.toString();
			}
			if(typeof(startIndex) != 'undefined')
			{
				request_vars += '&X2O_StartIndex=' + X2O.X2ORequest.encrypt(startIndex.toString());
			}
			else
			{
				request_vars += '&X2O_StartIndex=' + X2O.X2ORequest.encrypt("-1");
			}
			if(typeof(endIndex) != 'undefined')
			{
				request_vars += '&X2O_EndIndex=' + X2O.X2ORequest.encrypt(endIndex.toString());
			}
			else
			{
				request_vars += '&X2O_EndIndex=' + X2O.X2ORequest.encrypt("-1");
			}
			
			
			if(typeof("loadAllWhereNameLike") != 'undefined')
{
request_vars += '&Action=' + X2O.X2ORequest.encrypt("loadAllWhereNameLike");
}
if(typeof(Name) != 'undefined')
{
request_vars += '&Name=' + X2O.X2ORequest.encrypt(Name);
}

			
			service_uri += request_vars;
			
			try
			{
				this.jsonRequester = new JSONscriptRequest(service_uri);
				this.jsonRequester.buildScriptTag();
				this.jsonRequester.addScriptTag(); //make the call
			}
			catch (error)
			{
				this.callFaultHandler('A fault was dispatched from loadAllWhereNameLike: ' + error);
			}
		}

		this.loadAllWhereServingSizeEqualTo = function(ServingSize, startIndex, endIndex, bLoadDeep)
		{
			
			var service_uri = X2O.X2OManager.hostURL + this.serviceName + ".x2o?jsid=" + this.getUID();

			var request_vars = '&x2o_token=' + X2O.X2ORequest.getEncryptedRequestToken();
			if(typeof(bLoadDeep) != 'undefined')
			{
				request_vars += '&LoadDeep=' + bLoadDeep.toString();
			}
			if(typeof(startIndex) != 'undefined')
			{
				request_vars += '&X2O_StartIndex=' + X2O.X2ORequest.encrypt(startIndex.toString());
			}
			else
			{
				request_vars += '&X2O_StartIndex=' + X2O.X2ORequest.encrypt("-1");
			}
			if(typeof(endIndex) != 'undefined')
			{
				request_vars += '&X2O_EndIndex=' + X2O.X2ORequest.encrypt(endIndex.toString());
			}
			else
			{
				request_vars += '&X2O_EndIndex=' + X2O.X2ORequest.encrypt("-1");
			}
			
			
			if(typeof("loadAllWhereServingSizeEqualTo") != 'undefined')
{
request_vars += '&Action=' + X2O.X2ORequest.encrypt("loadAllWhereServingSizeEqualTo");
}
if(typeof(ServingSize) != 'undefined')
{
request_vars += '&ServingSize=' + X2O.X2ORequest.encrypt(ServingSize);
}

			
			service_uri += request_vars;
			
			try
			{
				this.jsonRequester = new JSONscriptRequest(service_uri);
				this.jsonRequester.buildScriptTag();
				this.jsonRequester.addScriptTag(); //make the call
			}
			catch (error)
			{
				this.callFaultHandler('A fault was dispatched from loadAllWhereServingSizeEqualTo: ' + error);
			}
		}

		this.loadAllWhereServingSizeLessThanEqualTo = function(ServingSize, startIndex, endIndex, bLoadDeep)
		{
			
			var service_uri = X2O.X2OManager.hostURL + this.serviceName + ".x2o?jsid=" + this.getUID();

			var request_vars = '&x2o_token=' + X2O.X2ORequest.getEncryptedRequestToken();
			if(typeof(bLoadDeep) != 'undefined')
			{
				request_vars += '&LoadDeep=' + bLoadDeep.toString();
			}
			if(typeof(startIndex) != 'undefined')
			{
				request_vars += '&X2O_StartIndex=' + X2O.X2ORequest.encrypt(startIndex.toString());
			}
			else
			{
				request_vars += '&X2O_StartIndex=' + X2O.X2ORequest.encrypt("-1");
			}
			if(typeof(endIndex) != 'undefined')
			{
				request_vars += '&X2O_EndIndex=' + X2O.X2ORequest.encrypt(endIndex.toString());
			}
			else
			{
				request_vars += '&X2O_EndIndex=' + X2O.X2ORequest.encrypt("-1");
			}
			
			
			if(typeof("loadAllWhereServingSizeLessThanEqualTo") != 'undefined')
{
request_vars += '&Action=' + X2O.X2ORequest.encrypt("loadAllWhereServingSizeLessThanEqualTo");
}
if(typeof(ServingSize) != 'undefined')
{
request_vars += '&ServingSize=' + X2O.X2ORequest.encrypt(ServingSize);
}

			
			service_uri += request_vars;
			
			try
			{
				this.jsonRequester = new JSONscriptRequest(service_uri);
				this.jsonRequester.buildScriptTag();
				this.jsonRequester.addScriptTag(); //make the call
			}
			catch (error)
			{
				this.callFaultHandler('A fault was dispatched from loadAllWhereServingSizeLessThanEqualTo: ' + error);
			}
		}

		this.loadAllWhereServingSizeGreaterThanEqualTo = function(lowerBound, upperBound, startIndex, endIndex, bLoadDeep)
		{
			
			var service_uri = X2O.X2OManager.hostURL + this.serviceName + ".x2o?jsid=" + this.getUID();

			var request_vars = '&x2o_token=' + X2O.X2ORequest.getEncryptedRequestToken();
			if(typeof(bLoadDeep) != 'undefined')
			{
				request_vars += '&LoadDeep=' + bLoadDeep.toString();
			}
			if(typeof(startIndex) != 'undefined')
			{
				request_vars += '&X2O_StartIndex=' + X2O.X2ORequest.encrypt(startIndex.toString());
			}
			else
			{
				request_vars += '&X2O_StartIndex=' + X2O.X2ORequest.encrypt("-1");
			}
			if(typeof(endIndex) != 'undefined')
			{
				request_vars += '&X2O_EndIndex=' + X2O.X2ORequest.encrypt(endIndex.toString());
			}
			else
			{
				request_vars += '&X2O_EndIndex=' + X2O.X2ORequest.encrypt("-1");
			}
			
			
			if(typeof("loadAllWhereServingSizeGreaterThanEqualTo") != 'undefined')
{
request_vars += '&Action=' + X2O.X2ORequest.encrypt("loadAllWhereServingSizeGreaterThanEqualTo");
}
if(typeof(lowerBound) != 'undefined')
{
request_vars += '&LowerBound=' + X2O.X2ORequest.encrypt(lowerBound);
}
if(typeof(upperBound) != 'undefined')
{
request_vars += '&UpperBound=' + X2O.X2ORequest.encrypt(upperBound);
}

			
			service_uri += request_vars;
			
			try
			{
				this.jsonRequester = new JSONscriptRequest(service_uri);
				this.jsonRequester.buildScriptTag();
				this.jsonRequester.addScriptTag(); //make the call
			}
			catch (error)
			{
				this.callFaultHandler('A fault was dispatched from loadAllWhereServingSizeGreaterThanEqualTo: ' + error);
			}
		}

		this.loadAllWhereAllParamsEqualTo = function(startIndex, endIndex, Name, ServingSize, bLoadDeep)
		{
			
			var service_uri = X2O.X2OManager.hostURL + this.serviceName + ".x2o?jsid=" + this.getUID();

			var request_vars = '&x2o_token=' + X2O.X2ORequest.getEncryptedRequestToken();
			if(typeof(bLoadDeep) != 'undefined')
			{
				request_vars += '&LoadDeep=' + bLoadDeep.toString();
			}
			if(typeof(startIndex) != 'undefined')
			{
				request_vars += '&X2O_StartIndex=' + X2O.X2ORequest.encrypt(startIndex.toString());
			}
			else
			{
				request_vars += '&X2O_StartIndex=' + X2O.X2ORequest.encrypt("-1");
			}
			if(typeof(endIndex) != 'undefined')
			{
				request_vars += '&X2O_EndIndex=' + X2O.X2ORequest.encrypt(endIndex.toString());
			}
			else
			{
				request_vars += '&X2O_EndIndex=' + X2O.X2ORequest.encrypt("-1");
			}
			
			
			if(typeof("loadAllWhereAllParamsEqualTo") != 'undefined')
{
request_vars += '&Action=' + X2O.X2ORequest.encrypt("loadAllWhereAllParamsEqualTo");
}
if(typeof(Name) != 'undefined')
{
request_vars += '&Name=' + X2O.X2ORequest.encrypt(Name);
}
if(typeof(ServingSize) != 'undefined')
{
request_vars += '&ServingSize=' + X2O.X2ORequest.encrypt(ServingSize);
}

			
			service_uri += request_vars;
			
			try
			{
				this.jsonRequester = new JSONscriptRequest(service_uri);
				this.jsonRequester.buildScriptTag();
				this.jsonRequester.addScriptTag(); //make the call
			}
			catch (error)
			{
				this.callFaultHandler('A fault was dispatched from loadAllWhereAllParamsEqualTo: ' + error);
			}
		}



	}
X2O.RecipeVO = function(){};
X2O.RecipeVO.Inherits(X2O.X2OBaseItem);	
X2O.RecipeVO = function(Name, Instructions, ServingSize, Picture)
{
	/*private vars*/
	var _ID;
var _Name;
var _Instructions;
var _ServingSize;
var _Picture;
var _RelatedStyleID;

	
	/*checks for empty constructor/missing args*/
		if(typeof(Name) == 'undefined')
	{
		Name = null;
	}
	if(typeof(Instructions) == 'undefined')
	{
		Instructions = null;
	}
	if(typeof(ServingSize) == 'undefined')
	{
		ServingSize = null;
	}
	if(typeof(Picture) == 'undefined')
	{
		Picture = null;
	}

	
	this.Inherits(X2O.X2OBaseItem, 'X2O.RecipeVO', 'Recipes',{'RelatedStyleItem': 'X2O.StyleVO','RelatedRecipeIngredientsCollection': 'X2O.RecipeIngredientCollectionVO'});
		
	
	/*getter and setter methods*/
	this.getID= function() { return _ID; }
this.setID = function(_val)
{
		if(_val == null)
	{
		throw('ID is required.');
	}
	
	if(typeof(_val) == 'number'
	&&
	parseFloat(_val) == parseInt(_val)
	&&
	_val > 0)
	{
		_ID = _val;
	}
	else throw('ID must be an integer greater than zero.');
}
this.getName= function() { return _Name; }
this.setName = function(_val)
{
		if(_val == null)
	{
		throw('Name is required.');
	}
	
	if(typeof(_val) == 'string')
	{
		if(_val.length <= 255)
		{
			_Name = _val;
		}
		else throw('Name cannot be longer than 255 characters.');
	}
	else throw('Cannot set Name to a non-string value.');
}
this.getInstructions= function() { return _Instructions; }
this.setInstructions = function(_val)
{
		if(_val == null)
	{
		_Instructions = null;
		return;
	}
	
	if(typeof(_val) == 'string')
	{
		if(_val.length <= 2147483647)
		{
			_Instructions = _val;
		}
		else throw('Instructions cannot be longer than 2147483647 characters.');
	}
	else throw('Cannot set Instructions to a non-string value.');
}
this.getServingSize= function() { return _ServingSize; }
this.setServingSize = function(_val)
{
		if(_val == null)
	{
		throw('ServingSize is required.');
	}
	
	if(typeof(_val) == 'number'
	&&
	parseFloat(_val) == parseInt(_val))
	{
		_ServingSize = _val;
	}
	else throw('ServingSize must be an integer value');
}
this.getPicture= function() { return _Picture; }
this.setPicture = function(_val)
{
		if(_val == null)
	{
		throw('Picture is required.');
	}
	
	if(typeof(_val) == 'string')
	{
		if(_val.length <= 500)
		{
			_Picture = _val;
		}
		else throw('Picture cannot be longer than 500 characters.');
	}
	else throw('Cannot set Picture to a non-string value.');
}
this.getRelatedStyleID= function() { return _RelatedStyleID; }
this.setRelatedStyleID = function(_val)
{
		if(_val == null)
	{
		throw('RelatedStyleID is required.');
	}
	
	if(typeof(_val) == 'number'
	&&
	parseFloat(_val) == parseInt(_val)
	&&
	_val > 0)
	{
		_RelatedStyleID = _val;
	}
	else throw('RelatedStyleID must be an integer greater than zero.');
}

	
	/*service calls*/
	this.loadByID = function(ID, bLoadDeep)
		{
			
						var validation_errors = '';
			
						if(typeof(ID) == 'undefined' || ID == null)
			{
				validation_errors += "ID is required.\n";
			}


			
			if(validation_errors != "")
			{
				throw(validation_errors);
			}
			
			var service_uri = X2O.X2OManager.hostURL + this.serviceName + ".x2o?jsid=" + this.getUID();

			var request_vars = '&x2o_token=' + X2O.X2ORequest.getEncryptedRequestToken();
			
			request_vars += '&Action=' + X2O.X2ORequest.encrypt('LoadByPK');
request_vars += '&ID=' + X2O.X2ORequest.encrypt(ID);

			
			if(typeof(bLoadDeep) != 'undefined')
			{
				request_vars += '&LoadDeep=' + bLoadDeep.toString();
			}
			service_uri += request_vars;
			
			try
			{
				this.jsonRequester = new JSONscriptRequest(service_uri);
				this.jsonRequester.buildScriptTag();
				this.jsonRequester.addScriptTag(); //make the call
			}
			catch (error)
			{
				this.callFaultHandler('A fault was dispatched from loadByID: ' + error);
			}
		}
this.insertVO = function(bLoadDeep)
		{
						var validation_errors = '';
			
						if(typeof(_Name) == 'undefined' || _Name == null)
			{
				validation_errors += "_Name is required.\n";
			}

			if(typeof(_ServingSize) == 'undefined' || _ServingSize == null)
			{
				validation_errors += "_ServingSize is required.\n";
			}

			if(typeof(_Picture) == 'undefined' || _Picture == null)
			{
				validation_errors += "_Picture is required.\n";
			}

			if(typeof(_RelatedStyleID) == 'undefined' || _RelatedStyleID == null)
			{
				validation_errors += "_RelatedStyleID is required.\n";
			}


			
			if(validation_errors != "")
			{
				throw(validation_errors);
			}
			
			var service_uri = X2O.X2OManager.hostURL + this.serviceName + ".x2o?jsid=" + this.getUID();

			var request_vars = '&x2o_token=' + X2O.X2ORequest.getEncryptedRequestToken();
			request_vars += '&Action=' + X2O.X2ORequest.encrypt('Insert');
			if(typeof(_Name) != 'undefined' && _Name != null)
{
	request_vars += '&Name=' + X2O.X2ORequest.encrypt(_Name);
}

if(typeof(_Instructions) != 'undefined' && _Instructions != null)
{
	request_vars += '&Instructions=' + X2O.X2ORequest.encrypt(_Instructions);
}

if(typeof(_ServingSize) != 'undefined' && _ServingSize != null)
{
	request_vars += '&ServingSize=' + X2O.X2ORequest.encrypt(_ServingSize);
}

if(typeof(_Picture) != 'undefined' && _Picture != null)
{
	request_vars += '&Picture=' + X2O.X2ORequest.encrypt(_Picture);
}

if(typeof(_RelatedStyleID) != 'undefined' && _RelatedStyleID != null)
{
	request_vars += '&RelatedStyleID=' + X2O.X2ORequest.encrypt(_RelatedStyleID);
}


			
			if(typeof(bLoadDeep) != 'undefined')
	{
		request_vars += '&ReturnDeepLoad=' + bLoadDeep.toString();
	}
			service_uri += request_vars;
			
			
			try
			{
				this.jsonRequester = new JSONscriptRequest(service_uri);
				this.jsonRequester.buildScriptTag();
				this.jsonRequester.addScriptTag(); //make the call
			}
			catch (error)
			{
				this.callFaultHandler('A fault was dispatched from insertVO: ' + error);
			}
		}
this.updateVO = function(bLoadDeep)
		{
						var validation_errors = '';
			
						if(typeof(_ID) == 'undefined' || _ID == null)
			{
				validation_errors += "_ID is required.\n";
			}

			if(typeof(_Name) == 'undefined' || _Name == null)
			{
				validation_errors += "_Name is required.\n";
			}

			if(typeof(_ServingSize) == 'undefined' || _ServingSize == null)
			{
				validation_errors += "_ServingSize is required.\n";
			}

			if(typeof(_Picture) == 'undefined' || _Picture == null)
			{
				validation_errors += "_Picture is required.\n";
			}

			if(typeof(_RelatedStyleID) == 'undefined' || _RelatedStyleID == null)
			{
				validation_errors += "_RelatedStyleID is required.\n";
			}


			
			if(validation_errors != "")
			{
				throw(validation_errors);
			}
			
			var service_uri = X2O.X2OManager.hostURL + this.serviceName + ".x2o?jsid=" + this.getUID();

			var request_vars = '&x2o_token=' + X2O.X2ORequest.getEncryptedRequestToken();
			request_vars += '&Action=' + X2O.X2ORequest.encrypt('Update');
			if(typeof(_ID) != 'undefined' && _ID != null)
{
	request_vars += '&ID=' + X2O.X2ORequest.encrypt(_ID);
}

if(typeof(_Name) != 'undefined' && _Name != null)
{
	request_vars += '&Name=' + X2O.X2ORequest.encrypt(_Name);
}

if(typeof(_Instructions) != 'undefined' && _Instructions != null)
{
	request_vars += '&Instructions=' + X2O.X2ORequest.encrypt(_Instructions);
}

if(typeof(_ServingSize) != 'undefined' && _ServingSize != null)
{
	request_vars += '&ServingSize=' + X2O.X2ORequest.encrypt(_ServingSize);
}

if(typeof(_Picture) != 'undefined' && _Picture != null)
{
	request_vars += '&Picture=' + X2O.X2ORequest.encrypt(_Picture);
}

if(typeof(_RelatedStyleID) != 'undefined' && _RelatedStyleID != null)
{
	request_vars += '&RelatedStyleID=' + X2O.X2ORequest.encrypt(_RelatedStyleID);
}


			
			if(typeof(bLoadDeep) != 'undefined')
			{
				request_vars += '&ReturnDeepLoad=' + bLoadDeep.toString();
			}
			service_uri += request_vars;
			
			try
			{
				this.jsonRequester = new JSONscriptRequest(service_uri);
				this.jsonRequester.buildScriptTag();
				this.jsonRequester.addScriptTag(); //make the call
			}
			catch (error)
			{
				this.callFaultHandler('A fault was dispatched from updateVO: ' + error);
			}
		}
this.deleteVO = function()
		{
						var validation_errors = '';
			
						if(typeof(_ID) == 'undefined' || _ID == null)
			{
				validation_errors += "_ID is required.\n";
			}


			
			if(validation_errors != "")
			{
				throw(validation_errors);
			}
			
			var service_uri = X2O.X2OManager.hostURL + this.serviceName + ".x2o?jsid=" + this.getUID();

			var request_vars = '&x2o_token=' + X2O.X2ORequest.getEncryptedRequestToken();
			request_vars += '&Action=' + X2O.X2ORequest.encrypt('E2LS029SQ9V3');
			if(typeof(_ID) != 'undefined' && _ID != null)
{
	request_vars += '&ID=' + X2O.X2ORequest.encrypt(_ID);
}


			
			
			service_uri += request_vars;
			
			
			try
			{
				this.jsonRequester = new JSONscriptRequest(service_uri);
				this.jsonRequester.buildScriptTag();
				this.jsonRequester.addScriptTag(); //make the call
			}
			catch (error)
			{
				this.callFaultHandler('A fault was dispatched from deleteVO: ' + error);
			}
		}

	
	/*relationship objects*/
	this.RelatedStyleItem = null;

	
	this.RelatedRecipeIngredientsCollection = null;

	
	/*set internal members according to passed in constructor variables*/
	if(Picture != null)
{
	this.setPicture(Picture);
}
}
		
