
var request = false;

try
{
request = new ActiveXObject("Msxml2.XMLHTTP");
} 
catch (e)
{
	try
	{
		request = new ActiveXObject("Microsoft.XMLHTTP");
	}
	catch (e2)
	{
		request = false;
	}
}

if(!request && typeof XMLHttpRequest != 'undefined')
{
	request = new XMLHttpRequest();
}

function checkEmailMailingList(responsePage, updateCategory, targetEmail)
{
	var queryString = "?updateCategory=" + updateCategory + "&targetEmail=" + targetEmail;
	
	request.open("GET", responsePage+queryString, true);
	request.onreadystatechange = function()
	{
		if (request.readyState == 4 && request.status == 200)
		{
			if(request.responseText == 'true')
			{
  			alert('The email address you have provided has already been registered!');
			}
			else if(request.responseText == 'false')
			{
				document.mailinglist_form.hiddenField.value = "mailingListUserTrue";
  			document.mailinglist_form.submit();
			}
		}
	}
		
	request.send(null);
}

function checkEmail(responsePage, updateCategory, targetEmail)
{
	var queryString = "?updateCategory=" + updateCategory + "&targetEmail=" + targetEmail;
	
	request.open("GET", responsePage+queryString, true);
	request.onreadystatechange = function()
	{
		if (request.readyState == 4 && request.status == 200)
		{
			if(request.responseText == 'true')
			{
  			alert('The email address you have provided has already been registered!');
			}
			else if(request.responseText == 'false')
			{
				document.registerForm.submit();
			}
		}
	}
		
	request.send(null);
}

function checkInventory(responsePage, updateCategory)
{
	var selectedOption = $("#apply_dropdown").selectedValues();
	
	if(selectedOption == 'all' || selectedOption == 'base')
	{
		var targetFabric = document.getElementById("medium_fabric_photo").name;
		var targetQuantity = 2;
		 
		var queryString = "?updateCategory=" + updateCategory + "&targetFabric=" + targetFabric + "&targetQuantity=" + targetQuantity;
	
		request.open("GET", responsePage+queryString, true);
		request.onreadystatechange = function()
		{
			if (request.readyState == 4 && request.status == 200)
			{
				if(request.responseText == 'true')
				{
					ajaxSwitch('ajaxResponse.php', 'fabric');
				}
				else if(request.responseText == 'false')
				{
					alert('There is not enough fabric '+targetFabric+' in stock for this operation!');
				}
			}
		}
		
		request.send(null);
	}
	else
	{
		ajaxSwitch('ajaxResponse.php', 'fabric');
	}
}

function monogramPreview(responsePage, updateCategory, colour, font)
{
	var queryString = "?updateCategory=" + updateCategory + "&colour=" + colour + "&font=" + font;
	
	request.open("GET", responsePage+queryString, true);
	request.onreadystatechange = function()
	{
		if (request.readyState == 4 && request.status == 200)
		{
			document.getElementById("monogram_preview").src = request.responseText;
		}
	}
	
	request.send(null);
}

function monogramUpdate(responsePage, updateCategory, monogramPlacement, monogramText, monogramColour, monogramFont)
{
	var queryString = "?updateCategory=" + updateCategory + "&monogramPlacement=" + monogramPlacement;

	request.open("GET", responsePage+queryString, true);
	request.onreadystatechange = function()
	{
		if (request.readyState == 4 && request.status == 200)
		{
			document.getElementById("shirtModelIndexView1_19").src = request.responseText;
			document.getElementById("shirtModelIndexView1_19").name = monogramPlacement;
			document.getElementById("shirtModelIndexView1_19").title = monogramText;
			document.getElementById("shirtModelIndexView1_20").name = monogramColour;
			document.getElementById("shirtModelIndexView1_20").title = monogramFont;
		}
	}
	
	request.send(null);
}

