// place this code in head section before any other script or js files
// insert the function call to fnCheckPD(); in the ComputeForm function
//	after the 	if (form.Quantity[3].checked){form.pgsubtotal.value = 779.00;} line
// add the call onclick="ComputeForm(this.form)" in the input statement for promotion_code

var aryPD=Array();
function fnCheckPD()
{
return;
	var obj=document.getElementById('promotion_code');
	var ckCode=obj.value.toLowerCase();
	var dte1=new Date();
	if(aryPD[ckCode])
	{
		var dte2=new Date(parseInt(aryPD[ckCode].expdate.substr(6,4)),parseInt(aryPD[ckCode].expdate.substr(0,2)),parseInt(aryPD[ckCode].expdate.substr(4,2)));
		var days=dte2-dte1;
		if(days>0){document.getElementById('pgsubtotal').value=parseInt(document.getElementById('pgsubtotal').value)-parseInt(aryPD[ckCode].amount)+".00";}
	}	
}
function fnConstrPD(expdate,amount)
{
	this.expdate=expdate;
	this.amount=amount;
}

// code and expdate are enclosed in single quotes - amount is not enclosed in quotes
// enter the code as lowerCase
//aryPD['code']=new fnConstrPD("expriration date",discount amount); //annotated syntax
aryPD['referral']=new fnConstrPD("12-31-2010",20.00);  // actual syntax
aryPD['referral50']=new fnConstrPD("12-31-2010",50.00);  // actual syntax
aryPD['letter']=new fnConstrPD("12-31-2010",20.00);  // actual syntax
aryPD['letter50']=new fnConstrPD("12-31-2010",50.00);  // actual syntax
aryPD['letter30']=new fnConstrPD("12-31-2010",30.00);  // actual syntax
aryPD['web50']=new fnConstrPD("12-31-2010",50.00);  // actual syntax
aryPD['relief']=new fnConstrPD("12-31-2010",50.00);  // actual syntax
aryPD['superclean']=new fnConstrPD("12-31-2010",50.00);  // actual syntax
aryPD['gift50']=new fnConstrPD("12-31-2010",50.00);  // actual syntax
aryPD['yahoo403']=new fnConstrPD("12-31-2010",50.00);  // actual syntax
aryPD['shipping']=new fnConstrPD("12-31-2010",8.50);  // actual syntax
aryPD['july2009']=new fnConstrPD("12-31-2010",20.00);  // actual syntax
aryPD['manager20']=new fnConstrPD("12-31-2010",20.00);  // actual syntax
aryPD['thanks09']=new fnConstrPD("12-31-2010",20.00);  // actual syntax
