

function client()
{
	this.prod = new Array();
	this.prod['p1'] = 1;
	this.prod['p2'] = 2;
	this.prod['p3'] = 3;
	this.prod['p4'] = 4;
	this.prod['p5'] = 5;
	this.prod['p6'] = 6;
	
	this.prod['p11'] = 1;
	this.prod['p22'] = 2;
	this.prod['p33'] = 3;
	this.prod['p44'] = 4;
	this.prod['p55'] = 5;
	this.prod['p66'] = 6;
	
	this.prod['p111'] = 1;
	this.prod['p222'] = 2;
	this.prod['p333'] = 3;
	this.prod['p444'] = 4;
	this.prod['p555'] = 5;
	this.prod['p666'] = 6;
	
	
	this.prod['p1111'] = 1;
	this.prod['p2222'] = 2;
	this.prod['p3333'] = 3;
	this.prod['p4444'] = 4;
	this.prod['p5555'] = 5;
	this.prod['p6666'] = 6;
	
	
	this.total = function()
	{
		var req = arguments[0];
		
		dwt.get('total').value = parseInt(this.p1Value()) + parseInt(this.p2Value()) + parseInt(this.p3Value());
		dwt.get('final_total').value = parseInt(this.p1Value()) + parseInt(this.p2Value()) + parseInt(this.p3Value());
	}
	
	this.p1Value = function()
	{
		if (dwt.get('p1').checked == true) 
			return parseInt(this.prod['p1']);
		else if (dwt.get('p2').checked == true) 
			return parseInt(this.prod['p2']);
		else if (dwt.get('p3').checked == true) 
			return parseInt(this.prod['p3']);
		else if (dwt.get('p4').checked == true) 
			return parseInt(this.prod['p4']);
		else if (dwt.get('p5').checked == true) 
			return parseInt(this.prod['p5']);
		else if (dwt.get('p6').checked == true) 
			return parseInt(this.prod['p6']);
		else if (dwt.get('p7').checked == true) 
			return 0;
	}
	
	this.p2Value = function()
	{
		if (dwt.get('p11').checked == true) 
			return parseInt(this.prod['p1']);
		else if (dwt.get('p22').checked == true) 
			return parseInt(this.prod['p2']);
		else if (dwt.get('p33').checked == true) 
			return parseInt(this.prod['p3']);
		else if (dwt.get('p44').checked == true) 
			return parseInt(this.prod['p4']);
		else if (dwt.get('p55').checked == true) 
			return parseInt(this.prod['p5']);
		else if (dwt.get('p66').checked == true) 
			return parseInt(this.prod['p6']);
		else if (dwt.get('p77').checked == true) 
			return 0;

	}
	
	this.p3Value = function()
	{
		if (dwt.get('p111').checked == true) 
			return parseInt(this.prod['p1']);
		else if (dwt.get('p222').checked == true) 
			return parseInt(this.prod['p2']);
		else if (dwt.get('p333').checked == true) 
			return parseInt(this.prod['p3']);
		else if (dwt.get('p444').checked == true) 
			return parseInt(this.prod['p4']);
		else if (dwt.get('p555').checked == true) 
			return parseInt(this.prod['p5']);
		else if (dwt.get('p666').checked == true) 
			return parseInt(this.prod['p6']);
		else if (dwt.get('p777').checked == true) 
			return 0;

	}
	
	
	this.p4Value = function()
	{
		if (dwt.get('p1111').checked == true) 
			return parseInt(this.prod['p1']);
		else if (dwt.get('p2222').checked == true) 
			return parseInt(this.prod['p2']);
		else if (dwt.get('p2333').checked == true) 
			return parseInt(this.prod['p3']);
		else if (dwt.get('p4444').checked == true) 
			return parseInt(this.prod['p4']);
		else if (dwt.get('p5555').checked == true) 
			return parseInt(this.prod['p5']);
		else if (dwt.get('p6666').checked == true) 
			return parseInt(this.prod['p6']);
		else if (dwt.get('p7777').checked == true) 
			return 0;

	}
	
		
}