//   
// Dimensions this is where one changes the dimensions for the dropdowns for order by pool size
// LOOK AT THE FIRST EXAMPLE FOR HELP ON HOW THIS IS BEING STORED
//

//
//Rectangle
//
var urlBeg = "http://www.poolsafetycover.com/cgi-bin/shopper.exe?multipreadd=action";
	//This variable is used for the end of the url
var urlEnd = "&template=pdgtemplates/plain/sc-comparison.html";
//Fill in all the Dimension (first number) example 10 x 20 you should enter 10.

//If you want to ADD a new X dimension add it here. Make sure that you add it
//create a corresponding rectDimensionY# array with the Y dimension for it. Then
//ADD that new array to the rectDimensionY array
var rectDimensionX = [8,10,12,14,15,16,17,18,20,21,22,24,25,30];

//fill in all the Corresponding Y Dimensions(second number) example 10x10 10x20 you should enter 10,20.
//var names correspond to their X value dimensionY10 is the Y dimensions for the X size pool.
var rectDimensionY8 = [8];
var rectDimensionY10 = [10,20];
var rectDimensionY12 = [12,20,24,27,28,32];
var rectDimensionY14 = [28,30,32];
var rectDimensionY15 = [30,32,34];
var rectDimensionY16 = [24,30,32,34,36,38,40,50];
var rectDimensionY17 = [34];
var rectDimensionY18 = [32,34,36,38,40,42,44,45,50];
var rectDimensionY20 = [20,36,38,40,41,44,45,50,51,60];
var rectDimensionY21 = [41];
var rectDimensionY22 = [44];
var rectDimensionY24 = [40,48,50];
var rectDimensionY25 = [45,50];
var rectDimensionY30 = [50,60];

//This is a multidimension array. This array is needed for listing all the Y dimensions. 
var rectDimensionY = [rectDimensionY8, rectDimensionY10, rectDimensionY12, rectDimensionY14, rectDimensionY15, rectDimensionY16, rectDimensionY17, rectDimensionY18, rectDimensionY20, rectDimensionY21, rectDimensionY22, rectDimensionY24, rectDimensionY25, rectDimensionY30];

//
//Rectangle - End Step
//

var rectEndStep = ["4x6","4x8","3x6","3x8"];

var rectEndStep4x6 = ["12x24","14x28","16x32","18x36","20x40"];
var rectEndStep4x8 = ["12x20","12x24","14x28","15x30","16x24","16x32","16x34","16x36","16x38","16x40","18x36","18x40","20x40","20x44","20x50","25x50"];

var rectEndStep3x6 = ["16x32","18x36"];
var rectEndStep3x8 = ["16x32","18x36","20x40"];

var rectEndStepDim = [rectEndStep4x6, rectEndStep4x8, rectEndStep3x6, rectEndStep3x8];

//
//Rectangle - Right/Left
//

var rectStepRightLeft = ["4x6 Right","4x6 Left","4x8 Right", "4x8 Left"];

var rectStepRight4x6 = ["16x32"];
var rectStepLeft4x6 = ["16x32"];
var rectStepRight4x8 = ["16x32","16x36","18x36","20x40"];
var rectStepLeft4x8 = ["16x32","16x36","18x36","20x40"];

var rectStepRightLeftDim = [rectStepRight4x6, rectStepLeft4x6, rectStepRight4x8, rectStepLeft4x8];

//
// Rectangle - offset 
//

var rectOffsetStepRightLeft = ["4x6 - 1' Left", "4x6 - 2' Left","4x6 - 1' Right","4x6 - 2' Right","4x8 - 1' Left","4x8 - 2' Left","4x8 - 3' Left","4x8 - 4' Left","4x8 - 1' Right","4x8 - 2' Right","4x8 - 3' Right","4x8 - 4' Right"];

var rectOffsetStepLeft4x61in = ["16x32"];
var rectOffsetStepLeft4x62in = ["14x28","16x32"];
var rectOffsetStepRight4x61in = ["16x32"];
var rectOffsetStepRight4x62in = ["16x32","18x36"];
var rectOffsetStepLeft4x81in = ["16x32","16x36","18x36","20x40"];
var rectOffsetStepLeft4x82in = ["14x28","16x32","16x34","16x36","18x36","18x40","20x40"];
var rectOffsetStepLeft4x83in = ["18x36"];
var rectOffsetStepLeft4x84in = ["18x36","20x40"];
var rectOffsetStepRight4x81in = ["16x32","18x36","20x40"];
var rectOffsetStepRight4x82in = ["16x32","16x34","16x36","18x36","18x40","20x40"];
var rectOffsetStepRight4x83in = ["18x36","20x40"];
var rectOffsetStepRight4x84in = ["18x36","20x40"];

var rectOffsetStepRightLeftDim = [rectOffsetStepLeft4x61in, rectOffsetStepLeft4x62in, rectOffsetStepRight4x61in, rectOffsetStepRight4x62in, rectOffsetStepLeft4x81in, rectOffsetStepLeft4x82in, rectOffsetStepLeft4x83in, rectOffsetStepLeft4x84in, rectOffsetStepRight4x81in, rectOffsetStepRight4x82in, rectOffsetStepRight4x83in, rectOffsetStepRight4x84in];

//
// Grecian - End Step
//

var grecEndStep = ["4x6", "4x8", "3'6x7", "3'9x8"];

var grecEndStep4x6 = ["16'6x32'6","16'6x35'6"];
var grecEndStep4x8 = ["16'6x32'6", "16'6x34'6","18'6x36'6","18x37","20x40","20'6x39'6","20'9x39'9"];
var grecEndStep36x7 = ["16'6x35'6"];
var grecEndStep39x8 = ["16'10x36'10"];

var grecEndStepDim = [grecEndStep4x6, grecEndStep4x8, grecEndStep36x7, grecEndStep39x8];

//
// Grecian - Right/Left
//

var grecStepRightLeft = ["4x6 - Right", "4x6 - Left", "4x8 - Right", "4x8 - Left"];

var grecStepRight4x6 = ["16'6x32'6","16'6x34'6","16'6x35'6"];
var grecStepLeft4x6 = ["16'6x32'6","16'6x34'6","16'6x35'6"];
var grecStepRight4x8 = ["19'4x35'4","19'4x38'4","19'6x37'6","20'9x39'9"];
var grecStepLeft4x8 = ["19'4x35'4","19'4x38'4","19'6x37'6","20'9x39'9"];

var grecStepRightLeftDim = [grecStepRight4x6,grecStepLeft4x6,grecStepRight4x8,grecStepLeft4x8];

//
//The following functions are called when a drop down is selected
//
//processRect(info, yIDForm) is called when the 1st drop down is picked
//it then dynamically loads the new corresponding content into the 2nd drop down

//loadPageRect(form) is called when the 2nd drop down menu is picked
//it then calls the the changePage() function that loads the page with the unique url

//
//Rectangle
//
function processRect(info, yIDForm) {
	//I assign the passed in form to a variable
	var form = info;
	//this is the ID of the <div>2nd dropdown
	var yID = yIDForm;
	//create a blank entry in the dropdown so that the onChange will work properly
	var dropDown = "<option> <\/option>";
	//Grab the selected value of the drop down
	var dropDownValue = form.rectStepXSize.options[form.rectStepXSize.selectedIndex].value;
	//iterate through all the items and add them as a option to the drop down menu
	for(i = 0; i < rectDimensionY[dropDownValue].length; i++) {
		dropDown += "<option>" + rectDimensionY[dropDownValue][i] + " ft<\/option>";
	}
	//update the 2nd dropdown menu with the new content
	document.getElementById(yID).innerHTML = "<p class=\"zeroMarg\">Height: </p><select name=\"rectYSize\" onChange=\"loadPageRect(this.form)\">" + dropDown + "<\/select>";
}
function loadPageRect(form) {
	//holds the passed in form
	var sizeForm = form;
	var xValue = form.rectStepXSize.selectedIndex-1;
	var xSizeDim = rectDimensionX[xValue];
	var ySizeDim = rectDimensionY[xValue][(form.rectYSize.selectedIndex)-1];
	var selectedSize = xSizeDim.toString() + "x" + ySizeDim.toString();
	changePage(selectedSize,"rect");
	
}

