AjaxRoot = '/includes/ajax/';

function StartUp_Products(ProductGroupID){
//	Populate_Products(, '');
//	e = $('GarmentTypeID');
//	GarmentTypeID = escape(e.value);
//	e = $('CategoryID');
//	CategoryID = escape(e.value);
	ImageID = $('ImageID').value;
	UserType = $('UserType').value;
	CallAJAX('StartUp', ProductGroupID, 0, 0, 0, ImageID, '', '', UserType);
	
}

function Populate_Products(ChangedItem){
	ProductGroupID = $('ProductGroupID').value;
	ProductStyleID = $('ProductStyleID').value;
	ProductColourID = $('ProductColourID').value;
	ProductID = $('ProductID').value;
	ImageID = $('ImageID').value;
	Personalise = $('Personalise').value;
	ColourID = $('ColourID').value;
	UserType = $('UserType').value;
	CallAJAX(ChangedItem, ProductGroupID, ProductStyleID, ProductColourID, ProductID, ImageID, Personalise, ColourID, UserType);

}

function CallAJAX(ChangedItem, ProductGroupID, ProductStyleID, ProductColourID, ProductID, ImageID, Personalise, ColourID, UserType){
	
		url = AjaxRoot + 'product.php?ChangedItem=' + escape(ChangedItem ) 
		+ '&ProductGroupID=' + escape(ProductGroupID)
		+ '&ProductStyleID=' + escape(ProductStyleID) 
		+ '&ProductColourID=' + escape(ProductColourID) 
		+ '&ProductID=' + escape(ProductID)
		+ '&ImageID=' + escape(ImageID)
		+ '&Personalise=' + escape(Personalise)
		+ '&ColourID=' + escape(ColourID)
		+ '&UserType=' + escape(UserType)
		+ '&' + Math.random() ;
	//alert(url);
	ajaxCall(url, '');

	}
	
	
function Populate_Delivery(ChangedItem){
	CountryID = $('Delivery_CountryID').value;
	DeliveryID = $('DeliveryID').value;
	UserType = $('UserType').value;
	Value = $('Value').value;
	CallAJAXDelivery(ChangedItem, CountryID, DeliveryID, UserType, Value);

}

function CallAJAXDelivery(ChangedItem, CountryID, DeliveryID, UserType, Value){
	
		url = AjaxRoot + 'delivery.php?ChangedItem=' + escape(ChangedItem ) 
		+ '&CountryID=' + escape(CountryID)
		+ '&DeliveryID=' + escape(DeliveryID)
		+ '&UserType=' + escape(UserType)
		+ '&Value=' + escape(Value)
		+ '&' + Math.random() ;
	//alert(url);
	ajaxCall(url, '');

	}