function ajaxSwitch(responsePage, updateCategory)
{
	var View1IndexID = new Array();
	var View2IndexID = new Array();
	var View3IndexID = new Array();
	
	if(updateCategory == "details" && document.getElementById("details_selection_photo").title == "standard")
	{
		$("#apply_dropdown").addOption("shoulder_loops", "Shoulder Loops");
		$("#apply_dropdown").selectOptions("all");
	}
	if(updateCategory == "details" && document.getElementById("details_selection_photo").title == "noloops")
	{
		$("#apply_dropdown").removeOption("shoulder_loops");
		$("#apply_dropdown").selectOptions("all");
	}
	if(updateCategory == "design" && document.getElementById("design_selection_photo").title != "nopocket")
	{
		$("#apply_dropdown").addOption("pocket", "Pocket");
		$("#apply_dropdown").selectOptions("all");
	}
	if(updateCategory == "design" && document.getElementById("design_selection_photo").title == "nopocket")
	{
		$("#apply_dropdown").removeOption("pocket");
		$("#apply_dropdown").selectOptions("all");
	}
	
	if(updateCategory == 'short')
	{
		var switchComponentFabricView1 = Array();
		var switchComponentFabricView2 = Array();
		
		switchComponentFabricView1[0] = document.getElementById("shirtModelIndexView1_2").title;
		switchComponentFabricView1[1] = document.getElementById("shirtModelIndexView1_5").title;
		switchComponentFabricView1[2] = "undefined";
		switchComponentFabricView1[3] = "undefined";
		switchComponentFabricView1[4] = "undefined";
		switchComponentFabricView1[5] = document.getElementById("shirtModelIndexView1_9").title;
		switchComponentFabricView1[6] = "undefined";
		
		switchComponentFabricView2[0] = document.getElementById("shirtModelIndexView2_3").title;
		switchComponentFabricView2[1] = document.getElementById("shirtModelIndexView1_5").title;
		switchComponentFabricView2[2] = document.getElementById("shirtModelIndexView1_9").title;
		
		var switchComponentStyleView1 = Array();
		var switchComponentStyleView2 = Array();
		
		switchComponentStyleView1[0] = updateCategory;
		switchComponentStyleView1[1] = "singletop";
		switchComponentStyleView1[2] = "undefined";
		switchComponentStyleView1[3] = "undefined";
		switchComponentStyleView1[4] = "undefined";
		switchComponentStyleView1[5] = "singletop";
		switchComponentStyleView1[6] = "undefined";
		
		switchComponentStyleView2[0] = updateCategory;
		switchComponentStyleView2[1] = "singletop";
		switchComponentStyleView2[2] = "singletop";
			
		View1IndexID[0] = 2;
		View1IndexID[1] = 5;
		View1IndexID[2] = 6;
		View1IndexID[3] = 7;
		View1IndexID[4] = 8;
		View1IndexID[5] = 9;
		View1IndexID[6] = 10;
		
		var sendComponentFabricsView1Index = new Array();
		sendComponentFabricsView1Index[0] = document.getElementById("shirtModelIndexView1_2").title;
		sendComponentFabricsView1Index[1] = document.getElementById("shirtModelIndexView1_5").title;
		sendComponentFabricsView1Index[2] = document.getElementById("shirtModelIndexView1_6").title;
		sendComponentFabricsView1Index[3] = document.getElementById("shirtModelIndexView1_7").title;
		sendComponentFabricsView1Index[4] = document.getElementById("shirtModelIndexView1_8").title;
		sendComponentFabricsView1Index[5] = document.getElementById("shirtModelIndexView1_9").title;
		sendComponentFabricsView1Index[6] = document.getElementById("shirtModelIndexView1_10").title;
		
		View2IndexID[0] = 3;
		View2IndexID[1] = 4;
		View2IndexID[2] = 5;
		
		var sendComponentFabricsView2Index = new Array();
		sendComponentFabricsView2Index[0] = document.getElementById("shirtModelIndexView2_3").title;
		sendComponentFabricsView2Index[1] = document.getElementById("shirtModelIndexView2_4").title;
		sendComponentFabricsView2Index[2] = document.getElementById("shirtModelIndexView2_5").title;
		
		var queryString = "?updateCategory=" + updateCategory +
												"&sendComponentFabricsView1Index0=" + sendComponentFabricsView1Index[0] +
												"&sendComponentFabricsView1Index1=" + sendComponentFabricsView1Index[1] +
												"&sendComponentFabricsView1Index2=" + sendComponentFabricsView1Index[2] +
												"&sendComponentFabricsView1Index3=" + sendComponentFabricsView1Index[3] +
												"&sendComponentFabricsView1Index4=" + sendComponentFabricsView1Index[4] +
												"&sendComponentFabricsView1Index5=" + sendComponentFabricsView1Index[5] +
												"&sendComponentFabricsView1Index6=" + sendComponentFabricsView1Index[6] +
												"&sendComponentFabricsView2Index0=" + sendComponentFabricsView2Index[0] +
												"&sendComponentFabricsView2Index1=" + sendComponentFabricsView2Index[1] +
												"&sendComponentFabricsView2Index2=" + sendComponentFabricsView2Index[2];
	}
	if(updateCategory == 'long')
	{
		var switchComponentFabricView1 = Array();
		var switchComponentFabricView2 = Array();
		
		switchComponentFabricView1[0] = document.getElementById("shirtModelIndexView1_2").title;
		switchComponentFabricView1[1] = document.getElementById("shirtModelIndexView1_5").title;
		switchComponentFabricView1[2] = document.getElementById("shirtModelIndexView1_5").title;
		switchComponentFabricView1[3] = "undefined";
		switchComponentFabricView1[4] = "undefined";
		switchComponentFabricView1[5] = document.getElementById("shirtModelIndexView1_9").title;
		switchComponentFabricView1[6] = document.getElementById("shirtModelIndexView1_9").title;
		
		switchComponentFabricView2[0] = document.getElementById("shirtModelIndexView2_3").title;
		switchComponentFabricView2[1] = "undefined";
		switchComponentFabricView2[2] = "undefined";
		
		var switchComponentStyleView1 = Array();
		var switchComponentStyleView2 = Array();
		
		switchComponentStyleView1[0] = updateCategory;
		switchComponentStyleView1[1] = "1buttonangle";
		switchComponentStyleView1[2] = "1buttonangle";
		switchComponentStyleView1[3] = "undefined";
		switchComponentStyleView1[4] = "undefined";
		switchComponentStyleView1[5] = "1buttonangle";
		switchComponentStyleView1[6] = "1buttonangle";
		
		switchComponentStyleView2[0] = updateCategory;
		switchComponentStyleView2[1] = "undefined";
		switchComponentStyleView2[2] = "undefined";
			
		View1IndexID[0] = 2;
		View1IndexID[1] = 5;
		View1IndexID[2] = 6;
		View1IndexID[3] = 7;
		View1IndexID[4] = 8;
		View1IndexID[5] = 9;
		View1IndexID[6] = 10;
		
		var sendComponentFabricsView1Index = new Array();
		sendComponentFabricsView1Index[0] = document.getElementById("shirtModelIndexView1_2").title;
		sendComponentFabricsView1Index[1] = document.getElementById("shirtModelIndexView1_5").title;
		sendComponentFabricsView1Index[2] = document.getElementById("shirtModelIndexView1_5").title;
		sendComponentFabricsView1Index[3] = document.getElementById("shirtModelIndexView1_16").title;
		sendComponentFabricsView1Index[4] = document.getElementById("shirtModelIndexView1_17").title;
		sendComponentFabricsView1Index[5] = document.getElementById("shirtModelIndexView1_9").title;
		sendComponentFabricsView1Index[6] = document.getElementById("shirtModelIndexView1_9").title;

		View2IndexID[0] = 3;
		View2IndexID[1] = 4;
		View2IndexID[2] = 5;
		
		var sendComponentFabricsView2Index = new Array();
		sendComponentFabricsView2Index[0] = document.getElementById("shirtModelIndexView2_3").title;
		sendComponentFabricsView2Index[1] = document.getElementById("shirtModelIndexView2_4").title;
		sendComponentFabricsView2Index[2] = document.getElementById("shirtModelIndexView2_5").title;
		
		var queryString = "?updateCategory=" + updateCategory +
												"&sendComponentFabricsView1Index0=" + sendComponentFabricsView1Index[0] +
												"&sendComponentFabricsView1Index1=" + sendComponentFabricsView1Index[1] +
												"&sendComponentFabricsView1Index2=" + sendComponentFabricsView1Index[2] +
												"&sendComponentFabricsView1Index3=" + sendComponentFabricsView1Index[3] +
												"&sendComponentFabricsView1Index4=" + sendComponentFabricsView1Index[4] +
												"&sendComponentFabricsView1Index5=" + sendComponentFabricsView1Index[5] +
												"&sendComponentFabricsView1Index6=" + sendComponentFabricsView1Index[6] +
												"&sendComponentFabricsView2Index0=" + sendComponentFabricsView2Index[0] +
												"&sendComponentFabricsView2Index1=" + sendComponentFabricsView2Index[1] +
												"&sendComponentFabricsView2Index2=" + sendComponentFabricsView2Index[2];
	}
	
	if(updateCategory == 'fabric')
	{
		var selectedOption = $("#apply_dropdown").selectedValues();
		var selectedFabric = document.getElementById("medium_fabric_photo").name;
		
		if(selectedOption == 'apply_fabric_to')
		{
			alert('Please select component option from the dropdown menu!');
			return;
		}
		else if(selectedOption == 'all')
		{
			if(document.getElementById("shirtModelIndexView1_2").name == 'long' && document.getElementById("shirtModelIndexView1_3").name != 'nopocket' && document.getElementById("shirtModelIndexView1_4").name == 'noloops')
			{
				var optionMode = 'longSleeve_pocket_noLoops';
				
				View1IndexID[0] = 0;
				View1IndexID[1] = 1;
				View1IndexID[2] = 2;
				View1IndexID[3] = 3;
				View1IndexID[4] = 5;
				View1IndexID[5] = 6;
				View1IndexID[6] = 9;
				View1IndexID[7] = 10;
				View1IndexID[8] = 11;
				View1IndexID[9] = 14;
				View1IndexID[10] = 15;
			
				var sendComponentStylesView1Index = new Array();
				sendComponentStylesView1Index[0] = document.getElementById("shirtModelIndexView1_0").name;
				sendComponentStylesView1Index[1] = document.getElementById("shirtModelIndexView1_1").name;
				sendComponentStylesView1Index[2] = document.getElementById("shirtModelIndexView1_2").name;
				sendComponentStylesView1Index[3] = document.getElementById("shirtModelIndexView1_3").name;
				sendComponentStylesView1Index[4] = document.getElementById("shirtModelIndexView1_5").name;
				sendComponentStylesView1Index[5] = document.getElementById("shirtModelIndexView1_6").name;
				sendComponentStylesView1Index[6] = document.getElementById("shirtModelIndexView1_9").name;
				sendComponentStylesView1Index[7] = document.getElementById("shirtModelIndexView1_10").name;
				sendComponentStylesView1Index[8] = document.getElementById("shirtModelIndexView1_11").name;
				sendComponentStylesView1Index[9] = document.getElementById("shirtModelIndexView1_14").name;
				sendComponentStylesView1Index[10] = document.getElementById("shirtModelIndexView1_15").name;
			
				View2IndexID[0] = 0;
				View2IndexID[1] = 1;
				View2IndexID[2] = 2;
				View2IndexID[3] = 3;
			
				var sendComponentStylesView2Index = new Array();
				sendComponentStylesView2Index[0] = document.getElementById("shirtModelIndexView2_0").name;
				sendComponentStylesView2Index[1] = document.getElementById("shirtModelIndexView2_1").name;
				sendComponentStylesView2Index[2] = document.getElementById("shirtModelIndexView2_2").name;
				sendComponentStylesView2Index[3] = document.getElementById("shirtModelIndexView2_3").name;
			
				var queryString = "?updateCategory=" + updateCategory +
													"&selectedOption=" + selectedOption +
													"&selectedFabric=" + selectedFabric +
													"&optionMode=" + optionMode +
													"&sendComponentStylesView1Index0=" + sendComponentStylesView1Index[0] +
													"&sendComponentStylesView1Index1=" + sendComponentStylesView1Index[1] +
													"&sendComponentStylesView1Index2=" + sendComponentStylesView1Index[2] +
													"&sendComponentStylesView1Index3=" + sendComponentStylesView1Index[3] +
													"&sendComponentStylesView1Index4=" + sendComponentStylesView1Index[4] +
													"&sendComponentStylesView1Index5=" + sendComponentStylesView1Index[5] +
													"&sendComponentStylesView1Index6=" + sendComponentStylesView1Index[6] +
													"&sendComponentStylesView1Index7=" + sendComponentStylesView1Index[7] +
													"&sendComponentStylesView1Index8=" + sendComponentStylesView1Index[8] +
													"&sendComponentStylesView1Index9=" + sendComponentStylesView1Index[9] +
													"&sendComponentStylesView1Index10=" + sendComponentStylesView1Index[10] +
													"&sendComponentStylesView2Index0=" + sendComponentStylesView2Index[0] +
													"&sendComponentStylesView2Index1=" + sendComponentStylesView2Index[1] +
													"&sendComponentStylesView2Index2=" + sendComponentStylesView2Index[2] +
													"&sendComponentStylesView2Index3=" + sendComponentStylesView2Index[3];
			}
			else if(document.getElementById("shirtModelIndexView1_2").name == 'short' && document.getElementById("shirtModelIndexView1_3").name != 'nopocket' && document.getElementById("shirtModelIndexView1_4").name == 'noloops')
			{
				var optionMode = 'shortSleeve_pocket_noLoops';
				
				View1IndexID[0] = 0;
				View1IndexID[1] = 1;
				View1IndexID[2] = 2;
				View1IndexID[3] = 3;
				View1IndexID[4] = 5;
				View1IndexID[5] = 9;
				View1IndexID[6] = 11;
				View1IndexID[7] = 14;
				View1IndexID[8] = 15;
			
				var sendComponentStylesView1Index = new Array();
				sendComponentStylesView1Index[0] = document.getElementById("shirtModelIndexView1_0").name;
				sendComponentStylesView1Index[1] = document.getElementById("shirtModelIndexView1_1").name;
				sendComponentStylesView1Index[2] = document.getElementById("shirtModelIndexView1_2").name;
				sendComponentStylesView1Index[3] = document.getElementById("shirtModelIndexView1_3").name;
				sendComponentStylesView1Index[4] = document.getElementById("shirtModelIndexView1_5").name;
				sendComponentStylesView1Index[5] = document.getElementById("shirtModelIndexView1_9").name;
				sendComponentStylesView1Index[6] = document.getElementById("shirtModelIndexView1_11").name;
				sendComponentStylesView1Index[7] = document.getElementById("shirtModelIndexView1_14").name;
				sendComponentStylesView1Index[8] = document.getElementById("shirtModelIndexView1_15").name;
			
				View2IndexID[0] = 0;
				View2IndexID[1] = 1;
				View2IndexID[2] = 2;
				View2IndexID[3] = 3;
				View2IndexID[4] = 4;
				View2IndexID[5] = 5;
			
				var sendComponentStylesView2Index = new Array();
				sendComponentStylesView2Index[0] = document.getElementById("shirtModelIndexView2_0").name;
				sendComponentStylesView2Index[1] = document.getElementById("shirtModelIndexView2_1").name;
				sendComponentStylesView2Index[2] = document.getElementById("shirtModelIndexView2_2").name;
				sendComponentStylesView2Index[3] = document.getElementById("shirtModelIndexView2_3").name;
				sendComponentStylesView2Index[4] = document.getElementById("shirtModelIndexView2_4").name;
				sendComponentStylesView2Index[5] = document.getElementById("shirtModelIndexView2_5").name;
			
				var queryString = "?updateCategory=" + updateCategory +
													"&selectedOption=" + selectedOption +
													"&selectedFabric=" + selectedFabric +
													"&optionMode=" + optionMode +
													"&sendComponentStylesView1Index0=" + sendComponentStylesView1Index[0] +
													"&sendComponentStylesView1Index1=" + sendComponentStylesView1Index[1] +
													"&sendComponentStylesView1Index2=" + sendComponentStylesView1Index[2] +
													"&sendComponentStylesView1Index3=" + sendComponentStylesView1Index[3] +
													"&sendComponentStylesView1Index4=" + sendComponentStylesView1Index[4] +
													"&sendComponentStylesView1Index5=" + sendComponentStylesView1Index[5] +
													"&sendComponentStylesView1Index6=" + sendComponentStylesView1Index[6] +
													"&sendComponentStylesView1Index7=" + sendComponentStylesView1Index[7] +
													"&sendComponentStylesView1Index8=" + sendComponentStylesView1Index[8] +
													"&sendComponentStylesView2Index0=" + sendComponentStylesView2Index[0] +
													"&sendComponentStylesView2Index1=" + sendComponentStylesView2Index[1] +
													"&sendComponentStylesView2Index2=" + sendComponentStylesView2Index[2] +
													"&sendComponentStylesView2Index3=" + sendComponentStylesView2Index[3] +
													"&sendComponentStylesView2Index4=" + sendComponentStylesView2Index[4] +
													"&sendComponentStylesView2Index5=" + sendComponentStylesView2Index[5];
			}
			else if(document.getElementById("shirtModelIndexView1_2").name == 'long' && document.getElementById("shirtModelIndexView1_3").name != 'nopocket' && document.getElementById("shirtModelIndexView1_4").name == 'standard')
			{
				var optionMode = 'longSleeve_pocket_standard';
				
				View1IndexID[0] = 0;
				View1IndexID[1] = 1;
				View1IndexID[2] = 2;
				View1IndexID[3] = 3;
				View1IndexID[4] = 4;
				View1IndexID[5] = 5;
				View1IndexID[6] = 6;
				View1IndexID[7] = 9;
				View1IndexID[8] = 10;
				View1IndexID[9] = 11;
				View1IndexID[10] = 14;
				View1IndexID[11] = 15;
			
				var sendComponentStylesView1Index = new Array();
				sendComponentStylesView1Index[0] = document.getElementById("shirtModelIndexView1_0").name;
				sendComponentStylesView1Index[1] = document.getElementById("shirtModelIndexView1_1").name;
				sendComponentStylesView1Index[2] = document.getElementById("shirtModelIndexView1_2").name;
				sendComponentStylesView1Index[3] = document.getElementById("shirtModelIndexView1_3").name;
				sendComponentStylesView1Index[4] = document.getElementById("shirtModelIndexView1_4").name;
				sendComponentStylesView1Index[5] = document.getElementById("shirtModelIndexView1_5").name;
				sendComponentStylesView1Index[6] = document.getElementById("shirtModelIndexView1_6").name;
				sendComponentStylesView1Index[7] = document.getElementById("shirtModelIndexView1_9").name;
				sendComponentStylesView1Index[8] = document.getElementById("shirtModelIndexView1_10").name;
				sendComponentStylesView1Index[9] = document.getElementById("shirtModelIndexView1_11").name;
				sendComponentStylesView1Index[10] = document.getElementById("shirtModelIndexView1_14").name;
				sendComponentStylesView1Index[11] = document.getElementById("shirtModelIndexView1_15").name;
			
				View2IndexID[0] = 0;
				View2IndexID[1] = 1;
				View2IndexID[2] = 2;
				View2IndexID[3] = 3;
				View2IndexID[4] = 6;
			
				var sendComponentStylesView2Index = new Array();
				sendComponentStylesView2Index[0] = document.getElementById("shirtModelIndexView2_0").name;
				sendComponentStylesView2Index[1] = document.getElementById("shirtModelIndexView2_1").name;
				sendComponentStylesView2Index[2] = document.getElementById("shirtModelIndexView2_2").name;
				sendComponentStylesView2Index[3] = document.getElementById("shirtModelIndexView2_3").name;
				sendComponentStylesView2Index[4] = document.getElementById("shirtModelIndexView2_6").name;
			
				var queryString = "?updateCategory=" + updateCategory +
													"&selectedOption=" + selectedOption +
													"&selectedFabric=" + selectedFabric +
													"&optionMode=" + optionMode +
													"&sendComponentStylesView1Index0=" + sendComponentStylesView1Index[0] +
													"&sendComponentStylesView1Index1=" + sendComponentStylesView1Index[1] +
													"&sendComponentStylesView1Index2=" + sendComponentStylesView1Index[2] +
													"&sendComponentStylesView1Index3=" + sendComponentStylesView1Index[3] +
													"&sendComponentStylesView1Index4=" + sendComponentStylesView1Index[4] +
													"&sendComponentStylesView1Index5=" + sendComponentStylesView1Index[5] +
													"&sendComponentStylesView1Index6=" + sendComponentStylesView1Index[6] +
													"&sendComponentStylesView1Index7=" + sendComponentStylesView1Index[7] +
													"&sendComponentStylesView1Index8=" + sendComponentStylesView1Index[8] +
													"&sendComponentStylesView1Index9=" + sendComponentStylesView1Index[9] +
													"&sendComponentStylesView1Index10=" + sendComponentStylesView1Index[10] +
													"&sendComponentStylesView1Index11=" + sendComponentStylesView1Index[11] +
													"&sendComponentStylesView2Index0=" + sendComponentStylesView2Index[0] +
													"&sendComponentStylesView2Index1=" + sendComponentStylesView2Index[1] +
													"&sendComponentStylesView2Index2=" + sendComponentStylesView2Index[2] +
													"&sendComponentStylesView2Index3=" + sendComponentStylesView2Index[3] +
													"&sendComponentStylesView2Index4=" + sendComponentStylesView2Index[4];
			}
			else if(document.getElementById("shirtModelIndexView1_2").name == 'short' && document.getElementById("shirtModelIndexView1_3").name != 'nopocket' && document.getElementById("shirtModelIndexView1_4").name == 'standard')
			{
				var optionMode = 'shortSleeve_pocket_standard';
				
				View1IndexID[0] = 0;
				View1IndexID[1] = 1;
				View1IndexID[2] = 2;
				View1IndexID[3] = 3;
				View1IndexID[4] = 4;
				View1IndexID[5] = 5;
				View1IndexID[6] = 9;
				View1IndexID[7] = 11;
				View1IndexID[8] = 14;
				View1IndexID[9] = 15;
			
				var sendComponentStylesView1Index = new Array();
				sendComponentStylesView1Index[0] = document.getElementById("shirtModelIndexView1_0").name;
				sendComponentStylesView1Index[1] = document.getElementById("shirtModelIndexView1_1").name;
				sendComponentStylesView1Index[2] = document.getElementById("shirtModelIndexView1_2").name;
				sendComponentStylesView1Index[3] = document.getElementById("shirtModelIndexView1_3").name;
				sendComponentStylesView1Index[4] = document.getElementById("shirtModelIndexView1_4").name;
				sendComponentStylesView1Index[5] = document.getElementById("shirtModelIndexView1_5").name;
				sendComponentStylesView1Index[6] = document.getElementById("shirtModelIndexView1_9").name;
				sendComponentStylesView1Index[7] = document.getElementById("shirtModelIndexView1_11").name;
				sendComponentStylesView1Index[8] = document.getElementById("shirtModelIndexView1_14").name;
				sendComponentStylesView1Index[9] = document.getElementById("shirtModelIndexView1_15").name;
			
				View2IndexID[0] = 0;
				View2IndexID[1] = 1;
				View2IndexID[2] = 2;
				View2IndexID[3] = 3;
				View2IndexID[4] = 4;
				View2IndexID[5] = 5;
				View2IndexID[6] = 6;
			
				var sendComponentStylesView2Index = new Array();
				sendComponentStylesView2Index[0] = document.getElementById("shirtModelIndexView2_0").name;
				sendComponentStylesView2Index[1] = document.getElementById("shirtModelIndexView2_1").name;
				sendComponentStylesView2Index[2] = document.getElementById("shirtModelIndexView2_2").name;
				sendComponentStylesView2Index[3] = document.getElementById("shirtModelIndexView2_3").name;
				sendComponentStylesView2Index[4] = document.getElementById("shirtModelIndexView2_4").name;
				sendComponentStylesView2Index[5] = document.getElementById("shirtModelIndexView2_5").name;
				sendComponentStylesView2Index[6] = document.getElementById("shirtModelIndexView2_6").name;
			
				var queryString = "?updateCategory=" + updateCategory +
													"&selectedOption=" + selectedOption +
													"&selectedFabric=" + selectedFabric +
													"&optionMode=" + optionMode +
													"&sendComponentStylesView1Index0=" + sendComponentStylesView1Index[0] +
													"&sendComponentStylesView1Index1=" + sendComponentStylesView1Index[1] +
													"&sendComponentStylesView1Index2=" + sendComponentStylesView1Index[2] +
													"&sendComponentStylesView1Index3=" + sendComponentStylesView1Index[3] +
													"&sendComponentStylesView1Index4=" + sendComponentStylesView1Index[4] +
													"&sendComponentStylesView1Index5=" + sendComponentStylesView1Index[5] +
													"&sendComponentStylesView1Index6=" + sendComponentStylesView1Index[6] +
													"&sendComponentStylesView1Index7=" + sendComponentStylesView1Index[7] +
													"&sendComponentStylesView1Index8=" + sendComponentStylesView1Index[8] +
													"&sendComponentStylesView1Index9=" + sendComponentStylesView1Index[9] +
													"&sendComponentStylesView2Index0=" + sendComponentStylesView2Index[0] +
													"&sendComponentStylesView2Index1=" + sendComponentStylesView2Index[1] +
													"&sendComponentStylesView2Index2=" + sendComponentStylesView2Index[2] +
													"&sendComponentStylesView2Index3=" + sendComponentStylesView2Index[3] +
													"&sendComponentStylesView2Index4=" + sendComponentStylesView2Index[4] +
													"&sendComponentStylesView2Index5=" + sendComponentStylesView2Index[5] +
													"&sendComponentStylesView2Index6=" + sendComponentStylesView2Index[6];
			}
			else if(document.getElementById("shirtModelIndexView1_2").name == 'long' && document.getElementById("shirtModelIndexView1_3").name == 'nopocket' && document.getElementById("shirtModelIndexView1_4").name == 'noloops')
			{
				var optionMode = 'longSleeve_nopocket_noLoops';
				
				View1IndexID[0] = 0;
				View1IndexID[1] = 1;
				View1IndexID[2] = 2;
				View1IndexID[3] = 5;
				View1IndexID[4] = 6;
				View1IndexID[5] = 9;
				View1IndexID[6] = 10;
				View1IndexID[7] = 11;
				View1IndexID[8] = 14;
				View1IndexID[9] = 15;
			
				var sendComponentStylesView1Index = new Array();
				sendComponentStylesView1Index[0] = document.getElementById("shirtModelIndexView1_0").name;
				sendComponentStylesView1Index[1] = document.getElementById("shirtModelIndexView1_1").name;
				sendComponentStylesView1Index[2] = document.getElementById("shirtModelIndexView1_2").name;
				sendComponentStylesView1Index[3] = document.getElementById("shirtModelIndexView1_5").name;
				sendComponentStylesView1Index[4] = document.getElementById("shirtModelIndexView1_6").name;
				sendComponentStylesView1Index[5] = document.getElementById("shirtModelIndexView1_9").name;
				sendComponentStylesView1Index[6] = document.getElementById("shirtModelIndexView1_10").name;
				sendComponentStylesView1Index[7] = document.getElementById("shirtModelIndexView1_11").name;
				sendComponentStylesView1Index[8] = document.getElementById("shirtModelIndexView1_14").name;
				sendComponentStylesView1Index[9] = document.getElementById("shirtModelIndexView1_15").name;
			
				View2IndexID[0] = 0;
				View2IndexID[1] = 1;
				View2IndexID[2] = 2;
				View2IndexID[3] = 3;
			
				var sendComponentStylesView2Index = new Array();
				sendComponentStylesView2Index[0] = document.getElementById("shirtModelIndexView2_0").name;
				sendComponentStylesView2Index[1] = document.getElementById("shirtModelIndexView2_1").name;
				sendComponentStylesView2Index[2] = document.getElementById("shirtModelIndexView2_2").name;
				sendComponentStylesView2Index[3] = document.getElementById("shirtModelIndexView2_3").name;
			
				var queryString = "?updateCategory=" + updateCategory +
													"&selectedOption=" + selectedOption +
													"&selectedFabric=" + selectedFabric +
													"&optionMode=" + optionMode +
													"&sendComponentStylesView1Index0=" + sendComponentStylesView1Index[0] +
													"&sendComponentStylesView1Index1=" + sendComponentStylesView1Index[1] +
													"&sendComponentStylesView1Index2=" + sendComponentStylesView1Index[2] +
													"&sendComponentStylesView1Index3=" + sendComponentStylesView1Index[3] +
													"&sendComponentStylesView1Index4=" + sendComponentStylesView1Index[4] +
													"&sendComponentStylesView1Index5=" + sendComponentStylesView1Index[5] +
													"&sendComponentStylesView1Index6=" + sendComponentStylesView1Index[6] +
													"&sendComponentStylesView1Index7=" + sendComponentStylesView1Index[7] +
													"&sendComponentStylesView1Index8=" + sendComponentStylesView1Index[8] +
													"&sendComponentStylesView1Index9=" + sendComponentStylesView1Index[9] +
													"&sendComponentStylesView2Index0=" + sendComponentStylesView2Index[0] +
													"&sendComponentStylesView2Index1=" + sendComponentStylesView2Index[1] +
													"&sendComponentStylesView2Index2=" + sendComponentStylesView2Index[2] +
													"&sendComponentStylesView2Index3=" + sendComponentStylesView2Index[3];
			}
			else if(document.getElementById("shirtModelIndexView1_2").name == 'short' && document.getElementById("shirtModelIndexView1_3").name == 'nopocket' && document.getElementById("shirtModelIndexView1_4").name == 'noloops')
			{
				var optionMode = 'shortSleeve_nopocket_noLoops';
				
				View1IndexID[0] = 0;
				View1IndexID[1] = 1;
				View1IndexID[2] = 2;
				View1IndexID[3] = 5;
				View1IndexID[4] = 9;
				View1IndexID[5] = 11;
				View1IndexID[6] = 14;
				View1IndexID[7] = 15;
			
				var sendComponentStylesView1Index = new Array();
				sendComponentStylesView1Index[0] = document.getElementById("shirtModelIndexView1_0").name;
				sendComponentStylesView1Index[1] = document.getElementById("shirtModelIndexView1_1").name;
				sendComponentStylesView1Index[2] = document.getElementById("shirtModelIndexView1_2").name;
				sendComponentStylesView1Index[3] = document.getElementById("shirtModelIndexView1_5").name;
				sendComponentStylesView1Index[4] = document.getElementById("shirtModelIndexView1_9").name;
				sendComponentStylesView1Index[5] = document.getElementById("shirtModelIndexView1_11").name;
				sendComponentStylesView1Index[6] = document.getElementById("shirtModelIndexView1_14").name;
				sendComponentStylesView1Index[7] = document.getElementById("shirtModelIndexView1_15").name;
			
				View2IndexID[0] = 0;
				View2IndexID[1] = 1;
				View2IndexID[2] = 2;
				View2IndexID[3] = 3;
				View2IndexID[4] = 4;
				View2IndexID[5] = 5;
			
				var sendComponentStylesView2Index = new Array();
				sendComponentStylesView2Index[0] = document.getElementById("shirtModelIndexView2_0").name;
				sendComponentStylesView2Index[1] = document.getElementById("shirtModelIndexView2_1").name;
				sendComponentStylesView2Index[2] = document.getElementById("shirtModelIndexView2_2").name;
				sendComponentStylesView2Index[3] = document.getElementById("shirtModelIndexView2_3").name;
				sendComponentStylesView2Index[4] = document.getElementById("shirtModelIndexView2_4").name;
				sendComponentStylesView2Index[5] = document.getElementById("shirtModelIndexView2_5").name;
			
				var queryString = "?updateCategory=" + updateCategory +
													"&selectedOption=" + selectedOption +
													"&selectedFabric=" + selectedFabric +
													"&optionMode=" + optionMode +
													"&sendComponentStylesView1Index0=" + sendComponentStylesView1Index[0] +
													"&sendComponentStylesView1Index1=" + sendComponentStylesView1Index[1] +
													"&sendComponentStylesView1Index2=" + sendComponentStylesView1Index[2] +
													"&sendComponentStylesView1Index3=" + sendComponentStylesView1Index[3] +
													"&sendComponentStylesView1Index4=" + sendComponentStylesView1Index[4] +
													"&sendComponentStylesView1Index5=" + sendComponentStylesView1Index[5] +
													"&sendComponentStylesView1Index6=" + sendComponentStylesView1Index[6] +
													"&sendComponentStylesView1Index7=" + sendComponentStylesView1Index[7] +
													"&sendComponentStylesView2Index0=" + sendComponentStylesView2Index[0] +
													"&sendComponentStylesView2Index1=" + sendComponentStylesView2Index[1] +
													"&sendComponentStylesView2Index2=" + sendComponentStylesView2Index[2] +
													"&sendComponentStylesView2Index3=" + sendComponentStylesView2Index[3] +
													"&sendComponentStylesView2Index4=" + sendComponentStylesView2Index[4] +
													"&sendComponentStylesView2Index5=" + sendComponentStylesView2Index[5];
			}
			else if(document.getElementById("shirtModelIndexView1_2").name == 'long' && document.getElementById("shirtModelIndexView1_3").name == 'nopocket' && document.getElementById("shirtModelIndexView1_4").name == 'standard')
			{
				var optionMode = 'longSleeve_nopocket_standard';
				
				View1IndexID[0] = 0;
				View1IndexID[1] = 1;
				View1IndexID[2] = 2;
				View1IndexID[3] = 4;
				View1IndexID[4] = 5;
				View1IndexID[5] = 6;
				View1IndexID[6] = 9;
				View1IndexID[7] = 10;
				View1IndexID[8] = 11;
				View1IndexID[9] = 14;
				View1IndexID[10] = 15;
			
				var sendComponentStylesView1Index = new Array();
				sendComponentStylesView1Index[0] = document.getElementById("shirtModelIndexView1_0").name;
				sendComponentStylesView1Index[1] = document.getElementById("shirtModelIndexView1_1").name;
				sendComponentStylesView1Index[2] = document.getElementById("shirtModelIndexView1_2").name;
				sendComponentStylesView1Index[3] = document.getElementById("shirtModelIndexView1_4").name;
				sendComponentStylesView1Index[4] = document.getElementById("shirtModelIndexView1_5").name;
				sendComponentStylesView1Index[5] = document.getElementById("shirtModelIndexView1_6").name;
				sendComponentStylesView1Index[6] = document.getElementById("shirtModelIndexView1_9").name;
				sendComponentStylesView1Index[7] = document.getElementById("shirtModelIndexView1_10").name;
				sendComponentStylesView1Index[8] = document.getElementById("shirtModelIndexView1_11").name;
				sendComponentStylesView1Index[9] = document.getElementById("shirtModelIndexView1_14").name;
				sendComponentStylesView1Index[10] = document.getElementById("shirtModelIndexView1_15").name;
			
				View2IndexID[0] = 0;
				View2IndexID[1] = 1;
				View2IndexID[2] = 2;
				View2IndexID[3] = 3;
				View2IndexID[4] = 6;
			
				var sendComponentStylesView2Index = new Array();
				sendComponentStylesView2Index[0] = document.getElementById("shirtModelIndexView2_0").name;
				sendComponentStylesView2Index[1] = document.getElementById("shirtModelIndexView2_1").name;
				sendComponentStylesView2Index[2] = document.getElementById("shirtModelIndexView2_2").name;
				sendComponentStylesView2Index[3] = document.getElementById("shirtModelIndexView2_3").name;
				sendComponentStylesView2Index[4] = document.getElementById("shirtModelIndexView2_6").name;
			
				var queryString = "?updateCategory=" + updateCategory +
													"&selectedOption=" + selectedOption +
													"&selectedFabric=" + selectedFabric +
													"&optionMode=" + optionMode +
													"&sendComponentStylesView1Index0=" + sendComponentStylesView1Index[0] +
													"&sendComponentStylesView1Index1=" + sendComponentStylesView1Index[1] +
													"&sendComponentStylesView1Index2=" + sendComponentStylesView1Index[2] +
													"&sendComponentStylesView1Index3=" + sendComponentStylesView1Index[3] +
													"&sendComponentStylesView1Index4=" + sendComponentStylesView1Index[4] +
													"&sendComponentStylesView1Index5=" + sendComponentStylesView1Index[5] +
													"&sendComponentStylesView1Index6=" + sendComponentStylesView1Index[6] +
													"&sendComponentStylesView1Index7=" + sendComponentStylesView1Index[7] +
													"&sendComponentStylesView1Index8=" + sendComponentStylesView1Index[8] +
													"&sendComponentStylesView1Index9=" + sendComponentStylesView1Index[9] +
													"&sendComponentStylesView1Index10=" + sendComponentStylesView1Index[10] +
													"&sendComponentStylesView2Index0=" + sendComponentStylesView2Index[0] +
													"&sendComponentStylesView2Index1=" + sendComponentStylesView2Index[1] +
													"&sendComponentStylesView2Index2=" + sendComponentStylesView2Index[2] +
													"&sendComponentStylesView2Index3=" + sendComponentStylesView2Index[3] +
													"&sendComponentStylesView2Index4=" + sendComponentStylesView2Index[4];
			}
			else if(document.getElementById("shirtModelIndexView1_2").name == 'short' && document.getElementById("shirtModelIndexView1_3").name == 'nopocket' && document.getElementById("shirtModelIndexView1_4").name == 'standard')
			{
				var optionMode = 'shortSleeve_nopocket_standard';
				
				View1IndexID[0] = 0;
				View1IndexID[1] = 1;
				View1IndexID[2] = 2;
				View1IndexID[3] = 4;
				View1IndexID[4] = 5;
				View1IndexID[5] = 9;
				View1IndexID[6] = 11;
				View1IndexID[7] = 14;
				View1IndexID[8] = 15;
			
				var sendComponentStylesView1Index = new Array();
				sendComponentStylesView1Index[0] = document.getElementById("shirtModelIndexView1_0").name;
				sendComponentStylesView1Index[1] = document.getElementById("shirtModelIndexView1_1").name;
				sendComponentStylesView1Index[2] = document.getElementById("shirtModelIndexView1_2").name;
				sendComponentStylesView1Index[3] = document.getElementById("shirtModelIndexView1_4").name;
				sendComponentStylesView1Index[4] = document.getElementById("shirtModelIndexView1_5").name;
				sendComponentStylesView1Index[5] = document.getElementById("shirtModelIndexView1_9").name;
				sendComponentStylesView1Index[6] = document.getElementById("shirtModelIndexView1_11").name;
				sendComponentStylesView1Index[7] = document.getElementById("shirtModelIndexView1_14").name;
				sendComponentStylesView1Index[8] = document.getElementById("shirtModelIndexView1_15").name;
			
				View2IndexID[0] = 0;
				View2IndexID[1] = 1;
				View2IndexID[2] = 2;
				View2IndexID[3] = 3;
				View2IndexID[4] = 4;
				View2IndexID[5] = 5;
				View2IndexID[6] = 6;
			
				var sendComponentStylesView2Index = new Array();
				sendComponentStylesView2Index[0] = document.getElementById("shirtModelIndexView2_0").name;
				sendComponentStylesView2Index[1] = document.getElementById("shirtModelIndexView2_1").name;
				sendComponentStylesView2Index[2] = document.getElementById("shirtModelIndexView2_2").name;
				sendComponentStylesView2Index[3] = document.getElementById("shirtModelIndexView2_3").name;
				sendComponentStylesView2Index[4] = document.getElementById("shirtModelIndexView2_4").name;
				sendComponentStylesView2Index[5] = document.getElementById("shirtModelIndexView2_5").name;
				sendComponentStylesView2Index[6] = document.getElementById("shirtModelIndexView2_6").name;
			
				var queryString = "?updateCategory=" + updateCategory +
													"&selectedOption=" + selectedOption +
													"&selectedFabric=" + selectedFabric +
													"&optionMode=" + optionMode +
													"&sendComponentStylesView1Index0=" + sendComponentStylesView1Index[0] +
													"&sendComponentStylesView1Index1=" + sendComponentStylesView1Index[1] +
													"&sendComponentStylesView1Index2=" + sendComponentStylesView1Index[2] +
													"&sendComponentStylesView1Index3=" + sendComponentStylesView1Index[3] +
													"&sendComponentStylesView1Index4=" + sendComponentStylesView1Index[4] +
													"&sendComponentStylesView1Index5=" + sendComponentStylesView1Index[5] +
													"&sendComponentStylesView1Index6=" + sendComponentStylesView1Index[6] +
													"&sendComponentStylesView1Index7=" + sendComponentStylesView1Index[7] +
													"&sendComponentStylesView1Index8=" + sendComponentStylesView1Index[8] +
													"&sendComponentStylesView2Index0=" + sendComponentStylesView2Index[0] +
													"&sendComponentStylesView2Index1=" + sendComponentStylesView2Index[1] +
													"&sendComponentStylesView2Index2=" + sendComponentStylesView2Index[2] +
													"&sendComponentStylesView2Index3=" + sendComponentStylesView2Index[3] +
													"&sendComponentStylesView2Index4=" + sendComponentStylesView2Index[4] +
													"&sendComponentStylesView2Index5=" + sendComponentStylesView2Index[5] +
													"&sendComponentStylesView2Index6=" + sendComponentStylesView2Index[6];
			}
		}
		else if(selectedOption == 'base')
		{			
			View1IndexID[0] = 0;
			View1IndexID[1] = 1;
			View1IndexID[2] = 2;
		
			var sendComponentStylesView1Index = new Array();
			sendComponentStylesView1Index[0] = document.getElementById("shirtModelIndexView1_0").name;
			sendComponentStylesView1Index[1] = document.getElementById("shirtModelIndexView1_1").name;
			sendComponentStylesView1Index[2] = document.getElementById("shirtModelIndexView1_2").name;
		
			View2IndexID[0] = 0;
			View2IndexID[1] = 1;
			View2IndexID[2] = 3;
		
			var sendComponentStylesView2Index = new Array();
			sendComponentStylesView2Index[0] = document.getElementById("shirtModelIndexView2_0").name;
			sendComponentStylesView2Index[1] = document.getElementById("shirtModelIndexView2_1").name;
			sendComponentStylesView2Index[2] = document.getElementById("shirtModelIndexView2_3").name;
		
			var queryString = "?updateCategory=" + updateCategory +
												"&selectedOption=" + selectedOption +
												"&selectedFabric=" + selectedFabric +
												"&sendComponentStylesView1Index0=" + sendComponentStylesView1Index[0] +
												"&sendComponentStylesView1Index1=" + sendComponentStylesView1Index[1] +
												"&sendComponentStylesView1Index2=" + sendComponentStylesView1Index[2] +
												"&sendComponentStylesView2Index0=" + sendComponentStylesView2Index[0] +
												"&sendComponentStylesView2Index1=" + sendComponentStylesView2Index[1] +
												"&sendComponentStylesView2Index2=" + sendComponentStylesView2Index[2];
		}
		else if(selectedOption == 'collar')
		{
			View1IndexID[0] = 14;
			View1IndexID[1] = 15;
		
			var sendComponentStylesView1Index = new Array();
			sendComponentStylesView1Index[0] = document.getElementById("shirtModelIndexView1_14").name;
			sendComponentStylesView1Index[1] = document.getElementById("shirtModelIndexView1_15").name;
		
			View2IndexID[0] = 2;
		
			var sendComponentStylesView2Index = new Array();
			sendComponentStylesView2Index[0] = document.getElementById("shirtModelIndexView2_2").name;
		
			var queryString = "?updateCategory=" + updateCategory +
												"&selectedOption=" + selectedOption +
												"&selectedFabric=" + selectedFabric +
												"&sendComponentStylesView1Index0=" + sendComponentStylesView1Index[0] +
												"&sendComponentStylesView1Index1=" + sendComponentStylesView1Index[1] +
												"&sendComponentStylesView2Index0=" + sendComponentStylesView2Index[0];
		}
		else if(selectedOption == 'inner_collar')
		{
			View1IndexID[0] = 15;
		
			var sendComponentStylesView1Index = new Array();
			sendComponentStylesView1Index[0] = document.getElementById("shirtModelIndexView1_15").name;
				
			var queryString = "?updateCategory=" + updateCategory +
												"&selectedOption=" + selectedOption +
												"&selectedFabric=" + selectedFabric +
												"&sendComponentStylesView1Index0=" + sendComponentStylesView1Index[0];
		}
		else if(selectedOption == 'placket')
		{
			View1IndexID[0] = 11;
		
			var sendComponentStylesView1Index = new Array();
			sendComponentStylesView1Index[0] = document.getElementById("shirtModelIndexView1_11").name;
				
			var queryString = "?updateCategory=" + updateCategory +
												"&selectedOption=" + selectedOption +
												"&selectedFabric=" + selectedFabric +
												"&sendComponentStylesView1Index0=" + sendComponentStylesView1Index[0];
		}
		else if(selectedOption == 'pocket')
		{
			View1IndexID[0] = 3;
		
			var sendComponentStylesView1Index = new Array();
			sendComponentStylesView1Index[0] = document.getElementById("shirtModelIndexView1_3").name;
				
			var queryString = "?updateCategory=" + updateCategory +
												"&selectedOption=" + selectedOption +
												"&selectedFabric=" + selectedFabric +
												"&sendComponentStylesView1Index0=" + sendComponentStylesView1Index[0];
		}
		else if(selectedOption == 'yoke')
		{
			View2IndexID[0] = 1;
			
			var sendComponentStylesView2Index = new Array();
			sendComponentStylesView2Index[0] = document.getElementById("shirtModelIndexView2_1").name;
				
			var queryString = "?updateCategory=" + updateCategory +
												"&selectedOption=" + selectedOption +
												"&selectedFabric=" + selectedFabric +
												"&sendComponentStylesView2Index0=" + sendComponentStylesView2Index[0];
		}
		else if(selectedOption == 'cuffs')
		{
			View1IndexID[0] = 5;
			View1IndexID[1] = 6;
			View1IndexID[2] = 9;
			View1IndexID[3] = 10;
		
			var sendComponentStylesView1Index = new Array();
			sendComponentStylesView1Index[0] = document.getElementById("shirtModelIndexView1_5").name;
			sendComponentStylesView1Index[1] = document.getElementById("shirtModelIndexView1_6").name;
			sendComponentStylesView1Index[2] = document.getElementById("shirtModelIndexView1_9").name;
			sendComponentStylesView1Index[3] = document.getElementById("shirtModelIndexView1_10").name;
				
			var queryString = "?updateCategory=" + updateCategory +
												"&selectedOption=" + selectedOption +
												"&selectedFabric=" + selectedFabric +
												"&sendComponentStylesView1Index0=" + sendComponentStylesView1Index[0] +
												"&sendComponentStylesView1Index1=" + sendComponentStylesView1Index[1] +
												"&sendComponentStylesView1Index2=" + sendComponentStylesView1Index[2] +
												"&sendComponentStylesView1Index3=" + sendComponentStylesView1Index[3];
		}
		else if(selectedOption == 'right_cuff')
		{
			View1IndexID[0] = 9;
			View1IndexID[1] = 10;
		
			var sendComponentStylesView1Index = new Array();
			sendComponentStylesView1Index[0] = document.getElementById("shirtModelIndexView1_9").name;
			sendComponentStylesView1Index[1] = document.getElementById("shirtModelIndexView1_10").name;
				
			var queryString = "?updateCategory=" + updateCategory +
												"&selectedOption=" + selectedOption +
												"&selectedFabric=" + selectedFabric +
												"&sendComponentStylesView1Index0=" + sendComponentStylesView1Index[0] +
												"&sendComponentStylesView1Index1=" + sendComponentStylesView1Index[1];
		}
		else if(selectedOption == 'left_cuff')
		{
			View1IndexID[0] = 5;
			View1IndexID[1] = 6;
		
			var sendComponentStylesView1Index = new Array();
			sendComponentStylesView1Index[0] = document.getElementById("shirtModelIndexView1_5").name;
			sendComponentStylesView1Index[1] = document.getElementById("shirtModelIndexView1_6").name;
				
			var queryString = "?updateCategory=" + updateCategory +
												"&selectedOption=" + selectedOption +
												"&selectedFabric=" + selectedFabric +
												"&sendComponentStylesView1Index0=" + sendComponentStylesView1Index[0] +
												"&sendComponentStylesView1Index1=" + sendComponentStylesView1Index[1];
		}
		else if(selectedOption == 'inner_cuffs')
		{
			View1IndexID[0] = 6;
			View1IndexID[1] = 10;
		
			var sendComponentStylesView1Index = new Array();
			sendComponentStylesView1Index[0] = document.getElementById("shirtModelIndexView1_6").name;
			sendComponentStylesView1Index[1] = document.getElementById("shirtModelIndexView1_10").name;
				
			var queryString = "?updateCategory=" + updateCategory +
												"&selectedOption=" + selectedOption +
												"&selectedFabric=" + selectedFabric +
												"&sendComponentStylesView1Index0=" + sendComponentStylesView1Index[0] +
												"&sendComponentStylesView1Index1=" + sendComponentStylesView1Index[1];
		}
		else if(selectedOption == 'inner_right_cuff')
		{
			View1IndexID[0] = 10;
		
			var sendComponentStylesView1Index = new Array();
			sendComponentStylesView1Index[0] = document.getElementById("shirtModelIndexView1_10").name;
				
			var queryString = "?updateCategory=" + updateCategory +
												"&selectedOption=" + selectedOption +
												"&selectedFabric=" + selectedFabric +
												"&sendComponentStylesView1Index0=" + sendComponentStylesView1Index[0];
		}
		else if(selectedOption == 'inner_left_cuff')
		{
			View1IndexID[0] = 6;
		
			var sendComponentStylesView1Index = new Array();
			sendComponentStylesView1Index[0] = document.getElementById("shirtModelIndexView1_6").name;
				
			var queryString = "?updateCategory=" + updateCategory +
												"&selectedOption=" + selectedOption +
												"&selectedFabric=" + selectedFabric +
												"&sendComponentStylesView1Index0=" + sendComponentStylesView1Index[0];
		}
		else if(selectedOption == 'short_sleeve_endings')
		{
			View1IndexID[0] = 5;
			View1IndexID[1] = 9;
		
			var sendComponentStylesView1Index = new Array();
			sendComponentStylesView1Index[0] = document.getElementById("shirtModelIndexView1_5").name;
			sendComponentStylesView1Index[1] = document.getElementById("shirtModelIndexView1_9").name;
			
			View2IndexID[0] = 4;
			View2IndexID[1] = 5;
		
			var sendComponentStylesView2Index = new Array();
			sendComponentStylesView2Index[0] = document.getElementById("shirtModelIndexView2_4").name;
			sendComponentStylesView2Index[1] = document.getElementById("shirtModelIndexView2_5").name;
				
			var queryString = "?updateCategory=" + updateCategory +
												"&selectedOption=" + selectedOption +
												"&selectedFabric=" + selectedFabric +
												"&sendComponentStylesView1Index0=" + sendComponentStylesView1Index[0] +
												"&sendComponentStylesView1Index1=" + sendComponentStylesView1Index[1] +
												"&sendComponentStylesView2Index0=" + sendComponentStylesView2Index[0] +
												"&sendComponentStylesView2Index1=" + sendComponentStylesView2Index[1];
		}
		else if(selectedOption == 'left_short_sleeve_ending')
		{
			View1IndexID[0] = 5;
		
			var sendComponentStylesView1Index = new Array();
			sendComponentStylesView1Index[0] = document.getElementById("shirtModelIndexView1_5").name;
			
			View2IndexID[0] = 4;
		
			var sendComponentStylesView2Index = new Array();
			sendComponentStylesView2Index[0] = document.getElementById("shirtModelIndexView2_4").name;
				
			var queryString = "?updateCategory=" + updateCategory +
												"&selectedOption=" + selectedOption +
												"&selectedFabric=" + selectedFabric +
												"&sendComponentStylesView1Index0=" + sendComponentStylesView1Index[0] +
												"&sendComponentStylesView2Index0=" + sendComponentStylesView2Index[0];
		}
		else if(selectedOption == 'right_short_sleeve_ending')
		{
			View1IndexID[0] = 9;
		
			var sendComponentStylesView1Index = new Array();
			sendComponentStylesView1Index[0] = document.getElementById("shirtModelIndexView1_9").name;
			
			View2IndexID[0] = 5;
		
			var sendComponentStylesView2Index = new Array();
			sendComponentStylesView2Index[0] = document.getElementById("shirtModelIndexView2_5").name;
				
			var queryString = "?updateCategory=" + updateCategory +
												"&selectedOption=" + selectedOption +
												"&selectedFabric=" + selectedFabric +
												"&sendComponentStylesView1Index0=" + sendComponentStylesView1Index[0] +
												"&sendComponentStylesView2Index0=" + sendComponentStylesView2Index[0];
		}
		else if(selectedOption == 'shoulder_loops')
		{
			View1IndexID[0] = 4;
		
			var sendComponentStylesView1Index = new Array();
			sendComponentStylesView1Index[0] = document.getElementById("shirtModelIndexView1_4").name;
			
			View2IndexID[0] = 6;
			
			var sendComponentStylesView2Index = new Array();
			sendComponentStylesView2Index[0] = document.getElementById("shirtModelIndexView2_6").name;
				
			var queryString = "?updateCategory=" + updateCategory +
												"&selectedOption=" + selectedOption +
												"&selectedFabric=" + selectedFabric +
												"&sendComponentStylesView1Index0=" + sendComponentStylesView1Index[0] +
												"&sendComponentStylesView2Index0=" + sendComponentStylesView2Index[0];
		}
	}
	else if(updateCategory == 'design')
	{
		var selectedComponent = document.getElementById("design_selection_photo").name;
		var selectedComponentStyle = document.getElementById("design_selection_photo").title;
		
		if(selectedComponent == 'collar')
		{
			View1IndexID[0] = 14;
			View1IndexID[1] = 15;
			View1IndexID[2] = 16;
			View1IndexID[3] = 17;
			
			var sendComponentFabricsView1Index = new Array();
			sendComponentFabricsView1Index[0] = document.getElementById("shirtModelIndexView1_14").title;
			sendComponentFabricsView1Index[1] = document.getElementById("shirtModelIndexView1_15").title;
			sendComponentFabricsView1Index[2] = document.getElementById("shirtModelIndexView1_16").title;
			sendComponentFabricsView1Index[3] = document.getElementById("shirtModelIndexView1_17").title;
		
			var queryString = "?updateCategory=" + updateCategory +
												"&selectedComponent=" + selectedComponent +
												"&selectedComponentStyle=" + selectedComponentStyle +
												"&sendComponentFabricsView1Index0=" + sendComponentFabricsView1Index[0] +
												"&sendComponentFabricsView1Index1=" + sendComponentFabricsView1Index[1] +
												"&sendComponentFabricsView1Index2=" + sendComponentFabricsView1Index[2] +
												"&sendComponentFabricsView1Index3=" + sendComponentFabricsView1Index[3];
		}
		else if(selectedComponent == 'cuffs')
		{
			View1IndexID[0] = 5;
			View1IndexID[1] = 6;
			View1IndexID[2] = 7;
			View1IndexID[3] = 8;			
			
			var sendComponentFabricsView1Index = new Array();
			sendComponentFabricsView1Index[0] = document.getElementById("shirtModelIndexView1_5").title;
			sendComponentFabricsView1Index[1] = document.getElementById("shirtModelIndexView1_6").title;
			sendComponentFabricsView1Index[2] = document.getElementById("shirtModelIndexView1_16").title;
			sendComponentFabricsView1Index[3] = document.getElementById("shirtModelIndexView1_17").title;
		
			var queryString = "?updateCategory=" + updateCategory +
												"&selectedComponent=" + selectedComponent +
												"&selectedComponentStyle=" + selectedComponentStyle +
												"&sendComponentFabricsView1Index0=" + sendComponentFabricsView1Index[0] +
												"&sendComponentFabricsView1Index1=" + sendComponentFabricsView1Index[1] +
												"&sendComponentFabricsView1Index2=" + sendComponentFabricsView1Index[2] +
												"&sendComponentFabricsView1Index3=" + sendComponentFabricsView1Index[3];
		}
		else if(selectedComponent == 'shortSleeveEndings')
		{
			View1IndexID[0] = 5;
			View1IndexID[1] = 9;
		
			var sendComponentFabricsView1Index = new Array();
			sendComponentFabricsView1Index[0] = document.getElementById("shirtModelIndexView1_5").title;
			sendComponentFabricsView1Index[1] = document.getElementById("shirtModelIndexView1_9").title;
			
			View2IndexID[0] = 4;
			View2IndexID[1] = 5;
			
			var sendComponentFabricsView2Index = new Array();
			sendComponentFabricsView2Index[0] = document.getElementById("shirtModelIndexView2_4").title;
			sendComponentFabricsView2Index[1] = document.getElementById("shirtModelIndexView2_5").title;
			
			var queryString = "?updateCategory=" + updateCategory +
												"&selectedComponent=" + selectedComponent +
												"&selectedComponentStyle=" + selectedComponentStyle +
												"&sendComponentFabricsView1Index0=" + sendComponentFabricsView1Index[0] +
												"&sendComponentFabricsView1Index1=" + sendComponentFabricsView1Index[1] +
												"&sendComponentFabricsView2Index0=" + sendComponentFabricsView2Index[0] +
												"&sendComponentFabricsView2Index1=" + sendComponentFabricsView2Index[1];
		}
		else if(selectedComponent == 'yoke')
		{
			View2IndexID[0] = 1;
		
			var sendComponentFabricsView2Index = new Array();
			sendComponentFabricsView2Index[0] = document.getElementById("shirtModelIndexView2_1").title;
		
			var queryString = "?updateCategory=" + updateCategory +
												"&selectedComponent=" + selectedComponent +
												"&selectedComponentStyle=" + selectedComponentStyle +
												"&sendComponentFabricsView2Index0=" + sendComponentFabricsView2Index[0];
		}
		else if(selectedComponent == 'backCut')
		{
			var exceptionBaseStyle = document.getElementById("shirtModelIndexView1_0").name;

			View2IndexID[0] = 0;
		
			var sendComponentFabricsView2Index = new Array();
			sendComponentFabricsView2Index[0] = document.getElementById("shirtModelIndexView2_0").title;
		
			var queryString = "?updateCategory=" + updateCategory +
												"&selectedComponent=" + selectedComponent +
												"&selectedComponentStyle=" + selectedComponentStyle +
												"&exceptionBaseStyle=" + exceptionBaseStyle +
												"&sendComponentFabricsView2Index0=" + sendComponentFabricsView2Index[0];
		}
		else if(selectedComponent == 'bottomCut')
		{
			var exceptionBackStyle = document.getElementById("shirtModelIndexView2_0").name;

			View1IndexID[0] = 0;
		
			var sendComponentFabricsView1Index = new Array();
			sendComponentFabricsView1Index[0] = document.getElementById("shirtModelIndexView1_0").title;
			
			View2IndexID[0] = 0;
			
			var sendComponentFabricsView2Index = new Array();
			sendComponentFabricsView2Index[0] = document.getElementById("shirtModelIndexView2_0").title;
		
			var queryString = "?updateCategory=" + updateCategory +
												"&selectedComponent=" + selectedComponent +
												"&selectedComponentStyle=" + selectedComponentStyle +
												"&exceptionBackStyle=" + exceptionBackStyle +
												"&sendComponentFabricsView1Index0=" + sendComponentFabricsView1Index[0] +
												"&sendComponentFabricsView2Index0=" + sendComponentFabricsView2Index[0];
		}
		else if(selectedComponent == 'placket')
		{
			View1IndexID[0] = 11;
			View1IndexID[1] = 12;
			View1IndexID[2] = 13;
		
			var sendComponentFabricsView1Index = new Array();
			
			sendComponentFabricsView1Index[0] = document.getElementById("shirtModelIndexView1_11").title;
			sendComponentFabricsView1Index[1] = document.getElementById("shirtModelIndexView1_17").title;
			sendComponentFabricsView1Index[2] = document.getElementById("shirtModelIndexView1_16").title;
			
			var queryString = "?updateCategory=" + updateCategory +
												"&selectedComponent=" + selectedComponent +
												"&selectedComponentStyle=" + selectedComponentStyle +
												"&sendComponentFabricsView1Index0=" + sendComponentFabricsView1Index[0] +
												"&sendComponentFabricsView1Index1=" + sendComponentFabricsView1Index[1] +
												"&sendComponentFabricsView1Index2=" + sendComponentFabricsView1Index[2];
		}
		else if(selectedComponent == 'pocket')
		{
			View1IndexID[0] = 3;
		
			var sendComponentFabricsView1Index = new Array();
			sendComponentFabricsView1Index[0] = document.getElementById("shirtModelIndexView1_3").title;
			
			var queryString = "?updateCategory=" + updateCategory +
												"&selectedComponent=" + selectedComponent +
												"&selectedComponentStyle=" + selectedComponentStyle +
												"&sendComponentFabricsView1Index0=" + sendComponentFabricsView1Index[0];
		}
	}
	else if(updateCategory == 'details')
	{
		var selectedComponent = document.getElementById("details_selection_photo").name;
		var selectedComponentStyle = document.getElementById("details_selection_photo").title;
		
		if(selectedComponent == 'buttons')
		{
			if(document.getElementById("shirtModelIndexView1_2").name == 'long')
			{
				if(document.getElementById("shirtModelIndexView1_11").name == 'concealed')
				{
					var sleeveLength = 'long';
					var concealed = 'true';
					
					View1IndexID[0] = 7;
					View1IndexID[1] = 16;
					
					var sendComponentFabricsView1Index = new Array();
					sendComponentFabricsView1Index[0] = document.getElementById("shirtModelIndexView1_5").name;
					sendComponentFabricsView1Index[1] = document.getElementById("shirtModelIndexView1_14").name;
					
					var queryString = "?updateCategory=" + updateCategory +
														"&sleeveLength=" + sleeveLength +
														"&concealed=" + concealed +
														"&selectedComponent=" + selectedComponent +
														"&selectedComponentStyle=" + selectedComponentStyle +
														"&sendComponentFabricsView1Index0=" + sendComponentFabricsView1Index[0] +
														"&sendComponentFabricsView1Index1=" + sendComponentFabricsView1Index[1];
				}
				else
				{				
					var sleeveLength = 'long';
					var concealed = 'false';
					
					View1IndexID[0] = 7;
					View1IndexID[1] = 13;
					View1IndexID[2] = 16;
					
					var sendComponentFabricsView1Index = new Array();
					sendComponentFabricsView1Index[0] = document.getElementById("shirtModelIndexView1_5").name;
					sendComponentFabricsView1Index[1] = document.getElementById("shirtModelIndexView1_11").name;
					sendComponentFabricsView1Index[2] = document.getElementById("shirtModelIndexView1_14").name;
					
					var queryString = "?updateCategory=" + updateCategory +
														"&sleeveLength=" + sleeveLength +
														"&concealed=" + concealed +
														"&selectedComponent=" + selectedComponent +
														"&selectedComponentStyle=" + selectedComponentStyle +
														"&sendComponentFabricsView1Index0=" + sendComponentFabricsView1Index[0] +
														"&sendComponentFabricsView1Index1=" + sendComponentFabricsView1Index[1] +
														"&sendComponentFabricsView1Index2=" + sendComponentFabricsView1Index[2];
				}
			}
			else if(document.getElementById("shirtModelIndexView1_2").name == 'short')
			{
				if(document.getElementById("shirtModelIndexView1_11").name == 'concealed')
				{
					var sleeveLength = 'short';
					var concealed = 'true';
					
					View1IndexID[0] = 16;
					
					var sendComponentFabricsView1Index = new Array();
					sendComponentFabricsView1Index[0] = document.getElementById("shirtModelIndexView1_14").name;
					
					var queryString = "?updateCategory=" + updateCategory +
														"&sleeveLength=" + sleeveLength +
														"&concealed=" + concealed +
														"&selectedComponent=" + selectedComponent +
														"&selectedComponentStyle=" + selectedComponentStyle +
														"&sendComponentFabricsView1Index0=" + sendComponentFabricsView1Index[0];
				}
				else
				{
					var sleeveLength = 'short';
					var concealed = 'false';
					
					View1IndexID[0] = 13;
					View1IndexID[1] = 16;
					
					var sendComponentFabricsView1Index = new Array();
					sendComponentFabricsView1Index[0] = document.getElementById("shirtModelIndexView1_11").name;
					sendComponentFabricsView1Index[1] = document.getElementById("shirtModelIndexView1_14").name;
					
					var queryString = "?updateCategory=" + updateCategory +
														"&sleeveLength=" + sleeveLength +
														"&concealed=" + concealed +
														"&selectedComponent=" + selectedComponent +
														"&selectedComponentStyle=" + selectedComponentStyle +
														"&sendComponentFabricsView1Index0=" + sendComponentFabricsView1Index[0] +
														"&sendComponentFabricsView1Index1=" + sendComponentFabricsView1Index[1];
				}
			}
		}
		else if(selectedComponent == 'buttonholes')
		{
			if(document.getElementById("shirtModelIndexView1_2").name == 'long')
			{
				if(document.getElementById("shirtModelIndexView1_11").name == 'concealed')
				{
					var sleeveLength = 'long';
					var concealed = 'true';
				
					View1IndexID[0] = 8;
					View1IndexID[1] = 17;
					
					var sendComponentFabricsView1Index = new Array();
					sendComponentFabricsView1Index[0] = document.getElementById("shirtModelIndexView1_5").name;
					sendComponentFabricsView1Index[1] = document.getElementById("shirtModelIndexView1_14").name;
					
					var queryString = "?updateCategory=" + updateCategory +
														"&sleeveLength=" + sleeveLength +
														"&concealed=" + concealed +
														"&selectedComponent=" + selectedComponent +
														"&selectedComponentStyle=" + selectedComponentStyle +
														"&sendComponentFabricsView1Index0=" + sendComponentFabricsView1Index[0] +
														"&sendComponentFabricsView1Index1=" + sendComponentFabricsView1Index[1];
				}
				else
				{
					var sleeveLength = 'long';
					var concealed = 'false';
				
					View1IndexID[0] = 8;
					View1IndexID[1] = 12;
					View1IndexID[2] = 17;
					
					var sendComponentFabricsView1Index = new Array();
					sendComponentFabricsView1Index[0] = document.getElementById("shirtModelIndexView1_5").name;
					sendComponentFabricsView1Index[1] = document.getElementById("shirtModelIndexView1_11").name;
					sendComponentFabricsView1Index[2] = document.getElementById("shirtModelIndexView1_14").name;
					
					var queryString = "?updateCategory=" + updateCategory +
														"&sleeveLength=" + sleeveLength +
														"&concealed=" + concealed +
														"&selectedComponent=" + selectedComponent +
														"&selectedComponentStyle=" + selectedComponentStyle +
														"&sendComponentFabricsView1Index0=" + sendComponentFabricsView1Index[0] +
														"&sendComponentFabricsView1Index1=" + sendComponentFabricsView1Index[1] +
														"&sendComponentFabricsView1Index2=" + sendComponentFabricsView1Index[2];
				}
			}
			else if(document.getElementById("shirtModelIndexView1_2").name == 'short')
			{
				if(document.getElementById("shirtModelIndexView1_11").name == 'concealed')
				{
					var sleeveLength = 'short';
					var concealed = 'true';
					
					View1IndexID[0] = 17;
					
					var sendComponentFabricsView1Index = new Array();
					sendComponentFabricsView1Index[0] = document.getElementById("shirtModelIndexView1_14").name;
					
					var queryString = "?updateCategory=" + updateCategory +
														"&sleeveLength=" + sleeveLength +
														"&concealed=" + concealed +
														"&selectedComponent=" + selectedComponent +
														"&selectedComponentStyle=" + selectedComponentStyle +
														"&sendComponentFabricsView1Index0=" + sendComponentFabricsView1Index[0];
				}
				else
				{
					var sleeveLength = 'short';
					var concealed = 'false';
					
					View1IndexID[0] = 12;
					View1IndexID[1] = 17;
					
					var sendComponentFabricsView1Index = new Array();
					sendComponentFabricsView1Index[0] = document.getElementById("shirtModelIndexView1_11").name;
					sendComponentFabricsView1Index[1] = document.getElementById("shirtModelIndexView1_14").name;
					
					var queryString = "?updateCategory=" + updateCategory +
														"&sleeveLength=" + sleeveLength +
														"&concealed=" + concealed +
														"&selectedComponent=" + selectedComponent +
														"&selectedComponentStyle=" + selectedComponentStyle +
														"&sendComponentFabricsView1Index0=" + sendComponentFabricsView1Index[0] +
														"&sendComponentFabricsView1Index1=" + sendComponentFabricsView1Index[1];
				}
			}
		}
		else if(selectedComponent == 'shoulderLoops')
		{
			View1IndexID[0] = 4;
		
			var sendComponentFabricsView1Index = new Array();
			sendComponentFabricsView1Index[0] = document.getElementById("shirtModelIndexView1_0").title;
			
			View2IndexID[0] = 6;
			
			var sendComponentFabricsView2Index = new Array();
			sendComponentFabricsView2Index[0] = document.getElementById("shirtModelIndexView2_0").title;
			
			var queryString = "?updateCategory=" + updateCategory +
												"&selectedComponent=" + selectedComponent +
												"&selectedComponentStyle=" + selectedComponentStyle +
												"&sendComponentFabricsView1Index0=" + sendComponentFabricsView1Index[0] +
												"&sendComponentFabricsView2Index0=" + sendComponentFabricsView2Index[0];
		}
		else if(selectedComponent == 'collarStays')
		{
			View1IndexID[0] = 18;
			
			var queryString = "?updateCategory=" + updateCategory +
												"&selectedComponent=" + selectedComponent +
												"&selectedComponentStyle=" + selectedComponentStyle;
		}
	}
	
	request.open("GET", responsePage+queryString, true);
	request.onreadystatechange = function()
	{
		if (request.readyState == 4 && request.status == 200)
		{
			var responseStringView1C = new Array();
			//var responseStringView1S = new Array();
			var responseStringView2C = new Array();
			//var responseStringView2S = new Array();
			
			var responseStringFull = request.responseText.split("#d");
			
			for(i=0; i < responseStringFull.length-1; i++)
			{
				if(responseStringFull[i].match("#v1") == "#v1")
				{
					var responseStringPart = responseStringFull[i].split("#v1");
					
					responseStringView1C = responseStringPart[0].split("#c");
					//responseStringView1S = responseStringPart[1].split("#s");
				}
				if(responseStringFull[i].match("#v2") == "#v2")
				{
					var responseStringPart = responseStringFull[i].split("#v2");
					
					responseStringView2C = responseStringPart[0].split("#c");
					//responseStringView2S = responseStringPart[1].split("#s");
				}
			}

			/*
			var responseStringFull = request.responseText.split("#v");
			
			var responseStringView1C = responseStringFull[0].split("#c");
			var responseStringView1S = responseStringFull[1].split("#s");
			
			if(responseStringFull.length == 4)
			{
				var responseStringView2C = responseStringFull[2].split("#c");
				var responseStringView2S = responseStringFull[3].split("#s");
			}
			*/
			
			if(updateCategory == 'fabric')
			{
				for(i=0; i < responseStringView1C.length-1; i++)
				{
					document.getElementById("shirtModelIndexView1_"+View1IndexID[i]).src = responseStringView1C[i];
					//document.getElementById("shirtModelIndexView1_"+View1IndexID[i]).name = responseStringView1S[i];
					document.getElementById("shirtModelIndexView1_"+View1IndexID[i]).title = selectedFabric;
				}
			
				for(i=0; i < responseStringView2C.length-1; i++)
				{
					document.getElementById("shirtModelIndexView2_"+View2IndexID[i]).src = responseStringView2C[i];
					//document.getElementById("shirtModelIndexView2_"+View2IndexID[i]).name = responseStringView2S[i];
					document.getElementById("shirtModelIndexView2_"+View2IndexID[i]).title = selectedFabric;
				}
			}
			else if(updateCategory == 'design')
			{
				for(i=0; i < responseStringView1C.length-1; i++)
				{
					document.getElementById("shirtModelIndexView1_"+View1IndexID[i]).src = responseStringView1C[i];
					//document.getElementById("shirtModelIndexView1_"+View1IndexID[i]).name = responseStringView1S[i];
					document.getElementById("shirtModelIndexView1_"+View1IndexID[i]).name = selectedComponentStyle;
				}
			
				for(i=0; i < responseStringView2C.length-1; i++)
				{
					document.getElementById("shirtModelIndexView2_"+View2IndexID[i]).src = responseStringView2C[i];
					//document.getElementById("shirtModelIndexView2_"+View2IndexID[i]).name = responseStringView2S[i];
					if(selectedComponent == "bottomCut")
					{
						document.getElementById("shirtModelIndexView2_"+View2IndexID[i]).name = exceptionBackStyle;
					}
					else
					{
						document.getElementById("shirtModelIndexView2_"+View2IndexID[i]).name = selectedComponentStyle;
					}
				}
			}
			else if(updateCategory == 'details')
			{
				if(selectedComponent == 'shoulderLoops' || selectedComponent == 'collarStays')
				{
					for(i=0; i < responseStringView1C.length-1; i++)
					{
						document.getElementById("shirtModelIndexView1_"+View1IndexID[i]).src = responseStringView1C[i];
						document.getElementById("shirtModelIndexView1_"+View1IndexID[i]).name = selectedComponentStyle;
						document.getElementById("shirtModelIndexView1_"+View1IndexID[i]).title = sendComponentFabricsView1Index[i];
					}
	
					for(i=0; i < responseStringView2C.length-1; i++)
					{
						document.getElementById("shirtModelIndexView2_"+View2IndexID[i]).src = responseStringView2C[i];
						document.getElementById("shirtModelIndexView2_"+View2IndexID[i]).name = selectedComponentStyle;
						document.getElementById("shirtModelIndexView2_"+View2IndexID[i]).title = sendComponentFabricsView2Index[i];
					}
				}
				else
				{				
					for(i=0; i < responseStringView1C.length-1; i++)
					{
						document.getElementById("shirtModelIndexView1_"+View1IndexID[i]).src = responseStringView1C[i];
						document.getElementById("shirtModelIndexView1_"+View1IndexID[i]).title = selectedComponentStyle;
						document.getElementById("shirtModelIndexView1_"+View1IndexID[i]).name = sendComponentFabricsView1Index[i];
					}
	
					for(i=0; i < responseStringView2C.length-1; i++)
					{
						document.getElementById("shirtModelIndexView2_"+View2IndexID[i]).src = responseStringView2C[i];
						document.getElementById("shirtModelIndexView2_"+View2IndexID[i]).title = selectedComponentStyle;
						document.getElementById("shirtModelIndexView2_"+View2IndexID[i]).name = sendComponentFabricsView2Index[i];
					}
				}
			}
			else if(updateCategory == 'short' || updateCategory == 'long')
			{
				for(i=0; i < responseStringView1C.length-1; i++)
				{
					document.getElementById("shirtModelIndexView1_"+View1IndexID[i]).src = responseStringView1C[i];
					document.getElementById("shirtModelIndexView1_"+View1IndexID[i]).name = switchComponentStyleView1[i];
					document.getElementById("shirtModelIndexView1_"+View1IndexID[i]).title = switchComponentFabricView1[i];
				}
			
				for(i=0; i < responseStringView2C.length-1; i++)
				{
					document.getElementById("shirtModelIndexView2_"+View2IndexID[i]).src = responseStringView2C[i];
					document.getElementById("shirtModelIndexView2_"+View2IndexID[i]).name = switchComponentStyleView2[i];
					document.getElementById("shirtModelIndexView2_"+View2IndexID[i]).title = switchComponentFabricView2[i];
				}
			}
		}
	}
	
	request.send(null);
}