var orderform;
var itemname;
var itemnumber;
var itemdescription;
var itemcost;

function initializeForm()
{
	if (document.paypal)
	{
		
		orderform = document.paypal;
		
		if (orderform.itemname)
		{
			if (orderform.itemname.value)
			{
				itemname = orderform.itemname.value;
				itemcost = orderform.amount.value;
				updateForm();
				updateFormPlus();
			}
		}
	}
}

function additionalItemChecks(strOptionValue)
{
	if (itemname == "Ttime T-shirt")
	{
		if (strOptionValue == "White")
		{
			orderform.amount.value = "19.00";
			itemcost = orderform.amount.value;
			orderform.os1.value = "White";

		}
		if (strOptionValue == "Black")
		{
			orderform.amount.value = "21.00";
			itemcost = orderform.amount.value;
			orderform.os1.value= "Black";

		}
		if (strOptionValue == "Navy Blue")
		{
			orderform.amount.value = "21.00";
			itemcost = orderform.amount.value;
			orderform.os1.value= "Navy Blue";

		}
		if (strOptionValue == "Asphalt")
		{
			orderform.amount.value = "21.00";
			itemcost = orderform.amount.value;
			orderform.os1.value= "Asphalt";

		}
		if (strOptionValue == "Plum")
		{
			orderform.amount.value = "24.00";
			itemcost = orderform.amount.value;
			orderform.os1.value= "Plum";

		}
		if (strOptionValue == "Pink")
		{
			orderform.amount.value = "24.00";
			itemcost = orderform.amount.value;
			orderform.os1.value= "Pink";

		}
		if (strOptionValue == "Chartreuse")
		{
			orderform.amount.value = "24.00";
			itemcost = orderform.amount.value;
			orderform.os1.value= "Chartreuse";

		}
		if (strOptionValue == "Blue")
		{
			orderform.amount.value = "24.00";
			itemcost = orderform.amount.value;
			orderform.os1.value= "Blue";

		}
		if (strOptionValue == "XL-White")
		{
			orderform.amount.value = "21.00";
			itemcost = orderform.amount.value;
			orderform.os1.value = "White";

		}
		if (strOptionValue == "XL-Black")
		{
			orderform.amount.value = "23.00";
			itemcost = orderform.amount.value;
			orderform.os1.value= "Black";

		}
		if (strOptionValue == "XL-Navy Blue")
		{
			orderform.amount.value = "23.00";
			itemcost = orderform.amount.value;
			orderform.os1.value= "Navy Blue";

		}
		if (strOptionValue == "XL-Asphalt")
		{
			orderform.amount.value = "23.00";
			itemcost = orderform.amount.value;
			orderform.os1.value= "Asphalt";

		}
		if (strOptionValue == "XL-Plum")
		{
			orderform.amount.value = "26.00";
			itemcost = orderform.amount.value;
			orderform.os1.value= "Plum";

		}
		if (strOptionValue == "XL-Pink")
		{
			orderform.amount.value = "26.00";
			itemcost = orderform.amount.value;
			orderform.os1.value= "Pink";

		}
		if (strOptionValue == "XL-Chartreuse")
		{
			orderform.amount.value = "26.00";
			itemcost = orderform.amount.value;
			orderform.os1.value= "Chartreuse";

		}
	orderform.item_number.value = itemnumber;
	}
}

function updateForm()
{
	itemcost = orderform.amount.value;
	itemnumber = itemname;

		if (orderform.option1.value.length > 0)
		{
			additionalItemChecks(orderform.option1.value);
		}

}

function updateFormPlus()
{
	itemcost = orderform.amount.value;
	itemnumber = itemname;

		if (orderform.color2.value.length > 0)
		{
			additionalItemChecks(orderform.color2.value);
		}

}