//
//Rectangle End Step
//

function processRectEndStep(info, yIDForm) {
	var form = info;
	var yID = yIDForm;
	var dropDown = "<option> <\/option>"
	var dropDownValue = form.rectEndStepXSize.options[form.rectEndStepXSize.selectedIndex].value;
	for(i = 0; i < rectEndStepDim[dropDownValue].length; i++) {
		dropDown += "<option>" + rectEndStepDim[dropDownValue][i] + " ft<\/option>";
	}
	document.getElementById(yID).innerHTML = "<select name=\"rectEndStepYSize\" onChange=\"loadPageRectEndStep(this.form)\">" + dropDown + "<\/select>";
}
function loadPageRectEndStep(form) {
	var sizeForm = form;
	var xValue = form.rectEndStepXSize.selectedIndex-1;
	var xSizeDim = rectEndStep[xValue];
	var ySizeDim = rectEndStepDim[xValue][(form.rectEndStepYSize.selectedIndex)-1];
	var selectedSize = xSizeDim.toString() + "+" + ySizeDim.toString();
	changePage(selectedSize,"rectEnd");
}

//
// Rectangle - Right/Left
//

function processRectStepRightLeft(info, yIDForm) {
	var form = info;
	var yID = yIDForm;
	var dropDown = "<option> <\/option>"
	var dropDownValue = form.rectStepRightLeftXSize.options[form.rectStepRightLeftXSize.selectedIndex].value;
	for(i = 0; i < rectStepRightLeftDim[dropDownValue].length; i++) {
		dropDown += "<option>" + rectStepRightLeftDim[dropDownValue][i] + " ft<\/option>";
	}
	document.getElementById(yID).innerHTML = "<p class=\"zeroMarg\">Pool Size: </p><select name=\"rectStepRightLeftYSize\" onChange=\"loadPageRectStepRightLeft(this.form)\">" + dropDown + "<\/select>";
}
function loadPageRectStepRightLeft(form) {
	var sizeForm = form;
	var xValue = form.rectStepRightLeftXSize.selectedIndex-1;
	var xSizeDim = rectStepRightLeft[xValue];
	var ySizeDim = rectStepRightLeftDim[xValue][(form.rectStepRightLeftYSize.selectedIndex)-1];
	var selectedSize = xSizeDim.toString() + "+" + ySizeDim.toString();
	changePage(selectedSize,"rectSide");
}

//
// Rectangle Offset
//

function processRectOffsetStep(info, yIDForm) {
	var form = info;
	var yID = yIDForm;
	var dropDown = "<option> <\/option>"
	var dropDownValue = form.rectOffsetStepXSize.options[form.rectOffsetStepXSize.selectedIndex].value;
	for(i = 0; i < rectOffsetStepRightLeftDim[dropDownValue].length; i++) {
		dropDown += "<option>" + rectOffsetStepRightLeftDim[dropDownValue][i] + "<\/option>";
	}
	document.getElementById(yID).innerHTML = "<p class=\"zeroMarg\">Pool Size: </p><select name=\"rectOffsetStepYSize\" onChange=\"loadPageRectOffsetStep(this.form)\">" + dropDown + "<\/select>";
}
function loadPageRectOffsetStep(form) {
	var sizeForm = form;
	var xValue = form.rectOffsetStepXSize.selectedIndex-1;
	var xSizeDim = rectOffsetStepRightLeft[xValue];
	var ySizeDim = rectOffsetStepRightLeftDim[xValue][(form.rectOffsetStepYSize.selectedIndex)-1];
	var selectedSize = xSizeDim.toString() + "+" + ySizeDim.toString();
	changePage(selectedSize,"rectOffset");
}

//
// Grecian EndStep
//

function processGrecEndStep(info, yIDForm) {
	var form = info;
	var yID = yIDForm;
	var dropDown = "<option> <\/option>"
	var dropDownValue = form.grecEndStepXSize.options[form.grecEndStepXSize.selectedIndex].value;
	for(i = 0; i < grecEndStepDim[dropDownValue].length; i++) {
		dropDown += "<option>" + grecEndStepDim[dropDownValue][i] + "<\/option>";
	}
	document.getElementById(yID).innerHTML = "<p class=\"zeroMarg\">Pool Size: </p><select name=\"grecEndStepYSize\" onChange=\"loadPageGrecEndStep(this.form)\">" + dropDown + "<\/select>";
}
function loadPageGrecEndStep(form) {
	var sizeForm = form;
	var xValue = form.grecEndStepXSize.selectedIndex-1;
	var xSizeDim = grecEndStep[xValue];
	var ySizeDim = grecEndStepDim[xValue][(form.grecEndStepYSize.selectedIndex)-1];
	var selectedSize = xSizeDim.toString() + "+" + ySizeDim.toString();
	changePage(selectedSize,"grecEnd");
}

//
// Grecian - Left/Right
//

function processGrecStepLeftRight(info, yIDForm) {
	var form = info;
	var yID = yIDForm;
	var dropDown = "<option> <\/option>"
	var dropDownValue = form.grecStepRightLeftXSize.options[form.grecStepRightLeftXSize.selectedIndex].value;
	for(i = 0; i < grecStepRightLeftDim[dropDownValue].length; i++) {
		dropDown += "<option>" + grecStepRightLeftDim[dropDownValue][i] + "<\/option>";
	}
	document.getElementById(yID).innerHTML = "<p class=\"zeroMarg\">Pool Size: </p><select name=\"grecStepRightLeftYSize\" onChange=\"loadPageGrecStepRightLeft(this.form)\">" + dropDown + "<\/select>";
}
function loadPageGrecStepRightLeft(form) {
	var sizeForm = form;
	var xValue = form.grecStepRightLeftXSize.selectedIndex-1;
	var xSizeDim = grecStepRightLeft[xValue];
	var ySizeDim = grecStepRightLeftDim[xValue][(form.grecStepRightLeftYSize.selectedIndex)-1];
	var selectedSize = xSizeDim.toString() + "+" + ySizeDim.toString();
	changePage(selectedSize,"grecSide");
}

//
//Purpose: Route the user to the proper page
//

//function is called in the loadPage function of the corresponding functions
//This function takes in two strings
//1st argument is the dimension of the pool

//2nd argument is the type of pool

//pooltype - corresponding name
//rect = Rectangle
//rectEnd = Rectangle with End Step
//rectSide = Rectangle with Right/Left Side Step
//rectOffset = Rectangle with Offset Step
//grecEnd = Rectangle with End Step
//grecSide = Rectangle with Right/Left Side Step

