﻿<!-- Begin Change Value In Paypal Form
// Copyright Maxbal Genealogy 2007 - All rights reserved
// This script may not be used without permission

// Updates price and item number in PaypPal form depending on option selected
// and validates that an item has been selcted

function UpdateItemCode(form)
{

// Blank Charts Page 1 Code

 valid = true;
 price = 4;
 qty = form.os0.selectedIndex;
 
if ( qty == 0 )
   		{
        	alert ( "Please select the length of chart from the dropdown box." );
        	valid = false;
    	}
else    {
			form.amount.value = price * qty;
		}

if ( form.handling_cart.selectedIndex == 0 )
   		{
        	alert ( "Please select the postage zone from the dropdown box.");
        	valid = false;
    	}

if (form.item_name.value == "Working Chart 20 Generations")
  		{
 		  form.item_number.value = "C-WORK-20";
  		}
if (form.item_name.value == "Working Chart 15 Generations")
  		{
 		  form.item_number.value = "C-WORK-15";
  		}
return valid
}

// End -->
