
function types(type){
	/*
	new Ajax.Updater('custStep3', '/customise/type.php', {
		method: 'get',
		parameters: "?t="+type
	});
	*/
	$.ajax({
	   type: "GET",
	   url: "customise/type.php",
	   data: "t="+type,
	   success: function(html){
	     $("#custStep3").html(html);
	   }
	 });
}

function previewImg(type,name){
	/*
	new Ajax.Updater('preview', './customise/preview.php', {
		method: 'get',
		parameters: "?t="+type+"&n="+name
	});
	*/
		$('#wait').show();
		
	$.ajax({
	   type: "GET",
	   url: "customise/preview.php",
	   data: "t="+type+"&n="+name,
	   success: function(html){
	     $("#preview").html(html);
	$('#wait').show();
	//$('#flashElement').css({ width: '0px', height : '0px', overflow: 'hidden' });
		setTimeout(function(){ $('#wait').hide();	},1000);
	   }
	 });
	
}

function previewImgStep2(type,name){
	/*
	new Ajax.Updater('preview', 'customise/previewStep2.php', {
		method: 'get',
		parameters: "?t="+type+"&n="+name
	});
	
	if (name == 'tailtype'){
		new Ajax.Updater('tailcolours', 'customise/tailcolours.php', {
			method: 'get',
			parameters: "?t="+type+"&n="+name
		});
	}
	*/
	$('#wait').show();
	$.ajax({
	   type: "GET",
	   url: "customise/previewStep2.php",
	   data: "t="+type+"&n="+name,
	   success: function(html){
	     $("#preview").html(html);
		$('#wait').show();
			setTimeout(function(){$('#wait').hide();},1000);
	   }
	 });
	
	if (name == 'tailtype'){
		$.ajax({
		   type: "GET",
		   url: "customise/tailcolours.php",
		   data: "t="+type+"&n="+name,
		   success: function(html){
		     $("#tailcolours").html(html);
		   }
		 });
	}
	
}

function previewImgStep3(type,name){
	new Ajax.Updater('preview', '/customise/previewStep3.php', {
		method: 'get',
		parameters: "?t="+type+"&n="+name
	});
}

function fabrics(type){
	/*
	new Ajax.Updater('fabrics', '/customise/fabrics.php', {
		method: 'get',
		parameters: "?t="+type
	});
	*/
	$.ajax({
	   type: "GET",
	   url: "customise/fabrics.php",
	   data: "t="+type,
	   success: function(html){
	     $("#fabrics").html(html);
	   }
	 });
}

function sizesFeet(type){
	/*
	new Ajax.Updater('feetSize', '/customiseAcc/feetSize.php', {
		method: 'get',
		parameters: "?t="+type
	});
	*/
	$.ajax({
	   type: "GET",
	   url: "customiseAcc/feetSize.php",
	   data: "t="+type,
	   success: function(html){
	     $("#feetSize").html(html);
	   }
	 });
}

function fabricsFeet(type){
	/*
	new Ajax.Updater('fabrics', '/customiseAcc/fabricsFeet.php', {
		method: 'get',
		parameters: "?t="+type
	});
	*/
	$.ajax({
	   type: "GET",
	   url: "customiseAcc/fabricsFeet.php",
	   data: "t="+type,
	   success: function(html){
	     $("#fabrics").html(html);
	   }
	 });
}

function sizesMitten(type){
	/*
	new Ajax.Updater('mittenSize', '/customiseAcc/mittenSize.php', {
		method: 'get',
		parameters: "?t="+type
	});
	*/
	$.ajax({
	   type: "GET",
	   url: "customiseAcc/mittenSize.php",
	   data: "t="+type,
	   success: function(html){
	     $("#mittenSize").html(html);
	   }
	 });
}

function fabricsMitten(type){
	/*
	new Ajax.Updater('fabrics', '/customiseAcc/fabricsMitten.php', {
		method: 'get',
		parameters: "?t="+type
	});
	*/
	$.ajax({
	   type: "GET",
	   url: "customiseAcc/fabricsMitten.php",
	   data: "t="+type,
	   success: function(html){
	     $("#fabrics").html(html);
	   }
	 });
}

function fabricsTail(type){
	
	var typeC = document.forms["custStep1"].elements["fabric"];
	var type = typeC.options[typeC.selectedIndex].value;
	
	var tailC = document.forms["custStep1"].elements["tailtype"];
	var tailtype = tailC.options[tailC.selectedIndex].value;
	/*
	new Ajax.Updater('fabrics', '/customiseAcc/fabricsTail.php', {
		method: 'get',
		parameters: "?t="+type+"&tailtype="+tailtype
	});
	*/
	$.ajax({
	   type: "GET",
	   url: "customiseAcc/fabricsTail.php",
	   data: "t="+type+"&tailtype="+tailtype,
	   success: function(html){
	     $("#fabrics").html(html);
	   }
	 });
}