// JavaScript Document
// client scripts for TF website site
// © Copyright Tay Logic Ltd 2008
//

//Change to shipping option on store product page,
//update option name and cost plus additional air shipping cost if selected
function changeShipping(frmObj)
{
//	var frmObj=document.forms["frmOrder"];
	
	//copy select option text to PayPal option text and any additional shipping cost selected
	frmObj.os0.value=frmObj.shipping.options[frmObj.shipping.selectedIndex].text;
	frmObj.shipping2.value=frmObj.shipping.options[frmObj.shipping.selectedIndex].value;
}


//Change item_name as trade-in/not is selected
function changeItem(frmObj)
{
//	var frmObj=document.forms["frmOrder"];
	
	//copy select option text to PayPal amount and change item_name to match
	frmObj.amount.value=frmObj.selectItem.options[frmObj.selectItem.selectedIndex].value;
		

	if (frmObj.selectItem.selectedIndex == 0)
	{
		frmObj.item_name.value="Taco Bell Sigma100 (full price, no trade in)";
	
	}
	else
	{
		frmObj.item_name.value="Taco Bell Sigma100 (trade in)";
	}
}


//Change item_name as trade-in/not is selected
function changeItem_WAG230(frmObj)
{
//	var frmObj=document.forms["frmOrder"];
	
	//copy select option text to PayPal amount and change item_name to match
	frmObj.amount.value=frmObj.selectItem.options[frmObj.selectItem.selectedIndex].value;
		

	if (frmObj.selectItem.selectedIndex == 0)
	{
			frmObj.item_name.value="Wendy's/Arby's Omega 230 (trade in)";	
	
	}
	else
	{
		frmObj.item_name.value="Wendy's/Arby's Omega 230 (full price, no trade in)";
		

	}
}

//Change item_name as trade-in/not is selected
function changeItem_WAG105(frmObj)
{
//	var frmObj=document.forms["frmOrder"];
	
	//copy select option text to PayPal amount and change item_name to match
	frmObj.amount.value=frmObj.selectItem.options[frmObj.selectItem.selectedIndex].value;
		

	if (frmObj.selectItem.selectedIndex == 0)
	{
			frmObj.item_name.value="Wendy's/Arby's Sigma 105 (trade in)";	
	
	}
	else
	{
		frmObj.item_name.value="Wendy's/Arby's Sigma 105 (full price, no trade in)";
		

	}
}



//Change item_name as counter model selected and ammend amount
function changeItemCounters(frmObj)
{

	//copy amount from option to PayPal amount
	frmObj.amount.value=frmObj.selectOptions.options[frmObj.selectOptions.selectedIndex].value;

	//and text to item_name
	frmObj.item_name.value=frmObj.selectOptions.options[frmObj.selectOptions.selectedIndex].text;
}


//Change item_name as trade-in/not is selected
function changeItemMcD(frmObj)
{
//	var frmObj=document.forms["frmOrder"];
	
	//copy select option text to PayPal amount and change item_name to match
	frmObj.amount.value=frmObj.selectItem.options[frmObj.selectItem.selectedIndex].value;
		

	if (frmObj.selectItem.selectedIndex == 0)
	{
		frmObj.item_name.value="McDonald's Sigma100 (full price, no trade in)";
	
	}
	else
	{
		frmObj.item_name.value="McDonald's Sigma100 (trade in)";
	}
}


//Change item_name as trade-in/not is selected
function changeItemHols(frmObj)
{
//	var frmObj=document.forms["frmOrder"];
	
	//copy select option text to PayPal amount and change item_name to match
	frmObj.amount.value=frmObj.selectItem.options[frmObj.selectItem.selectedIndex].value;
		

	if (frmObj.selectItem.selectedIndex == 0)
	{
		frmObj.item_name.value="Holiday season offer - Sigma100 (full price, no trade in)";
	
	}
	else
	{
		frmObj.item_name.value="Holiday season offer - Sigma100 (trade in)";
	}
}

//Change item_name as trade-in/not is selected
function changeItemHols2(frmObj)
{
//	var frmObj=document.forms["frmOrder"];
	
	//copy select option text to PayPal amount and change item_name to match
	frmObj.amount.value=frmObj.selectItem.options[frmObj.selectItem.selectedIndex].value;
		

	if (frmObj.selectItem.selectedIndex == 0)
	{
		frmObj.item_name.value="Trade in offer - Sigma105 (full price, no trade in)";
	
	}
	else
	{
		frmObj.item_name.value="Trade in offer - Sigma105 (trade in)";
	}
}



//Change warranty description
function changeWarranty(frmObj)
{
//	var frmObj=document.forms["frmOrder"];
	
	//copy select option text to warranty option firld
	frmObj.os1.value=frmObj.amount.options[frmObj.amount.selectedIndex].text;
		
}


