// JavaScript Document

AjaxRoot = '/ajax/';

function StartUp_Products(ColourID, SizeID){
//	Populate_Products(, '');
	e = $('GarmentTypeID');
	GarmentTypeID = escape(e.value);
	e = $('CategoryID');
	CategoryID = escape(e.value);
	
	CallAJAX('StartUp', ColourID, SizeID, GarmentTypeID, CategoryID);
	
}

function Populate_Products(CallingElementID, LoaderID, ColourID, SizeID){
	
	//ColourID = escape(GetSelectValue('ColourID'));
	//SizeID = escape(GetSelectValue('SizeID'));

	ColourID = escape(ColourID);
	SizeID = escape(SizeID);

e = $('GarmentTypeID');
	GarmentTypeID = escape(e.value);
	e = $('CategoryID');
	CategoryID = escape(e.value);


	CallAJAX(CallingElementID, ColourID, SizeID, GarmentTypeID, CategoryID);
	/*
	url = AjaxRoot + 'product.php?CallingElementID=' + CallingElementID  + '&ColourID=' + ColourID
		+ '&SizeID=' + SizeID 
		+ '&GarmentTypeID=' + GarmentTypeID 
		+ '&CategoryID=' + CategoryID 
		+ '&' + Math.random() ;
	//alert(url);
	ajaxCall(url, '');
	
	*/
}

function CallAJAX(CallingElementID, ColourID, SizeID, GarmentTypeID, CategoryID){
	
		url = AjaxRoot + 'product.php?CallingElementID=' + CallingElementID  + '&ColourID=' + ColourID
		+ '&SizeID=' + SizeID 
		+ '&GarmentTypeID=' + GarmentTypeID 
		+ '&CategoryID=' + CategoryID 
		+ '&' + Math.random() ;
	//alert(url);
	ajaxCall(url, '');

	}
	
function TechnicalPopUp(URL) {
	
	width = 700;
	height=500
day = new Date();
id = day.getTime();
left = (screen.width - width)/2;
top = (screen.height - height)/2;
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=1,location=0,statusbar=1,menubar=1,resizable=1,width='+width+',height='+height+',left = '+left+',top = '+top+'');");
}