// important dates
var NEXT_EXAM="June 9, 2012";
var LAST_EXAM="December 3, 2011";

// shipping costs
var SHIPPING_CD=15;					// how much to ship a CD
var SHIPPING_CRP=30;				// how much to ship a years worth of CRP CD's
var SHIPPING_PFP_FULL=30;			// how much to ship a new PFP manual
var SHIPPING_PFP_SUBSCRIPTION=40;	// how much to ship 4 updates of the PFP manual
var SHIPPING_PFP_SINGLE=10;			// how much to ship a single update of the PFP manual
var SHIPPING_EXPRESS_CD=10;			// how much is express shipping of a CD
var SHIPPING_EXPRESS_PFP=25;		// how much is express shipping of a PFP Manual

// study aid product prices
var COL_FULL=175;//145;					// collection of 1,000 questions
var COL_DISCOUNTED=123.25;
var STRATEGIC_CASE_FULL=155;		// strategic case studies
var STRATEGIC_CASE_DISCOUNTED=123.25;
var FINCALC_FULL=95;				// financial calculations for the financial planner
var FINCALC_DISCOUNTED=80.75;
var TECHNIQUES_FULL=95;				// exam writing techniques
var TECHNIQUES_DISCOUNTED=80.75;

var FPE2_STRATEGIC_COURSE=350;		// FPE2 study aid

// retirement planning software prices
var CRP_FULL=325;					// initial purchase of retirement planners software
var CRP_DEMO=0;						// demo version
var CRP_RENEWALL=265;				// yearly renewall of subscriptions
var CRP_PERSONAL=95;				// personal addition with 1 plan only
var CRP_PLANS=200;					// 10 additional retirement plans @ $20 each
var CRP_EACH_PLAN=20;				// individual plans are $20 each

// course prices
var EXAM_PREP_COURSE=540;//590;			// 540 590 // exam prep course
var EXAM_PREP_POSTPONED=100;
var CASE_COURSE=270;//295;				// 270 295 // case study course
var CASE_POSTPONED=100;
var FPE2_PREP_COURSE=590;//540;			//540 590 // FPE2 2-day prep course

// PFP Manual prices
var PFP_MANUAL_FULL=345;//295;			// full PFP Manual
var PFP_MANUAL_DISCOUNTED=250.75;	// discounted for previous purchaser
var PFP_MANUAL_SINGLE=60;			// single update only
var PFP_ELECTRONIC_SUBSCRIPTION=195;	// yearly subscription service for the electronic version of the manual (this is the renewal price, or what people pay to switch to electronic)
var PFP_MANUAL_SUBSCRIPTION=215;	// yearly subscription service (4 single updates)
var PFP_MANUAL_CONTENTS=215;		// complete contents of latest version
var PFP_4_INDIVIDUAL_UPDATES=245;   // 4 individual updates of the PFP manual, sold in continue education (or also known as Current Developments)

// mohawk courses
var MOHAWK_COURSE1_ELECTRONIC=85;
var MOHAWK_COURSE1_PRINTED=115;
var MOHAWK_COURSE2_ELECTRONIC=85;
var MOHAWK_COURSE2_PRINTED=115;

// packages (discounts)
var PURCHASECOLCASE=30;
var PURCHASECOLCASEFIN=40;
var PURCHASECOLCASETECH=40;
var PURCHASE4DISCOUNT=100;
var PURCHASE5DISCOUNT=120;

// course dates
var TOCOURSE1="Saturday & Sunday, May 26 & 27, 2012";//Saturday & Sunday, May 28 & 29, 2011";
var TOCOURSE2="TBA";//"Tuesday & Wednesday, June 1 & 2, 2010";
var TOCOURSE3="TBA";//"Saturday & Sunday, June 5 & 6, 2010";
var VANCOURSE1="Saturday & Sunday, October 16 & 17, 2010";//"Saturday & Sunday, May 22 & 23, 2010";

var TOCASECOURSE1="Monday, November 21, 2011";//"Toronto, Monday, May 30, 2011";
var TOCASECOURSE2="TBA";//"Thursday, June 3, 2010";
var VANCASECOURSE1="Monday, October 18, 2010";//"Monday, May 24, 2010";

var TO_FPE2_COURSE1="Saturday & Sunday, May 21 & 22, 2011";

