<!-- // Common Javascript for all "standard" poicies 
// Originally generated by SetClientJavaScript.asp but somwhat hacked about
// Have updated percentages to be simple multipliers (as per Insurance Wide calculation model)
// Had to reorder adjustemnts so they follow the on screeen order (need to check this does not bugger 
// adding values before workign percentages and visa versa.
// Ultimate aim is for no pricing in this section - just have the raw prices calculated by
// a SetClientPrices.asp (either in real time or as a reseller specific include page

// AW 28 Jan 01 - Migrated into new Version 2 of on-line I&G
// - Rates matrix calculated from database !
// Other bits not calculated from database at the moment

// AW 6 Mar 01 - Wrote the database functions to do the adjustment rates - so can delete from here

var MINUTE = 60 * 1000;
var HOUR = MINUTE * 60;
var DAY = HOUR * 24;
var WEEK = DAY * 7;
	
var aInsurancePackage = new Array();
var aTravelDetails = new Array();

// variable constructors
function insurancepackage(cost,name,uid,desc,type) {
	aInsurancePackage.cost = cost;
	aInsurancePackage.name = name;
	aInsurancePackage.uid = uid;
	aInsurancePackage.desc = desc;
	aInsurancePackage.InsType = type;
}

function Adjustments(name,value,unit,tip,option,group) {
	this.name = name;
	this.value = value;
	this.unit = unit;
	this.tip = tip;
	this.optional = option;
	this.group = group;
}

function XLookup(uid, display, visible) {
	this.uid = uid;
	this.display = display;
	this.visible = visible;
}

function DayDropDown(text,value) {
	this.text = text;
	this.value = value;
}

//indentifies the packagename and an array of the Y-Axis name index (i.e. day or flatrate)
function PackageY(packagename,commaarray) {
	this.name = packagename;
	this.commaarray = commaarray;
}

function PackageAdj(AdjustmentIndex,IncludeAsDefault,IncludeInStandard,DisableUserInput,IncludeInBudget,Group,MutualExclusiveToIndexNo) {
	this.Index = AdjustmentIndex;
	this.IncludeAsDefault = IncludeAsDefault;
	this.DisableUserInput = DisableUserInput;
	this.IncludeInStandard = IncludeInStandard;
	this.IncludeInBudget = IncludeInBudget;
	this.Group = Group;
	this.METINO = MutualExclusiveToIndexNo;
// IncludeAsDefault - the adjustment in in the package and can not be removed (Ski for Annual MultiTrip)
// IncludeInStandard - the adjustment is added to the standard version of the package
// IncludeInBudget - the adjustment is added to the budget version of the package
// DisableUserInput - the option is not available in this package and will be grayed out
// Group - the grouping of the options for display purposes
}

function MatriceRecord(x,rate) {
	//this.z = z;
	this.x = x;
	this.rate = rate;
}

var xlookup = new Array();
// AW - 27 Jan 01 - changed indexes as a result of new database driven rates matrix, now the xlookup[] is the Region_id
xlookup[4] = new XLookup("4","Australia and New Zealand",true);
xlookup[1] = new XLookup("1","United Kingdom/Channel Islands/N.Ireland",true);
xlookup[3] = new XLookup("3","Worldwide (exc. USA & Canada)",true);
xlookup[5] = new XLookup("5","Worldwide (inc. USA & Canada)",true);
xlookup[2] = new XLookup("2","Europe (exc. Algeria, Israel, Libya & Lebanon)",true);

var daydropdown = new Array();
daydropdown[0] = new DayDropDown("Annual", "AMT");
daydropdown[1] = new DayDropDown("3", 3);
daydropdown[2] = new DayDropDown("4", 4);
daydropdown[3] = new DayDropDown("5", 5);
daydropdown[4] = new DayDropDown("6", 6);
daydropdown[5] = new DayDropDown("7", 7);
daydropdown[6] = new DayDropDown("8", 8);
daydropdown[7] = new DayDropDown("9", 9);
daydropdown[8] = new DayDropDown("10", 10);
daydropdown[9] = new DayDropDown("11", 11);
daydropdown[10] = new DayDropDown("12", 12);
daydropdown[11] = new DayDropDown("13", 13);
daydropdown[12] = new DayDropDown("14", 14);
daydropdown[13] = new DayDropDown("15", 15);
daydropdown[14] = new DayDropDown("16", 16);
daydropdown[15] = new DayDropDown("17", 17);
daydropdown[16] = new DayDropDown("18", 18);
daydropdown[17] = new DayDropDown("19", 19);
daydropdown[18] = new DayDropDown("20", 20);
daydropdown[19] = new DayDropDown("21", 21);
daydropdown[20] = new DayDropDown("22", 22);
daydropdown[21] = new DayDropDown("23", 23);
daydropdown[22] = new DayDropDown("24", 24);
daydropdown[23] = new DayDropDown("31", 31);
daydropdown[24] = new DayDropDown("38", 38);
daydropdown[25] = new DayDropDown("45", 45);
daydropdown[26] = new DayDropDown("52", 52);
daydropdown[27] = new DayDropDown("59", 59);
daydropdown[28] = new DayDropDown("60", 60);
daydropdown[29] = new DayDropDown("90", 90);
daydropdown[30] = new DayDropDown("120", 120);
daydropdown[31] = new DayDropDown("150", 150);
daydropdown[32] = new DayDropDown("180", 180);
daydropdown[33] = new DayDropDown("210", 210);
daydropdown[34] = new DayDropDown("245", 245);
daydropdown[35] = new DayDropDown("275", 275);
daydropdown[36] = new DayDropDown("305", 305);
daydropdown[37] = new DayDropDown("335", 335);
daydropdown[38] = new DayDropDown("365", 365);

var packageY = new Array(); 
packageY[0] = new PackageY('Annual Multi Trip single','45');
packageY[1] = new PackageY('Long Stay','3,5,10,17,24,31,45,60,90,120,150,180,210,245,275,305,335,365');
packageY[2] = new PackageY('Single','3,5,10,17,24,31,38,45,52,59,60');
packageY[3] = new PackageY('Annual Multi Trip couple','45');

// -->

