//requires to include successFunc and failFunc in other js 
var CartAjaxUtil = Class.create({
					   initialize: function(pg, paramVal, methodChoise)
					   {
					   	  this.setConfig(pg, paramVal, methodChoise);
					   },
					   test: function()
					   {
						   alert('');
					   },
					   setConfig:function(pg, paramVal, methodChoise)
					   {
						  this.page = pg;
						  this.param = paramVal;
						  this.meth = methodChoise;
					   },
					   request:function()
					   {
							new Ajax.Request(this.page, {
							parameters: this.param,
							method: this.meth,
							onSuccess: function(transport)
							{
								var response = transport.responseText || "no response text";
								cartSuccessFunc(response);
							},
							onFailure: function()
							{ 
								cartFailFunc(); 
							}
							});
					   },
					   updater:function(con)
					   {
							new Ajax.Updater(con,this.page, {
							parameters: this.param,
							method: this.meth,
							onSuccess: function(transport)
							{
								var response = transport.responseText || "no response text";
								cartSuccessFunc(response);
							},
							onFailure: function()
							{ 
								cartFailFunc(); 
							}
							});
					   },
					   loadPeriodicalUpdater: function(con, frequen, dec)
					   {	
							this.pUdater = new Ajax.PeriodicalUpdater(con,this.page, {
							parameters: this.param,
							method: this.meth,
							frequency: frequen,
							decay: dec,
							onSuccess: function(transport)
							{
								var response = transport.responseText || "no response text";
								cartSuccessFunc(response);
							},
							onFailure: function()
							{ 
								cartFailFunc(); 
							}
							});
					   },
					   stopPeriodicalUpdater:function()
					   {
						   this.pUdater.stop();
					   }
					   }); 

var deliveryAjaxUtil = Class.create({
					   initialize: function(pg, paramVal, methodChoise)
					   {
					   	  this.setConfig(pg, paramVal, methodChoise);
					   },
					   test: function()
					   {
						   alert('');
					   },
					   setConfig:function(pg, paramVal, methodChoise)
					   {
						  this.page = pg;
						  this.param = paramVal;
						  this.meth = methodChoise;
					   },
					   request:function()
					   {
							new Ajax.Request(this.page, {
							parameters: this.param,
							method: this.meth,
							onSuccess: function(transport)
							{
								var response = transport.responseText || "no response text";
								delSuccessFunc(response);
							},
							onFailure: function()
							{ 
								delFailFunc(); 
							}
							});
					   },
					   updater:function(con)
					   {
							new Ajax.Updater(con,this.page, {
							parameters: this.param,
							method: this.meth,
							onSuccess: function(transport)
							{
								var response = transport.responseText || "no response text";
								delSuccessFunc(response);
							},
							onFailure: function()
							{ 
								delFailFunc(); 
							}
							});
					   },
					   loadPeriodicalUpdater: function(con, frequen, dec)
					   {	
							this.pUdater = new Ajax.PeriodicalUpdater(con,this.page, {
							parameters: this.param,
							method: this.meth,
							frequency: frequen,
							decay: dec,
							onSuccess: function(transport)
							{
								var response = transport.responseText || "no response text";
								delSuccessFunc(response);
							},
							onFailure: function()
							{ 
								delFailFunc(); 
							}
							});
					   },
					   stopPeriodicalUpdater:function()
					   {
						   this.pUdater.stop();
					   }
					   }); 