// PFP Information (What are the current versions we are selling):
var SINGLEUPDATE48="Update 48 issued November 2006";
var SINGLEUPDATE49="Update 49 issued February 2007";
var SINGLEUPDATE50="Update 50 issued May 2007";
var SINGLEUPDATE51="Update 51 issued October 2007";
var SINGLEUPDATE52="Update 52 issued December 2007";
var SINGLEUPDATE53="Update 53 issued March 2008";
var SINGLEUPDATE54="Update 54 issued July 2008";
var SINGLEUPDATE55="Update 55 issued September 2008";
var SINGLEUPDATE56="Update 56 issued January 2009";
var SINGLEUPDATE57="Update 57 issued June 2009";
var SINGLEUPDATE58="Update 58 issued September 2009";
var SINGLEUPDATE59="Update 59 issued December 2009";
var SINGLEUPDATE60="Update 60 issued March 2010";
var SINGLEUPDATE61="Update 61 issued June 2010";
var SINGLEUPDATE62="Update 62 issued September 2010";
var SINGLEUPDATE63="Update 63 issued December 2010";
var SINGLEUPDATE64="Update 64 issued May 2011";
var SINGLEUPDATE65="Update 65 issued August 2011";
var SINGLEUPDATE66="Update 66 issued September 2011";

var CFP_REGISTERED="Certified Financial Planner&reg; and CFP&reg; are certification marks owned outside the U.S. by the Financial Planning Standards Board Ltd. The Financial Planning Standards Council is the marks licensing authority for the CFP marks in Canada, through agreement with FPSB.";

// tax rates
// create an index of the provinces and territories
iBritishColumbia = 0;
iAlberta = 1;
iSaskatchewan = 2;
iManitoba = 3;
iOntario = 4;
iQuebec = 5;
iNewfoundland = 6;
iNewBrunswick = 7;
iNovaScotia = 8;
iPEI = 9;
iYukon = 10;
iNWT = 11;
iNunavut = 12;

// create a multi-dimensional array, for each province and territory, keeps track of PST, GST, and whether there is HST (boolean)
Taxes = new Array(13); for(i = 0; i < Taxes.length; ++ i)
	Taxes [i] = new Array(3);
	
// 0 pst just means we are not calculating pst or hst for that area, they only get gst
Taxes[iBritishColumbia][0] = 0.07; // pst
Taxes[iBritishColumbia][1] = 0.05; // gst
Taxes[iBritishColumbia][2] = true; // hst?
Taxes[iAlberta][0] = 0;
Taxes[iAlberta][1] = 0.05;
Taxes[iAlberta][2] = false;
Taxes[iSaskatchewan][0] = 0;
Taxes[iSaskatchewan][1] = 0.05;
Taxes[iSaskatchewan][2] = false;
Taxes[iManitoba][0] = 0;
Taxes[iManitoba][1] = 0.05;
Taxes[iManitoba][2] = false;
Taxes[iOntario][0] = 0.08;
Taxes[iOntario][1] = 0.05;
Taxes[iOntario][2] = true;
Taxes[iQuebec][0] = 0;
Taxes[iQuebec][1] = 0.05;
Taxes[iQuebec][2] = false;
Taxes[iNewfoundland][0] = 0.08;
Taxes[iNewfoundland][1] = 0.05;
Taxes[iNewfoundland][2] = true;
Taxes[iNewBrunswick][0] = 0.08;
Taxes[iNewBrunswick][1] = 0.05;
Taxes[iNewBrunswick][2] = true;
Taxes[iNovaScotia][0] = 0.10;
Taxes[iNovaScotia][1] = 0.05;
Taxes[iNovaScotia][2] = true;
Taxes[iPEI][0] = 0;
Taxes[iPEI][1] = 0.05;
Taxes[iPEI][2] = false;
Taxes[iYukon][0] = 0;
Taxes[iYukon][1] = 0.05;
Taxes[iYukon][2] = false;
Taxes[iNWT][0] = 0;
Taxes[iNWT][1] = 0.05;
Taxes[iNWT][2] = false;
Taxes[iNunavut][0] = 0;
Taxes[iNunavut][1] = 0.05;
Taxes[iNunavut][2] = false;

// today's date
var Today=new Date();



function formatCurrencyNoDecimal(num) 
	{
		num = num.toString().replace(/\$|\,/g,'');
		if(isNaN(num))
			num = "0";
		sign = (num == (num = Math.abs(num)));
		num = Math.floor(num*100+0.50000000001);
		cents = num%100;
		num = Math.floor(num/100).toString();
		if(cents<10)
			cents = "0" + cents;
		for (var i = 0; i < Math.floor((num.length-(1+i))/3); i++)
			num = num.substring(0,num.length-(4*i+3))+','+
			num.substring(num.length-(4*i+3));
		return (((sign)?'':'-') + '$' + num); // + '.' + cents);
	}
	
function formatCurrencyDecimal(num) 
	{
		num = num.toString().replace(/\$|\,/g,'');
		if(isNaN(num))
			num = "0";
		sign = (num == (num = Math.abs(num)));
		num = Math.floor(num*100+0.50000000001);
		cents = num%100;
		num = Math.floor(num/100).toString();
		if(cents<10)
			cents = "0" + cents;
		for (var i = 0; i < Math.floor((num.length-(1+i))/3); i++)
			num = num.substring(0,num.length-(4*i+3))+','+
			num.substring(num.length-(4*i+3));
		return (((sign)?'':'-') + '$' + num + '.' + cents);
	}