function changePage(selectedContent, poolType) {
	/*
	//This variables is used for for beginning of of the url
	var urlBeg = "http://www.poolsafetycover.com/cgi-bin/shopper.exe?multipreadd=action";
	//This variable is used for the end of the url
	var urlEnd = "&template=pdgtemplates/plain/sc-comparison.html";
	*/
	//How the URL variable's work
	//Example:
	//&pooltype=grecside&poolx=19*4&pooly=38*4&stepx=4&stepy=8&stepname=left&keys=61L31938,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA
	
	//&pooltype=rect - Outputs heading text Rectangle Outputs Rectangle Pool Image
	//&pooltype=rectoffset - Outputs heading text Rectangle Outputs Rectangle Pool with Offset step Image
	//&pooltype=rectside - Outputs heading text Rectangle Outputs Rectangle Pool with Side Steps 
	//&pooltype=rectend - Outputs heading text Rectangle Outputs Rectangle Pool with End Steps
	//&pooltype=grecend - Outputs heading text Grecian Outputs Grecian Pool with End Steps
	//&pooltype=grecside - Outputs heading text Grecian Outputs Grecian Pool with End Steps
	
	//&poolx=10*6
	//&pooly=15*6
	//Outputs pool size as 10'6x15'6
	//MUST USE * IN PLACE OF ' WHEN PLACING DIMENSIONS IN URL
	
	//&stepx=3*6
	//&stepy=6*6
	//Outputs step size as 3'6x6'6
	//MUST USE * IN PLACE OF ' WHEN PLACING DIMENSIONS IN URL
	
	//&stepname=left
	//Outputs at Left Step
	//&stepname=right
	//Outputs as Right Step
	//&stepname=end
	//Outputs as End Step
	//&stepname=1offsetright
	
	//Ouputs as 1' Offset Step Right
	//&stepname=2offsetright
	//Ouputs as 2' Offset Step Right
	//&stepname=3offsetright
	//Ouputs as 3' Offset Step Right
	//&stepname=4offsetright
	//Ouputs as 4' Offset Step Right
	
	//&stepname=1offsetleft
	//Ouputs as 1' Offset Step Left
	//&stepname=2offsetleft
	//Ouputs as 2' Offset Step Left
	//&stepname=3offsetleft
	//Ouputs as 3' Offset Step Left
	//&stepname=4offsetleft
	//Ouputs as 4' Offset Step Left
	
	//
	// Rectangle Pool
	//
	if(poolType == "rect") {
		if(selectedContent == "8x8") {
			window.location = urlBeg + "&pooltype=rect&poolx=8&pooly=8&keys=610508,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA" + urlEnd;
		}
		if(selectedContent == "10x10") {
			window.location = urlBeg + "&pooltype=rect&poolx=10&pooly=10&keys=61051010,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA" + urlEnd;
		}
		if(selectedContent == "10x20") {
			window.location = urlBeg + "&pooltype=rect&poolx=10&pooly=20&keys=61051020,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA" + urlEnd;
		}
		if(selectedContent == "12x12") {
			window.location = urlBeg + "&pooltype=rect&poolx=12&pooly=12&keys=61051212,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA" + urlEnd;
		}
		if(selectedContent == "12x20") {
			window.location = urlBeg + "&pooltype=rect&poolx=12&pooly=20&keys=NA,451220,NA,NA,NA,NA,NA,NA,801220P,NA,NA,NA,NA,NA,NA,801220,NA,NA,NA,NA,NA" + urlEnd;
		}
		if(selectedContent == "12x24") {
			window.location = urlBeg + "&pooltype=rect&poolx=12&pooly=24&keys=61051224,451224,NA,NA,NA,NA,1591224G,610099,801224P,NA,NA,NA,NA,151224GP,610041D,801224,NA,NA,NA,NA,151224GD" + urlEnd;
		}
		if(selectedContent == "12x27") {
			window.location = urlBeg + "&pooltype=rect&poolx=12&pooly=27&keys=61051227,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA" + urlEnd;
		}
		if(selectedContent == "12x28") {
			window.location = urlBeg + "&pooltype=rect&poolx=12&pooly=28&keys=61051228,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA" + urlEnd;
		}
		if(selectedContent == "12x32") {
			window.location = urlBeg + "&pooltype=rect&poolx=12&pooly=32&keys=61051232,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA" + urlEnd;
		}
		if(selectedContent == "14x28") {
			window.location = urlBeg + "&pooltype=rect&poolx=14&pooly=28&keys=61051428,451428,NA,NA,NA,NA,1591428G,610098,801428P,NA,NA,NA,NA,151428GP,610428D,801428,NA,NA,NA,NA,151428GD" + urlEnd;
		}
		if(selectedContent == "14x30") {
			window.location = urlBeg + "&pooltype=rect&poolx=14&pooly=30&keys=61051430,NA,NA,NA,NA,NA,NA,610100,NA,NA,NA,NA,NA,NA,610430D,NA,NA,NA,NA,NA,NA" + urlEnd;
		}
		if(selectedContent == "14x32") {
			window.location = urlBeg + "&pooltype=rect&poolx=14&pooly=32&keys=61051432,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA" + urlEnd;
		}
		if(selectedContent == "15x30") {
			window.location = urlBeg + "&pooltype=rect&poolx=15&pooly=30&keys=610530,451530,NA,NA,NA,SCA1530A,1591530G,610101,801530P,NA,NA,NA,NA,151530GP,610530D,801530,NA,NA,NA,NA,151530GD" + urlEnd;
		}
		if(selectedContent == "15x32") {
			window.location = urlBeg + "&pooltype=rect&poolx=15&pooly=32&keys=61051532,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA" + urlEnd;
		}
		if(selectedContent == "15x34") {
			window.location = urlBeg + "&pooltype=rect&poolx=15&pooly=34&keys=61051534,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA" + urlEnd;
		}
		if(selectedContent == "16x24") {
			window.location = urlBeg + "&pooltype=rect&poolx=16&pooly=24&keys=61051624,451624,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA" + urlEnd;
		}
		if(selectedContent == "16x30") {
			window.location = urlBeg + "&pooltype=rect&poolx=16&pooly=30&keys=61051630,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA" + urlEnd;
		}
		if(selectedContent == "16x32") {
			window.location = urlBeg + "&pooltype=rect&poolx=16&pooly=32&keys=61051632,451632,NA,MER1632A,MEY1632A,SCA1632A,1591632G,610097,801632P,NA,NA,NA,NA,151632GP,610632D,801632,NA,MER1632B,MEY1632B,SCA1632B,151632GD" + urlEnd;
		}
		if(selectedContent == "16x34") {
			window.location = urlBeg + "&pooltype=rect&poolx=16&pooly=34&keys=61051634,451634,NA,NA,NA,NA,1591634G,610102,801634P,NA,NA,NA,NA,151634GP,610634D,801634,NA,NA,NA,NA,151634GD" + urlEnd;
		}
		if(selectedContent == "16x36") {
			window.location = urlBeg + "&pooltype=rect&poolx=16&pooly=36&keys=61051636,451636,NA,NA,NA,NA,1591636G,610636,801636P,NA,NA,NA,NA,151636GP,610636D,801636,NA,NA,NA,NA,151634GD" + urlEnd;
		}
		if(selectedContent == "16x38") {
			window.location = urlBeg + "&pooltype=rect&poolx=16&pooly=38&keys=61051638,451638,NA,NA,NA,NA,1591638G,NA,801638P,NA,NA,NA,NA,151638GP,NA,801638,NA,NA,NA,NA,151634GD" + urlEnd;
		}
		if(selectedContent == "16x40") {
			window.location = urlBeg + "&pooltype=rect&poolx=16&pooly=40&keys=61051640,451640,NA,NA,NA,NA,1591640G,610096,801640P,NA,NA,NA,NA,151640GP,610640D,801640,NA,NA,NA,NA,151640GD" + urlEnd;
		}
		if(selectedContent == "16x50") {
			window.location = urlBeg + "&pooltype=rect&poolx=16&pooly=50&keys=61051650,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA" + urlEnd;
		}
		if(selectedContent == "17x34") {
			window.location = urlBeg + "&pooltype=rect&poolx=17&pooly=34&keys=61051734,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA" + urlEnd;
		}
		if(selectedContent == "18x32") {
			window.location = urlBeg + "&pooltype=rect&poolx=18&pooly=32&keys=61051832,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA" + urlEnd;
		}
		if(selectedContent == "18x34") {
			window.location = urlBeg + "&pooltype=rect&poolx=18&pooly=34&keys=61051834,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA" + urlEnd;
		}
		if(selectedContent == "18x36") {
			window.location = urlBeg + "&pooltype=rect&poolx=18&pooly=36&keys=61051836,451836,NA,MER1836A,MEY1836A,SCA1836A,1591836G,6101836,801836P,NA,NA,NA,NA,151836GP,610836D,801836,NA,MER1836B,MEY1836B,SCA1836B,151836GD" + urlEnd;
		}
		if(selectedContent == "18x38") {
			window.location = urlBeg + "&pooltype=rect&poolx=18&pooly=38&keys=61051838,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA" + urlEnd;
		}
		if(selectedContent == "18x40") {
			window.location = urlBeg + "&pooltype=rect&poolx=18&pooly=40&keys=61051840,451840,NA,NA,NA,NA,1591840G,NA,801840P,NA,NA,NA,NA,151840GP,NA,801840,NA,NA,NA,NA,151840GD" + urlEnd;
		}
		if(selectedContent == "18x42") {
			window.location = urlBeg + "&pooltype=rect&poolx=18&pooly=42&keys=61051842,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA" + urlEnd;
		}
		if(selectedContent == "18x44") {
			window.location = urlBeg + "&pooltype=rect&poolx=18&pooly=44&keys=61051844,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA" + urlEnd;
		}
		if(selectedContent == "18x45") {
			window.location = urlBeg + "&pooltype=rect&poolx=18&pooly=45&keys=61051845,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA" + urlEnd;
		}
		if(selectedContent == "18x50") {
			window.location = urlBeg + "&pooltype=rect&poolx=18&pooly=50&keys=61051850,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA" + urlEnd;
		}
		if(selectedContent == "20x20") {
			window.location = urlBeg + "&pooltype=rect&poolx=20&pooly=20&keys=61052020,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA" + urlEnd;
		}
		if(selectedContent == "20x36") {
			window.location = urlBeg + "&pooltype=rect&poolx=20&pooly=36&keys=61052036,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA" + urlEnd;
		}
		if(selectedContent == "20x38") {
			window.location = urlBeg + "&pooltype=rect&poolx=20&pooly=38&keys=61052038,NA,NA,NA,NA,NA,1592038G,NA,NA,NA,NA,NA,NA,152038GP,NA,NA,NA,NA,NA,NA,152038GD" + urlEnd;
		}
		if(selectedContent == "20x40") {
			window.location = urlBeg + "&pooltype=rect&poolx=20&pooly=40&keys=610040,452040,NA,MER2040A,MEY2040A,SCA2040A,1592040G,610095,802040P,NA,NA,NA,NA,152040GP,610940D,802040,NA,MER2040B,MEY2040B,SCA2040B,152040GD" + urlEnd;
		}
		if(selectedContent == "20x41") {
			window.location = urlBeg + "&pooltype=rect&poolx=20&pooly=41&keys=61052041,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA" + urlEnd;
		}
		if(selectedContent == "20x42") {
			window.location = urlBeg + "&pooltype=rect&poolx=20&pooly=42&keys=61052042,NA,NA,NA,NA,NA,1592042G,NA,NA,NA,NA,NA,NA,152042GP,NA,NA,NA,NA,NA,NA,152042GD" + urlEnd;
		}
		if(selectedContent == "20x44") {
			window.location = urlBeg + "&pooltype=rect&poolx=20&pooly=44&keys=61052044,452044,NA,NA,NA,NA,1592044G,610103,802044P,NA,NA,NA,NA,152044GP,610244D,802044,NA,NA,NA,NA,152044GD" + urlEnd;
		}
		if(selectedContent == "20x45") {
			window.location = urlBeg + "&pooltype=rect&poolx=20&pooly=45&keys=61052045,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA" + urlEnd;
		}
		if(selectedContent == "20x50") {
			window.location = urlBeg + "&pooltype=rect&poolx=20&pooly=50&keys=61052050,452050,NA,NA,NA,NA,1592050G,NA,802050P,NA,NA,NA,NA,152050GP,NA,802050,NA,NA,NA,NA,152050GD" + urlEnd;
		}
		if(selectedContent == "20x51") {
			window.location = urlBeg + "&pooltype=rect&poolx=20&pooly=51&keys=61052051,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA" + urlEnd;
		}
		if(selectedContent == "20x60") {
			window.location = urlBeg + "&pooltype=rect&poolx=20&pooly=60&keys=61052060,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA" + urlEnd;
		}
		if(selectedContent == "21x41") {
			window.location = urlBeg + "&pooltype=rect&poolx=21&pooly=41&keys=61052141,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA" + urlEnd;
		}
		if(selectedContent == "22x44") {
			window.location = urlBeg + "&pooltype=rect&poolx=22&pooly=44&keys=61052244,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA" + urlEnd;
		}
		if(selectedContent == "24x40") {
			window.location = urlBeg + "&pooltype=rect&poolx=24&pooly=40&keys=61052440,NA,NA,NA,NA,NA,1592440G,NA,NA,NA,NA,NA,NA,152440GP,NA,NA,NA,NA,NA,NA,152440GD" + urlEnd;
		}
		if(selectedContent == "24x48") {
			window.location = urlBeg + "&pooltype=rect&poolx=24&pooly=48&keys=61052448,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA" + urlEnd;
		}
		if(selectedContent == "24x50") {
			window.location = urlBeg + "&pooltype=rect&poolx=24&pooly=50&keys=61052450,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA" + urlEnd;
		}
		if(selectedContent == "25x45") {
			window.location = urlBeg + "&pooltype=rect&poolx=25&pooly=45&keys=61052545,452545,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA" + urlEnd;
		}
		if(selectedContent == "25x50") {
			window.location = urlBeg + "&pooltype=rect&poolx=25&pooly=50&keys=61052550,452550,NA,NA,NA,NA,1592550G,NA,NA,NA,NA,NA,NA,152550GP,NA,NA,NA,NA,NA,NA,152550GD" + urlEnd;
		}
		if(selectedContent == "30x50") {
			window.location = urlBeg + "&pooltype=rect&poolx=30&pooly=50&keys=61053050,453050,NA,NA,NA,NA,1593050G,NA,NA,NA,NA,NA,NA,153050GP,NA,NA,NA,NA,NA,NA,153050GD" + urlEnd;
		}
		if(selectedContent == "30x60") {
			window.location = urlBeg + "&pooltype=rect&poolx=30&pooly=60&keys=61053060,NA,NA,NA,NA,NA,1593060G,NA,NA,NA,NA,NA,NA,153060GP,NA,NA,NA,NA,NA,NA,153060GD" + urlEnd;
		}
	}
	
	//
	// Rectangle - End Step
	//
	
	if( poolType == "rectEnd") {
		if(selectedContent == "4x6+12x24") {
			window.location = urlBeg + "&pooltype=rectend&poolx=12&pooly=24&stepx=4&stepy=6&stepname=end&keys=60051226,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA" + urlEnd;
		}
		if(selectedContent == "4x6+14x28") {
			window.location = urlBeg + "&pooltype=rectend&poolx=14&pooly=28&stepx=4&stepy=6&stepname=end&keys=60051426,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA" + urlEnd;
		}
		if(selectedContent == "4x6+16x32") {
			window.location = urlBeg + "&pooltype=rectend&poolx=16&pooly=32&stepx=4&stepy=6&stepname=end&keys=60051636,NA,NA,NA,NA,NA,NA,610632,NA,NA,NA,NA,NA,NA,6101632A,NA,NA,NA,NA,NA,NA" + urlEnd;
		}
		if(selectedContent == "4x6+18x36") {
			window.location = urlBeg + "&pooltype=rectend&poolx=18&pooly=36&stepx=4&stepy=6&stepname=end&keys=60051834,NA,NA,NA,NA,NA,1595007G,610042,NA,NA,NA,NA,NA,155007GP,6101834D,NA,NA,NA,NA,NA,155007GD" + urlEnd;
		}		
		if(selectedContent == "4x6+20x40") {
			window.location = urlBeg + "&pooltype=rectend&poolx=20&pooly=40&stepx=4&stepy=6&stepname=end&keys=60052044,NA,NA,NA,NA,NA,1595010G,NA,NA,NA,NA,NA,NA,155010GP,NA,NA,NA,NA,NA,NA,155010GD" + urlEnd;
		}		
		if(selectedContent == "4x8+12x20") {
			window.location = urlBeg + "&pooltype=rectend&poolx=12&pooly=20&stepx=4&stepy=8&stepname=end&keys=NA,901220,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,701220,NA,NA,NA,NA,NA" + urlEnd;
		}		
		if(selectedContent == "4x8+12x24") {
			window.location = urlBeg + "&pooltype=rectend&poolx=12&pooly=24&stepx=4&stepy=8&stepname=end&keys=60051228,901224,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,701224,NA,NA,NA,NA,NA" + urlEnd;
		}		
		if(selectedContent == "4x8+14x28") {
			window.location = urlBeg + "&pooltype=rectend&poolx=14&pooly=28&stepx=4&stepy=8&stepname=end&keys=60051428,901428,NA,NA,NA,NA,NA,610634,NA,NA,NA,NA,NA,NA,6101428D,701428,NA,NA,NA,NA,NA" + urlEnd;
		}		
		if(selectedContent == "4x8+15x30") {
			window.location = urlBeg + "&pooltype=rectend&poolx=15&pooly=30&stepx=4&stepy=8&stepname=end&keys=60051530,901530,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,701530,NA,NA,NA,NA,NA" + urlEnd;
		}		
		if(selectedContent == "4x8+16x24") {
			window.location = urlBeg + "&pooltype=rectend&poolx=16&pooly=24&stepx=4&stepy=8&stepname=end&keys=60051624,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA" + urlEnd;
		}		
		if(selectedContent == "4x8+16x32") {
			window.location = urlBeg + "&pooltype=rectend&poolx=16&pooly=32&stepx=4&stepy=8&stepname=end&keys=60051635,901632,NA,MER1632D,MEY1632D,SCA1632C,1595003G,610838,NA,NA,NA,NA,NA,155003GP,6101632D,701632,NA,MER1632E,MEY1632E,SCA1632D,155003GD" + urlEnd;
		}		
		if(selectedContent == "4x8+16x34") {
			window.location = urlBeg + "&pooltype=rectend&poolx=16&pooly=34&stepx=4&stepy=8&stepname=end&keys=60051634,NA,NA,NA,NA,NA,NA,610840,NA,NA,NA,NA,NA,NA,6101634D,701634,NA,NA,NA,NA,NA" + urlEnd;
		}		
		if(selectedContent == "4x8+16x36") {
			window.location = urlBeg + "&pooltype=rectend&poolx=16&pooly=36&stepx=4&stepy=8&stepname=end&keys=60081637,901636,NA,NA,NA,NA,1595004G,610105,NA,NA,NA,NA,NA,155004GP,6101636D,701636,NA,NA,NA,NA,155004GD" + urlEnd;
		}		
		if(selectedContent == "4x8+16x38") {
			window.location = urlBeg + "&pooltype=rectend&poolx=16&pooly=38&stepx=4&stepy=8&stepname=end&keys=60051638,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,701638,NA,NA,NA,NA,NA" + urlEnd;
		}		
		if(selectedContent == "4x8+16x40") {
			window.location = urlBeg + "&pooltype=rectend&poolx=16&pooly=40&stepx=4&stepy=8&stepname=end&keys=60051640,901640,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,701640,NA,NA,NA,NA,NA" + urlEnd;
		}		
		if(selectedContent == "4x8+18x36") {
			window.location = urlBeg + "&pooltype=rectend&poolx=18&pooly=36&stepx=4&stepy=8&stepname=end&keys=60051838,901836,NA,MER1836D,MEY1632D,SCA1836C,1595008G,610836,NA,NA,NA,NA,NA,155008GP,6101836D,701836,NA,MER1836E,MEY1836E,SCA1836D,155008GD" + urlEnd;
		}		
		if(selectedContent == "4x8+18x40") {
			window.location = urlBeg + "&pooltype=rectend&poolx=18&pooly=40&stepx=4&stepy=8&stepname=end&keys=60051848,901840,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,701840,NA,NA,NA,NA,NA" + urlEnd;
		}		
		if(selectedContent == "4x8+20x40") {
			window.location = urlBeg + "&pooltype=rectend&poolx=20&pooly=40&stepx=4&stepy=8&stepname=end&keys=60052048,902040,NA,MER2040D,MEY2040D,SCA2040C,1595011G,610940,NA,NA,NA,NA,NA,155011GP,6102040D,702040,NA,MER2040E,MEY2040E,SCA2040D,155011GD" + urlEnd;
		}			
		if(selectedContent == "4x8+20x44") {
			window.location = urlBeg + "&pooltype=rectend&poolx=20&pooly=44&stepx=4&stepy=8&stepname=end&keys=NA,902044,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,702044,NA,NA,NA,NA,NA" + urlEnd;
		}	
		if(selectedContent == "4x8+20x50") {
			window.location = urlBeg + "&pooltype=rectend&poolx=20&pooly=50&stepx=4&stepy=8&stepname=end&keys=NA,902050,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,702050,NA,NA,NA,NA,NA" + urlEnd;
		}		
		if(selectedContent == "4x8+25x50") {
			window.location = urlBeg + "&pooltype=rectend&poolx=25&pooly=50&stepx=4&stepy=8&stepname=end&keys=60052550,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA" + urlEnd;
		}		
		if(selectedContent == "3x6+16x32") {
			window.location = urlBeg + "&pooltype=rectend&poolx=16&pooly=32&stepx=3&stepy=6&stepname=end&keys=60051632,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA" + urlEnd;
		}		
		if(selectedContent == "3x6+18x36") {
			window.location = urlBeg + "&pooltype=rectend&poolx=18&pooly=36&stepx=3&stepy=6&stepname=end&keys=60051836,NA,NA,NA,NA,NA,1595005G,NA,NA,NA,NA,NA,NA,155005GP,NA,NA,NA,NA,NA,NA,155005GD" + urlEnd;
		}		
		if(selectedContent == "3x8+16x32") {
			window.location = urlBeg + "&pooltype=rectend&poolx=16&pooly=32&stepx=3&stepy=8&stepname=end&keys=60051633,NA,NA,NA,NA,NA,1595001G,NA,NA,NA,NA,NA,NA,155001GP,NA,NA,NA,NA,NA,NA,155001GD" + urlEnd;
		}		
		if(selectedContent == "3x8+18x36") {
			window.location = urlBeg + "&pooltype=rectend&poolx=18&pooly=36&stepx=3&stepy=8&stepname=end&keys=60051833,NA,NA,NA,NA,NA,1595006G,610041,NA,NA,NA,NA,NA,155006GP,6101833D,NA,NA,NA,NA,NA,155006GD" + urlEnd;
		}		
		if(selectedContent == "3x8+20x40") {
			window.location = urlBeg + "&pooltype=rectend&poolx=20&pooly=40&stepx=3&stepy=8&stepname=end&keys=60052040,NA,NA,NA,NA,NA,1595009G,NA,NA,NA,NA,NA,NA,155009GP,NA,NA,NA,NA,NA,NA,155009GD" + urlEnd;
		}
	}
	
	//
	//Rectangle - Right/Left
	//
	
	if(poolType == "rectSide") {
		if(selectedContent == "4x6 Right+16x32") {
			window.location = urlBeg + "&pooltype=rectside&poolx=16&pooly=32&stepx=4&stepy=6&stepname=right&keys=6151632R,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA" + urlEnd;
		}
		if(selectedContent == "4x6 Left+16x32") {
			window.location = urlBeg + "&pooltype=rectside&poolx=16&pooly=32&stepx=4&stepy=6&stepname=left&keys=6151632L,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA" + urlEnd;
		}
		if(selectedContent == "4x8 Right+16x32") {
			window.location = urlBeg + "&pooltype=rectside&poolx=16&pooly=32&stepx=4&stepy=8&stepname=right&keys=6151638R,NA,NA,NA,NA,NA,1596103G,610122,NA,NA,NA,NA,NA,156103GP,610040D,NA,NA,NA,NA,NA,NA" + urlEnd;
		}
		if(selectedContent == "4x8 Right+16x36") {
			window.location = urlBeg + "&pooltype=rectside&poolx=16&pooly=36&stepx=4&stepy=8&stepname=right&keys=6151634R,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA" + urlEnd;
		}
		if(selectedContent == "4x8 Right+18x36") {
			window.location = urlBeg + "&pooltype=rectside&poolx=18&pooly=36&stepx=4&stepy=8&stepname=right&keys=6151836R,NA,NA,NA,NA,NA,1596113G,610107,NA,NA,NA,NA,NA,156113GP,610043D,NA,NA,NA,NA,NA,NA" + urlEnd;
		}
		if(selectedContent == "4x8 Right+20x40") {
			window.location = urlBeg + "&pooltype=rectside&poolx=20&pooly=40&stepx=4&stepy=8&stepname=right&keys=6152040R,NA,NA,NA,NA,NA,1596123G,610109,NA,NA,NA,NA,NA,156123GP,610045D,NA,NA,NA,NA,NA,NA" + urlEnd;
		}
		if(selectedContent == "4x8 Left+16x32") {
			window.location = urlBeg + "&pooltype=rectside&poolx=16&pooly=32&stepx=4&stepy=8&stepname=left&keys=6151638L,NA,NA,NA,NA,NA,1596000G,610121,NA,NA,NA,NA,NA,156101GP,610042D,NA,NA,NA,NA,NA,NA" + urlEnd;
		}
		if(selectedContent == "4x8 Left+16x36") {
			window.location = urlBeg + "&pooltype=rectside&poolx=16&pooly=36&stepx=4&stepy=8&stepname=left&keys=6151634L,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA" + urlEnd;
		}
		if(selectedContent == "4x8 Left+18x36") {
			window.location = urlBeg + "&pooltype=rectside&poolx=18&pooly=36&stepx=4&stepy=8&stepname=left&keys=6151836L,NA,NA,NA,NA,NA,1596001G,NA,NA,NA,NA,NA,NA,156111GP,610044D,NA,NA,NA,NA,NA,NA" + urlEnd;
		}
		if(selectedContent == "4x8 Left+20x40") {
			window.location = urlBeg + "&pooltype=rectside&poolx=20&pooly=40&stepx=4&stepy=8&stepname=left&keys=6152040L,NA,NA,NA,NA,NA,1596002G,610110,NA,NA,NA,NA,NA,156121GP,610046D,NA,NA,NA,NA,NA,NA" + urlEnd;
		}
		
	}
	
	//
	//Rectangle Offset Step
	//
	
	if(poolType == "rectOffset") {
		if(selectedContent == "4x6 - 1' Left+16x32") {
			window.location = urlBeg + "&pooltype=rectoffset&poolx=16&pooly=32&stepx=4&stepy=6&stepname=1offsetleft&keys=65011632,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA" + urlEnd;
		}
		if(selectedContent == "4x6 - 2' Left+14x28") {
			window.location = urlBeg + "&pooltype=rectoffset&poolx=14&pooly=28&stepx=4&stepy=6&stepname=2offsetleft&keys=65011424,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA" + urlEnd;
		}
		if(selectedContent == "4x6 - 2' Left+16x32") {
			window.location = urlBeg + "&pooltype=rectoffset&poolx=16&pooly=32&stepx=4&stepy=6&stepname=2offsetleft&keys=65011631,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA" + urlEnd;
		}
		if(selectedContent == "4x6 - 1' Right+16x32") {
			window.location = urlBeg + "&pooltype=rectoffset&poolx=16&pooly=32&stepx=4&stepy=6&stepname=1offsetright&keys=64011632,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA" + urlEnd;
		}
		if(selectedContent == "4x6 - 2' Right+16x32") {
			window.location = urlBeg + "&pooltype=rectoffset&poolx=16&pooly=32&stepx=4&stepy=6&stepname=2offsetright&keys=64011631,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA" + urlEnd;
		}
		if(selectedContent == "4x6 - 2' Right+18x36") {
			window.location = urlBeg + "&pooltype=rectoffset&poolx=16&pooly=32&stepx=4&stepy=6&stepname=2offsetright&keys=64011835,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA" + urlEnd;
		}
		if(selectedContent == "4x8 - 1' Left+16x32") {
			window.location = urlBeg + "&pooltype=rectoffset&poolx=16&pooly=32&stepx=4&stepy=8&stepname=1offsetleft&keys=65011634,NA,NA,NA,NA,NA,1597000G,610123L,NA,NA,NA,NA,NA,157100GP,601632D,NA,NA,NA,NA,NA,NA" + urlEnd;
		}
		if(selectedContent == "4x8 - 1' Left+16x36") {
			window.location = urlBeg + "&pooltype=rectoffset&poolx=16&pooly=36&stepx=4&stepy=8&stepname=1offsetleft&keys=65011638,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA" + urlEnd;
		}
		if(selectedContent == "4x8 - 1' Left+18x36") {
			window.location = urlBeg + "&pooltype=rectoffset&poolx=18&pooly=36&stepx=4&stepy=8&stepname=1offsetleft&keys=65011836,NA,NA,NA,NA,NA,1597001G,610124L,NA,NA,NA,NA,NA,157110GP,601836D,NA,NA,NA,NA,NA,NA" + urlEnd;
		}
		if(selectedContent == "4x8 - 1' Left+20x40") {
			window.location = urlBeg + "&pooltype=rectoffset&poolx=20&pooly=40&stepx=4&stepy=8&stepname=1offsetleft&keys=65012040,NA,NA,NA,NA,NA,1597002G,610125L,NA,NA,NA,NA,NA,157120GP,601040D,NA,NA,NA,NA,NA,NA" + urlEnd;
		}
		if(selectedContent == "4x8 - 2' Left+14x28") {
			window.location = urlBeg + "&pooltype=rectoffset&poolx=14&pooly=28&stepx=4&stepy=8&stepname=2offsetleft&keys=65011428,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA" + urlEnd;
		}
		if(selectedContent == "4x8 - 2' Left+16x32") {
			window.location = urlBeg + "&pooltype=rectoffset&poolx=16&pooly=32&stepx=4&stepy=8&stepname=2offsetleft&keys=65011633,NA,NA,NA,NA,NA,1597200G,610112,NA,NA,NA,NA,NA,157200GP,610047D,NA,NA,NA,NA,NA,NA" + urlEnd;
		}
		if(selectedContent == "4x8 - 2' Left+16x34") {
			window.location = urlBeg + "&pooltype=rectoffset&poolx=16&pooly=34&stepx=4&stepy=8&stepname=2offsetleft&keys=65011635,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA" + urlEnd;
		}
		if(selectedContent == "4x8 - 2' Left+16x36") {
			window.location = urlBeg + "&pooltype=rectoffset&poolx=16&pooly=36&stepx=4&stepy=8&stepname=2offsetleft&keys=65011637,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA" + urlEnd;
		}
		if(selectedContent == "4x8 - 2' Left+18x36") {
			window.location = urlBeg + "&pooltype=rectoffset&poolx=18&pooly=36&stepx=4&stepy=8&stepname=2offsetleft&keys=65011639,NA,NA,NA,NA,NA,1597210G,610114,NA,NA,NA,NA,NA,157210GP,610048D,NA,NA,NA,NA,NA,NA" + urlEnd;
		}
		if(selectedContent == "4x8 - 2' Left+18x40") {
			window.location = urlBeg + "&pooltype=rectoffset&poolx=18&pooly=40&stepx=4&stepy=8&stepname=2offsetleft&keys=65011840,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA" + urlEnd;
		}
		if(selectedContent == "4x8 - 2' Left+20x40") {
			window.location = urlBeg + "&pooltype=rectoffset&poolx=20&pooly=40&stepx=4&stepy=8&stepname=2offsetleft&keys=65012048,NA,NA,NA,NA,NA,1597220G,610116,NA,NA,NA,NA,NA,157220GP,602040D,NA,NA,NA,NA,NA,NA" + urlEnd;
		}
		if(selectedContent == "4x8 - 3' Left+18x36") {
			window.location = urlBeg + "&pooltype=rectoffset&poolx=18&pooly=36&stepx=4&stepy=8&stepname=3offsetleft&keys=65011841,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA" + urlEnd;
		}
		if(selectedContent == "4x8 - 4' Left+18x36") {
			window.location = urlBeg + "&pooltype=rectoffset&poolx=18&pooly=36&stepx=4&stepy=8&stepname=4offsetleft&keys=65011842,NA,NA,NA,NA,NA,NA,610126L,NA,NA,NA,NA,NA,NA,601834D,NA,NA,NA,NA,NA,NA" + urlEnd;
		}
		if(selectedContent == "4x8 - 4' Left+20x40") {
			window.location = urlBeg + "&pooltype=rectoffset&poolx=20&pooly=40&stepx=4&stepy=8&stepname=4offsetleft&keys=65012044,NA,NA,NA,NA,NA,NA,610127L,NA,NA,NA,NA,NA,NA,602048D,NA,NA,NA,NA,NA,NA" + urlEnd;
		}
		if(selectedContent == "4x8 - 1' Right+16x32") {
			window.location = urlBeg + "&pooltype=rectoffset&poolx=16&pooly=32&stepx=4&stepy=8&stepname=1offsetright&keys=64011634,NA,NA,NA,NA,NA,1597110G,610123R,NA,NA,NA,NA,NA,157101GP,601632R,NA,NA,NA,NA,NA,NA" + urlEnd;
		}
		if(selectedContent == "4x8 - 1' Right+18x36") {
			window.location = urlBeg + "&pooltype=rectoffset&poolx=18&pooly=36&stepx=4&stepy=8&stepname=1offsetright&keys=64011836,NA,NA,NA,NA,NA,1597111G,610124R,NA,NA,NA,NA,NA,157111GP,601836R,NA,NA,NA,NA,NA,NA" + urlEnd;
		}
		if(selectedContent == "4x8 - 1' Right+20x40") {
			window.location = urlBeg + "&pooltype=rectoffset&poolx=20&pooly=40&stepx=4&stepy=8&stepname=1offsetright&keys=64012040,NA,NA,NA,NA,NA,1597121G,610125R,NA,NA,NA,NA,NA,157121GP,601040R,NA,NA,NA,NA,NA,NA" + urlEnd;
		}
		if(selectedContent == "4x8 - 2' Right+16x32") {
			window.location = urlBeg + "&pooltype=rectoffset&poolx=16&pooly=32&stepx=4&stepy=8&stepname=2offsetright&keys=64011633,NA,NA,NA,NA,NA,1597201G,610111,NA,NA,NA,NA,NA,157201GP,610047R,NA,NA,NA,NA,NA,NA" + urlEnd;
		}
		if(selectedContent == "4x8 - 2' Right+16x34") {
			window.location = urlBeg + "&pooltype=rectoffset&poolx=16&pooly=34&stepx=4&stepy=8&stepname=2offsetright&keys=64011635,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA" + urlEnd;
		}
		if(selectedContent == "4x8 - 2' Right+16x36") {
			window.location = urlBeg + "&pooltype=rectoffset&poolx=16&pooly=36&stepx=4&stepy=8&stepname=2offsetright&keys=64011637,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA" + urlEnd;
		}
		if(selectedContent == "4x8 - 2' Right+18x36") {
			window.location = urlBeg + "&pooltype=rectoffset&poolx=18&pooly=36&stepx=4&stepy=8&stepname=2offsetright&keys=64011839,NA,NA,NA,NA,NA,1597211G,610113,NA,NA,NA,NA,NA,157211GP,610048R,NA,NA,NA,NA,NA,NA" + urlEnd;
		}
		if(selectedContent == "4x8 - 2' Right+18x40") {
			window.location = urlBeg + "&pooltype=rectoffset&poolx=18&pooly=40&stepx=4&stepy=8&stepname=2offsetright&keys=64011840,NA,NA,NA,NA,NA,1597221G,NA,NA,NA,NA,NA,NA,157221GP,NA,NA,NA,NA,NA,NA,NA" + urlEnd;
		}
		if(selectedContent == "4x8 - 2' Right+20x40") {
			window.location = urlBeg + "&pooltype=rectoffset&poolx=20&pooly=40&stepx=4&stepy=8&stepname=2offsetright&keys=64012048,NA,NA,NA,NA,NA,NA,610115,NA,NA,NA,NA,NA,NA,602040R,NA,NA,NA,NA,NA,NA" + urlEnd;
		}
		if(selectedContent == "4x8 - 3' Right+18x36") {
			window.location = urlBeg + "&pooltype=rectoffset&poolx=18&pooly=36&stepx=4&stepy=8&stepname=3offsetright&keys=64011841,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA" + urlEnd;
		}
		if(selectedContent == "4x8 - 3' Right+20x40") {
			window.location = urlBeg + "&pooltype=rectoffset&poolx=20&pooly=40&stepx=4&stepy=8&stepname=3offsetright&keys=64012020,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA" + urlEnd;
		}
		if(selectedContent == "4x8 - 4' Right+18x36") {
			window.location = urlBeg + "&pooltype=rectoffset&poolx=18&pooly=36&stepx=4&stepy=8&stepname=4offsetright&keys=64011842,NA,NA,NA,NA,NA,NA,610126R,NA,NA,NA,NA,NA,NA,601834R,NA,NA,NA,NA,NA,NA" + urlEnd;
		}
		if(selectedContent == "4x8 - 4' Right+20x40") {
			window.location = urlBeg + "&pooltype=rectoffset&poolx=20&pooly=40&stepx=4&stepy=8&stepname=4offsetright&keys=64012044,NA,NA,NA,NA,NA,NA,610127R,NA,NA,NA,NA,NA,NA,602048R,NA,NA,NA,NA,NA,NA" + urlEnd;
		}
	}
	
	//
	//Grecian End Step
	//
	
	if(poolType == "grecEnd") {
		if(selectedContent == "4x6+16'6x32'6") {
			window.location = urlBeg + "&pooltype=grecend&poolx=16*6&pooly=32*6&stepx=4&stepy=8&stepname=end&keys=63011630,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA" + urlEnd;
		}
		if(selectedContent == "4x6+16'6x32'6") {
			window.location = urlBeg + "&pooltype=grecend&poolx=16*6&pooly=32*6&stepx=4&stepy=6&stepname=end&keys=63011630,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA" + urlEnd;
		}
		if(selectedContent == "4x6+16'6x35'6") {
			window.location = urlBeg + "&pooltype=grecend&poolx=16*6&pooly=35*6&stepx=4&stepy=6&stepname=end&keys=63011632,NA,NA,NA,NA,NA,1598001G,610117,NA,NA,NA,NA,NA,158001GP,610049D,NA,NA,NA,NA,NA,158001GD" + urlEnd;
		}
		if(selectedContent == "4x8+16'6x32'6") {
			window.location = urlBeg + "&pooltype=grecend&poolx=16*6&pooly=32*6&stepx=4&stepy=8&stepname=end&keys=63011636,NA,NA,NA,NA,NA,1598000G,NA,NA,NA,NA,NA,NA,158000GP,NA,NA,NA,NA,NA,NA,158000GD" + urlEnd;
		}
		if(selectedContent == "4x8+16'6x34'6") {
			window.location = urlBeg + "&pooltype=grecend&poolx=16*6&pooly=34*6&stepx=4&stepy=8&stepname=end&keys=63011634,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA" + urlEnd;
		}
		if(selectedContent == "4x8+16'6x36'6") {
			window.location = urlBeg + "&pooltype=grecend&poolx=16*6&pooly=36*6&stepx=4&stepy=8&stepname=end&keys=63011838,NA,NA,MER1836G,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA" + urlEnd;
		}
		if(selectedContent == "4x8+18x36") {
			window.location = urlBeg + "&pooltype=grecend&poolx=18&pooly=36&stepx=4&stepy=8&stepname=end&keys=63011836,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA" + urlEnd;
		}
		if(selectedContent == "4x8+18x37") {
			window.location = urlBeg + "&pooltype=grecend&poolx=18&pooly=37&stepx=4&stepy=8&stepname=end&keys=63011837,NA,NA,NA,MEY1837G,NA,NA,610130,NA,NA,NA,NA,NA,NA,610062D,NA,NA,NA,MEY1837H,NA,NA" + urlEnd;
		}
		if(selectedContent == "4x8+20x40") {
			window.location = urlBeg + "&pooltype=grecend&poolx=20&pooly=40&stepx=4&stepy=8&stepname=end&keys=63012040,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA" + urlEnd;
		}
		if(selectedContent == "4x8+20'6x39'6") {
			window.location = urlBeg + "&pooltype=grecend&poolx=20*6&pooly=39*6&stepx=4&stepy=8&stepname=end&keys=NA,NA,NA,NA,MEY2039G,NA,1598004G,NA,NA,NA,NA,NA,NA,158004GP,NA,NA,NA,NA,MEY2039H,SCA2039F,158004GD" + urlEnd;
		}
		if(selectedContent == "4x8+20'9x39'9") {
			window.location = urlBeg + "&pooltype=grecend&poolx=20*9&pooly=39*9&stepx=4&stepy=8&stepname=end&keys=63012039,NA,NA,MER2039G,NA,NA,NA,610119,NA,NA,NA,NA,NA,NA,610063D,NA,NA,MER2039H,NA,NA,NA" + urlEnd;
		}
		if(selectedContent == "3'6x7+16'6x35'6") {
			window.location = urlBeg + "&pooltype=grecend&poolx=16*6&pooly=35*6&stepx=3*6&stepy=7&stepname=end&keys=63011635,NA,NA,NA,NA,NA,NA,610129,NA,NA,NA,NA,NA,NA,610060D,NA,NA,NA,NA,NA,NA" + urlEnd;
		}
		if(selectedContent == "3'9x8+16'10x36'10") {
			window.location = urlBeg + "&pooltype=grecend&poolx=16*10&pooly=36*10&stepx=3*9&stepy=8&stepname=end&keys=63011633,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA" + urlEnd;
		}
	}
	
	//
	//Grecian Side Step
	//
	
	if(poolType = "grecSide") {
		if(selectedContent == "4x6 - Right+16'6x32'6") {
			window.location = urlBeg + "&pooltype=grecside&poolx=16*6&pooly=32*6&stepx=4&stepy=6&stepname=right&keys=61R31630,NA,NA,NA,NA,NA,1599102G,NA,NA,NA,NA,NA,NA,159102GP,NA,NA,NA,NA,NA,NA,NA" + urlEnd;
		}
		if(selectedContent == "4x6 - Right+16'6x34'6") {
			window.location = urlBeg + "&pooltype=grecside&poolx=16*6&pooly=34*6&stepx=4&stepy=6&stepname=right&keys=61R31634,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA" + urlEnd;
		}
		if(selectedContent == "4x6 - Right+16'6x35'6") {
			window.location = urlBeg + "&pooltype=grecside&poolx=16*6&pooly=35*6&stepx=4&stepy=6&stepname=right&keys=61R31635,NA,NA,NA,NA,NA,1599202G,NA,NA,NA,NA,NA,NA,159202GP,NA,NA,NA,NA,NA,NA,NA" + urlEnd;
		}
		if(selectedContent == "4x6 - Left+16'6x32'6") {
			window.location = urlBeg + "&pooltype=grecside&poolx=16*6&pooly=32*6&stepx=4&stepy=6&stepname=left&keys=61L31630,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA" + urlEnd;
		}
		if(selectedContent == "4x6 - Left+16'6x34'6") {
			window.location = urlBeg + "&pooltype=grecside&poolx=16*6&pooly=34*6&stepx=4&stepy=6&stepname=left&keys=61L31634,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA" + urlEnd;
		}
		if(selectedContent == "4x6 - Left+16'6x35'6") {
			window.location = urlBeg + "&pooltype=grecside&poolx=16*6&pooly=35*6&stepx=4&stepy=6&stepname=left&keys=61L31635,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA" + urlEnd;
		}
		if(selectedContent == "4x8 - Right+19'4x35'4") {
			window.location = urlBeg + "&pooltype=grecside&poolx=19*4&pooly=35*4&stepx=4&stepy=8&stepname=right&keys=61R31935,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA" + urlEnd;
		}
		if(selectedContent == "4x8 - Right+19'4x38'4") {
			window.location = urlBeg + "&pooltype=grecside&poolx=19*4&pooly=38*4&stepx=4&stepy=8&stepname=right&keys=61R31938,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA" + urlEnd;
		}
		if(selectedContent == "4x8 - Right+19'6x37'6") {
			window.location = urlBeg + "&pooltype=grecside&poolx=19*6&pooly=37*6&stepx=4&stepy=8&stepname=right&keys=61R31937,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA" + urlEnd;
		}
		if(selectedContent == "4x8 - Right+20'9x39'9") {
			window.location = urlBeg + "&pooltype=grecside&poolx=20*9&pooly=39*9&stepx=4&stepy=8&stepname=right&keys=61R32039,NA,NA,NA,NA,NA,1599402G,NA,NA,NA,NA,NA,NA,159402GP,NA,NA,NA,NA,NA,NA,NA" + urlEnd;
		}
		if(selectedContent == "4x8 - Left+19'4x35'4") {
			window.location = urlBeg + "&pooltype=grecside&poolx=19*4&pooly=35*4&stepx=4&stepy=8&stepname=left&keys=61L31935,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA" + urlEnd;
		}
		if(selectedContent == "4x8 - Left+19'4x38'4") {
			window.location = urlBeg + "&pooltype=grecside&poolx=19*4&pooly=38*4&stepx=4&stepy=8&stepname=left&keys=61L31938,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA" + urlEnd;
		}
		if(selectedContent == "4x8 - Left+19'6x37'6") {
			window.location = urlBeg + "&pooltype=grecside&poolx=19*6&pooly=37*6&stepx=4&stepy=8&stepname=left&keys=61L31937,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA" + urlEnd;
		}
		if(selectedContent == "4x8 - Left+20'9x39'9") {
			window.location = urlBeg + "&pooltype=grecside&poolx=20*9&pooly=39*9&stepx=4&stepy=8&stepname=left&keys=61L32039,NA,NA,NA,NA,NA,1599003G,NA,NA,NA,NA,NA,NA,159400GP,NA,NA,NA,NA,NA,NA,NA" + urlEnd;
		}
	}
}