<!--
var max_loading = "no";

function check(field) {
	var valid 	= "0123456789."
	var ok 		= "yes";
	var temp;
	
	for (var i=0; i<field.value.length; i++)
	{
		temp = "" + field.value.substring(i, i+1);
		if (valid.indexOf(temp) == "-1") ok = "no";
	}
	if (ok == "no") {
		//alert("Invalid entry!  Only numbers are accepted!");
		field.value = field.value.substring(0, field.value.length - 1);
		field.focus();
	}
}

function calcRound(num) {
	var numResult;
	var resultLen;
	var cents;
	
	numResult	= Math.floor(num) + ".";
	resultLen	= numResult.length;
	
	cents		= 100 * (num - Math.floor(num)) + 0.5;
	numResult	+= Math.floor(cents/10);
	numResult	+= Math.floor(cents % 10);
	return numResult;
}

function getCC(ab)
{
	//a for basic
	//b for third party
	//region: 1 (West Malaysia) 
	//region: 2 (East Malaysia) 
	var docForm = document.frmCalculator;
	var cboInd 	= docForm.cboCC.selectedIndex;
	var cboVal 	= parseInt(docForm.cboCC.options[cboInd].value);
	var region  = document.frmCalculator.cboLocation.value;
  //alert(region);
	filledIn_CC	= true;
	
	switch (cboVal) {
		case 0	:
			alert("Please select a CC Range.");
			docForm.cboCC.focus();
			break;
			
		case 1400	:
		  if( region == 1){
					if (ab == "a"){
						  return 237.35;
				 	}else{
						  return 84.15;
					}
		  }else{
					if (ab == "a"){
						  return 178.20;
				  }else{
						  //return 44.00;
						  return 49.50;
					}		  	
		  }
			break;
			
			
		case 1650	:
		  if( region == 1){
					if (ab == "a"){
						  return 265.00;
				 	}else{
						  return 94.50;
					}
		  }else{
					if (ab == "a"){
						  return 199.30;
				  }else{
						return 54.90;
					}		  	
		  }
			break;					
			
			
		case 2200	:
		  if( region == 1){
					if (ab == "a"){
						  return 293.20;
				 	}else{
						  return 105.30;
					}
		  }else{
					if (ab == "a"){
						  return 220.50;
				  }else{
						return 61.80;
					}		  	
		  }
			break;	
						

		case 3050	:
		  if( region == 1){
					if (ab == "a"){
						  return 321.30;
				 	}else{
						  return 116.10;
					}
		  }else{
					if (ab == "a"){
						  return 241.30;
				  }else{
						return 68.40;
					}		  	
		  }
			break;	

		case 4100	:
		  if( region == 1){
					if (ab == "a"){
						  return 348.95;
				 	}else{
						  return 126.45;
					}
		  }else{
					if (ab == "a"){
						  return 262.50;
				  }else{
						return 73.80;
					}		  	
		  }
			break;	
			

		case 4250	:
		  if( region == 1){
					if (ab == "a"){
						  return 376.60;
				 	}else{
						  return 136.80;
					}
		  }else{
					if (ab == "a"){
						  return 283.30;
				  }else{
						return 80.40;
					}		  	
		  }
			break;		
			
		case 4400	:
		  if( region == 1){
					if (ab == "a"){
						  return 404.80;
				 	}else{
						  return 147.60;
					}
		  }else{
					if (ab == "a"){
						  return 304.50;
				  }else{
						return 85.80;
					}		  	
		  }
			break;		


		case 5000	:
		  if( region == 1){
					if (ab == "a"){
						  return 432.45;
				 	}else{
						  return 157.95;
					}
		  }else{
					if (ab == "a"){
						  return 325.30;
				  }else{
						return 92.40;
					}		  	
		  }
			break;			
	}		
}



function getTrdparty(ab)
{
	//a for West Malaysia
	//b for East Malaysia
	var docForm = document.frmCalculator;
	var cboInd 	= docForm.cboCC.selectedIndex;
	var cboVal 	= parseInt(docForm.cboCC.options[cboInd].value);
	filledIn_CC	= true;
	
	switch (cboVal) {
		case 0	:
			alert("Please select a CC Range.");
			docForm.cboCC.focus();
			break;
		case 1400	:
			if (ab == "a")
				return 72.00;
		 	else
				return 43.50;
			break;
			
		case 1650	:
			if (ab == "a")
				return 81.00;
		 	else
				return 48.00;
			break;
			
		case 2200	:
			if (ab == "a")
				return 90.00;
		 	else
				return 54.00;
			break;
			
		case 3050	:
			if (ab == "a")
				return 99.00;
		 	else
				return 60.00
			break;
			
		case 4100	:
			if (ab == "a")
				return 108.00;
		 	else
				return 64.50;
			break;
			
		case 4250	:
			if (ab == "a")
				return 117.00;
		 	else
				return 70.50;
			break;
			
		case 4400	:
			if (ab == "a")
				return 126.00;
		 	else
				return 75.00;
			break;
			
		case 5000	:
			if (ab == "a")
				return 135.00;
		 	else
				return 81.00;
			break;
	}		
}


function cal_loading(){
	var docForm = document.frmCalculator;
	
	var loading_percentage;
	loading_percentage = 0;

	var loading_vehicle_age           =  docForm.loading_age.value;
	var loading_ages_participants     =  docForm.chkLoading_age_part.checked;
	var loading_drv_exp               =  docForm.chkLoading_drv_exp.checked;
  var loading_claims_over_past3yrs  =  docForm.claim_over_past3yrs.value;

  var coverage_type  =  docForm.cboCoverage.value;
  
  //DETECT AGE OF VEHICLE
  // Comprehensive 
  if( (coverage_type == "1") && (loading_vehicle_age != '') ){
  	  if( loading_vehicle_age == "3yrs" ){
  	  	  loading_percentage = parseFloat(loading_percentage) + 0;
  	  }
  	  if( loading_vehicle_age == "6yrs" ){
  	  	  loading_percentage = parseFloat(loading_percentage) + 0;
  	  }  	  
  	  if( loading_vehicle_age == "10yrs" ){
  	  	  loading_percentage = parseFloat(loading_percentage) + 0;
  	  }  	  	  
  	  if( loading_vehicle_age == "15yrs" ){
  	  	  loading_percentage = parseFloat(loading_percentage) + 15;
  	  }   
  	  if( loading_vehicle_age == "20yrs" ){
  	  	  loading_percentage = parseFloat(loading_percentage) + 25;
  	  }  	   	  
  }

  // Third Party
  if( (coverage_type == "2") && (loading_vehicle_age != '') ){
  	  if( loading_vehicle_age == "3yrs" ){
  	  	  loading_percentage = parseFloat(loading_percentage) + 25;
  	  }
  	  if( loading_vehicle_age == "6yrs" ){
  	  	  loading_percentage = parseFloat(loading_percentage) + 50;
  	  }  	  
  	  if( loading_vehicle_age == "10yrs" ){
  	  	  loading_percentage = parseFloat(loading_percentage) + 75;
  	  }  	  	  
  	  if( loading_vehicle_age == "15yrs" ){
  	  	  loading_percentage = parseFloat(loading_percentage) + 100;
  	  }   
  	  if( loading_vehicle_age == "20yrs" ){
  	  	  loading_percentage = parseFloat(loading_percentage) + 100;
  	  }  	   	  
  }
  
//  if( loading_vehicle_age != ''){
//  	  loading_percentage = parseFloat(loading_percentage) + parseFloat(loading_vehicle_age);
//  }
  
  if( loading_ages_participants ){
  	  if(docForm.cboCoverage.value == 1){
	  	  // 15% - Ages of participant (below 21yrs and above 65yrs up to 7yr) [COMPREHENSIVE]
	  	  loading_percentage = parseFloat(loading_percentage) + 15;  
	  	}else{
	  	  // 25% - Ages of participant (below 21yrs and above 65yrs up to 7yr) [THIRD PARTY]
	  	  loading_percentage = parseFloat(loading_percentage) + 25;  	  		
	  	}
  }

  if( loading_drv_exp ){
  	  if(docForm.cboCoverage.value == 1){
  	  // 15% - Participants driving experience [COMPREHENSIVE]
  	  loading_percentage = parseFloat(loading_percentage) + 15;  
  	  }else{
  	  // 25% - Participants driving experience [THIRD PARTY]
  	  loading_percentage = parseFloat(loading_percentage) + 25;    	  	
  	  }
  }
  



  //DETECT CLAIM EXPERIENCE OVER THE PAST 3YRS
  // Comprehensive 
  //alert(loading_claims_over_past3yrs);
  if( (coverage_type == "1") && (loading_claims_over_past3yrs != '') ){
  	  if( loading_claims_over_past3yrs == "1-2claims" ){
  	  	  loading_percentage = parseFloat(loading_percentage) + 15;
  	  }
  	  if( loading_claims_over_past3yrs == "morethan2" ){
  	  	  loading_percentage = parseFloat(loading_percentage) + 25;
  	  }  	  	 	  
  }else{
  	 loading_percentage = parseFloat(loading_percentage) + 0;
  }
  
  // Third Party 
  if( (coverage_type == "2") && (loading_claims_over_past3yrs != '') ){
  	  if( loading_claims_over_past3yrs == "1-2claims" ){
  	  	  loading_percentage = parseFloat(loading_percentage) + 50;
  	  }
  	  if( loading_claims_over_past3yrs == "morethan2" ){
  	  	  loading_percentage = parseFloat(loading_percentage) + 100;
  	  }  	  	   	  
  }else{
  	 loading_percentage = parseFloat(loading_percentage) + 0;
  }




//  if( loading_claims_over_past3yrs != '' ){
//  	  // 15%/25% - Clalim Experience over past 3yrs
//  	  loading_percentage = parseFloat(loading_percentage) + parseFloat(loading_claims_over_past3yrs);  
//  }  
  
  // 1: Comprehensive, 2: Third Party
  if( docForm.cboCoverage.value == 1 ){
  	  // For Comprehensive max loading is 35%
  	  if( loading_percentage > 36 ){
  	      loading_percentage = 35;
  	      if( max_loading == 'no'){
  	      	 alert('The plan you selected only allows up to 35% of coverage.');
  	      	 max_loading = 'yes';
  	      }
  	  }else{
  	  	 max_loading = 'no';
  	  }
  }
  else{
     // For Third Party max loading is 150%
  	  if( loading_percentage > 151 ){
  	      loading_percentage = 150;
  	      if( max_loading == 'no'){
  	      	alert('The plan you selected only allows up to 150% of coverage.');
  	      	max_loading = 'yes';
  	      }
  	  }else{
  	  	 max_loading = 'no';
  	  }  	  
  }
  //alert(loading_percentage);
  //alert(max_loading);
  
  //var gross_insurance_premium = docForm.lblBaseTotal2.value;
  //var ncd                     = docForm.cboNCD.value;
  //var base_premium            = parseFloat(gross_insurance_premium) - ( parseFloat(gross_insurance_premium) * parseFloat(ncd) )
  
  //docForm.lblBaseTotal2.value this value have already deducted NCD
  var base_premium              = docForm.lblBaseTotal2.value;
  var loading_amount            = parseFloat(( loading_percentage / 100 )) * parseFloat(base_premium);
  
  if( loading_amount == '' || loading_amount == 0 ){
  	 docForm.lblBaseTotal3.value = calcRound(parseFloat(base_premium));
  	 //docForm.lblBaseTotal3.value = docForm.lblBaseTotal2.value;
  	 loading_amount = 0.00;
  	 //alert(docForm.lblBaseTotal3.value);
  	 
  }else{
  	 docForm.lblBaseTotal3.value = calcRound( parseFloat(loading_amount) + parseFloat(base_premium) );
  }
  
  docForm.ttl_loading_amt.value = calcRound(loading_amount);
}


function calBasic()
{
	cal_loading();
	
	var docForm = document.frmCalculator;
	var region  = docForm.cboLocation.value;
	var c_type  = document.frmCalculator.cboCoverage.value; 
	//ctype  : 1-Comprehensive , 2-Third party
  //region : 1-West Malaysia , 2-East Malaysia
	
	if( region == 1 ){
		var gip = 26;
	}
	else{
		var gip = 20.30;
	}	
	
	checkOptions();
	//checkcount()

	if ((docForm.txtSumInsured.value != "") && (docForm.cboCC.selectedIndex != 0))
	{ 
		//		if( region == 1 ){
		//				baseTariff 					= getCC("a");
		//		}else{
		//				baseTariff 					= getCC("b");
		//		}

		if( c_type == 1 ){
				baseTariff 					= getCC("a");
		}else{
				baseTariff 					= getCC("b");
		}
    
    docForm.lblCC.value = baseTariff.toFixed(2);
		//alert(baseTariff.toFixed(2));
	 	basicPremium 				= (((docForm.txtSumInsured.value - 1000)/1000) * gip);
	 	
		//totalPremium			= baseTariff + basicPremium;         //commented on 250209
		//docForm.lblSumInsured.value = calcRound(basicPremium); //commented on 250209
		
		
		// ADDED on 250209
		if( c_type == 1 ){
			totalPremium	              =  baseTariff + basicPremium;
			docForm.lblSumInsured.value =  calcRound(basicPremium);
		}else{
			totalPremium                =  baseTariff;
			docForm.lblSumInsured.value =  "";
		}
		
		//alert(totalPremium);
		

		docForm.lblBaseTotal1.value	= calcRound(totalPremium);
		
		ncdTotal 					      = (docForm.cboNCD.options[docForm.cboNCD.selectedIndex].value/100) * totalPremium;
 	 	docForm.lblNCD.value 		= calcRound(ncdTotal);
		totalPremium				    = totalPremium - calcRound(ncdTotal);
		docForm.lblBaseTotal2.value	= calcRound(totalPremium);
	//calBasic();
	cal_loading();
	calTotal();
		return true;
	}
 else 
	{
		docForm.lblBaseTotal1.value	= calcRound(docForm.lblCC.value);
		docForm.lblBaseTotal2.value	= calcRound(docForm.lblCC.value);	
		docForm.lblSumInsured.value 	= "0.00";
	 	//docForm.cboNCD.value 			= "0.00";
	 	docForm.cboNCD.value 			= "0.00";
	//calBasic();
	cal_loading();
	calTotal();
	 	return 0;
	}
}

function chkCC() {
	var docForm = document.frmCalculator;
	var cboInd 	= docForm.cboCC.selectedIndex;
	var cboVal 	= parseInt(docForm.cboCC.options[cboInd].value);
	var cboInd 	= docForm.cboCC.selectedIndex;
	var region  = document.frmCalculator.cboLocation.value; // Region 1: West Malaysia , Region 2: East Malaysia
  var c_type  = document.frmCalculator.cboCoverage.value; 
  
  //ctype  : 1-Comprehensive , 2-Third party
  //region : 1-West Malaysia , 2-East Malaysia
  
	switch (cboVal) {
		case 0	:
			docForm.lblCC.value = "0.00";
			break;
			
		case 1400	:
		  if( region == 1){
			  	if( c_type == 1){
					  docForm.lblCC.value	= "237.35";
				  }else{
				  	docForm.lblCC.value	= "84.15";
				  }
			}else{
				  if( c_type == 1){
						docForm.lblCC.value	= "178.20";
					}else{
						docForm.lblCC.value	= "49.50";
					}
			}
			break;
			
		case 1650	:
			if( region == 1){
				  if( c_type == 1){
				      docForm.lblCC.value	= "265.00";
				  }else{
				  	  docForm.lblCC.value	= "94.50";
				  }    
			}else{
				  if( c_type == 1){
							docForm.lblCC.value	= "199.30";
					}else{
						  docForm.lblCC.value	= "54.90";
					}
			}
			break;
			
		case 2200	:
			if( region == 1){
				  if( c_type == 1){
							docForm.lblCC.value	= "293.20";
				  }else{
				  	  docForm.lblCC.value	= "105.30";
				  }
			}else{
				  if( c_type == 1){
							docForm.lblCC.value	= "220.50";
					}else{
						  docForm.lblCC.value	= "61.80";
					}
			}
			break;
			
		case 3050	:
		  if( region == 1){
		  	  if( c_type == 1){
							docForm.lblCC.value	= "321.30";
					}else{
						  docForm.lblCC.value	= "116.10";
					}
			}else{
				  if( c_type == 1){
							docForm.lblCC.value	= "241.30";
				  }else{
				  	  docForm.lblCC.value	= "68.40";
				  }
			}
			break;
			
		case 4100	:
		  if( region == 1){
		  	  if( c_type == 1){
							docForm.lblCC.value	= "348.95";
					}else{
						  docForm.lblCC.value	= "126.45";
				  } 
			}else{
				  if( c_type == 1){
				      docForm.lblCC.value	= "262.50";
				  }else{
				  	  docForm.lblCC.value	= "73.80";
				  }
			}
			break;
			
		case 4250	:
		  if( region == 1){		
		  	  if( c_type == 1){
							docForm.lblCC.value	= "376.60";
				  }else{
				  	  docForm.lblCC.value	= "136.80";
				  }
			}else{
				  if( c_type == 1){
							docForm.lblCC.value	= "283.30";
					}else{
						  docForm.lblCC.value	= "80.40";
					}
			}
			break;
			
		case 4400	:
		  if( region == 1){	
		  	  if( c_type == 1){
							docForm.lblCC.value	= "404.80";
					}else{
						  docForm.lblCC.value	= "147.60";
					}
			}else{
				  if( c_type == 1){
							docForm.lblCC.value	= "304.50";
					}else{
						  docForm.lblCC.value	= "85.80";
					}
			}
			break;
			
		case 5000	:
		  if( region == 1){
          if( c_type == 1){
							docForm.lblCC.value	= "432.45";
					}else{
						  docForm.lblCC.value	= "157.95";
					}
			}else{
				  if( c_type == 1){
							docForm.lblCC.value	= "325.30";
					}else{
					    docForm.lblCC.value	= "92.40";
				  }
			}
			break;
	}	
	calBasic();
	cal_loading();
	calTotal();
}

function checkOptions()
{
	with (document.frmCalculator)
	{ 
		//BEGIN - Checking for Add Loading ###########################################################################################
//		if (!chkAddLoading1.checked) { 
//			lblAddLoading1.value = "0.00"; 
//			if(txtAddLoading1.value != "") {
//				alert("If you would like to include Insured with less than 21 y/o and 2 years experience in your calculation,\nPlease tick on the item's checkbox.");
//			}
//		}				
		
//		if (chkAddLoading1.checked) { 
//			if(txtAddLoading1.value == "" || txtAddLoading1.value == 0) {
//				lblAddLoading1.value = "0.00"; 
//				alert("Please enter the percentage amount.");
//				txtAddLoading1.focus();
//			}
//			else {
//				if(eval(txtAddLoading1.value) > 35) {
//					alert("The maximum amount you can provide is 35%.\nPlease enter a new amount.");
//					txtAddLoading1.focus();
//					txtAddLoading1.select();
//					lblAddLoading1.value = "0.00"; 
//				}
//				else {
//					loading	= eval(lblSumInsured.value) * (eval(txtAddLoading1.value) / 100);
//					lblAddLoading1.value = calcRound(loading); 
//				}
//			}
//		}
		
//		if (!chkAddLoading2.checked) 	{ lblAddLoading2.value = "0.00"; }
//		if (chkAddLoading2.checked) 	{ lblAddLoading2.value = calcRound((eval(lblSumInsured.value) * 0.15)); }
//		if (!chkAddLoading3.checked) 	{ lblAddLoading3.value = "0.00"; }
//		if (chkAddLoading3.checked) 	{ lblAddLoading3.value = calcRound((eval(lblSumInsured.value) * 0.25)); }
		//END   - Checking for Add Loading ###########################################################################################
			
		//BEGIN - Checking for Additional Driver ######################################################################################
		if (!chkExtraDriver.checked) { 
			lblExtraDriver.value = "0.00"; 
			if(txtExtraDriver.value != "") {
				alert("If you would like to include additional drivers in your calculation,\nplease tick on the item's checkbox.");
			}
		}				
		
		if (chkExtraDriver.checked) { 
			if(txtExtraDriver.value == "" || txtExtraDriver.value == 0) {
				lblExtraDriver.value = "0.00"; 
				alert("Please enter the total number of extra drivers to be insured.");
				txtExtraDriver.focus();
			}
			else {				
					extraDriver			 = eval(txtExtraDriver.value) * 10;
					lblExtraDriver.value = calcRound(extraDriver); 
			}
		}
		//END   - Checking for Additional Driver ######################################################################################
		
		//BEGIN - Checking for LLTP ###################################################################################################
		var totalPsg	= txtLLTP.value;
		if (!chkLLTP.checked) { 
			lblLLTP.value = "0.00"; 
			if(totalPsg != "" ) {
				alert("If you would like to include Passenger Liability (LLTP) in your calculation,\nplease tick on the item's checkbox.");
			}
		}
		
		if (chkLLTP.checked)
		{
		 //	thirdpp = getCC('b'); //to change to other function or mod getCC
     var region  = document.frmCalculator.cboLocation.value;
    
		if( region == 1 ){
			thirdpp 					= getTrdparty("a");
		}else{
			thirdpp 					= getTrdparty("b");
		}		 	
		//alert(region) 	
    //alert(thirdpp)
		 	if (thirdpp != 0)
			{ 
				if(totalPsg != 0 && totalPsg != "") {
					if (totalPsg > 5)	{ lblLLTP.value = calcRound(((25 / 100) * thirdpp) + ((totalPsg - 5) * 10)); }
					else				{ lblLLTP.value = calcRound(((25 / 100) * thirdpp)); }
				}
				else {
					alert("Please specify the vehicle's seating capacity");
					txtLLTP.focus();
				}
			}
		 	else {	
		 		lblLLTP.value = "0.00" 
		 	}
		}
		//END   - Checking for LLTP ###################################################################################################
		
		if(txtWindscreen.value != "" && txtWindscreen.value != 0) {
			lblWindscreen.value = calcRound((eval(txtWindscreen.value) * 0.15));
		}else{
			lblWindscreen.value = "0.00";
		}
		
		if(txtAccessory.value != "" && txtAccessory.value != 0) {
			lblAccessory.value = calcRound((eval(txtAccessory.value) * 0.15));
		}else{
			lblAccessory.value = "0.00";
		}
		
		if (!chkLLOP.checked)	{ lblLLOP.value 	= "0.00"; }
		if (chkLLOP.checked)	{ lblLLOP.value 	= "7.50";	}
		if (!chkStrike.checked)	{ lblStrike.value	= "0.00";	}
		if (chkStrike.checked)	{ lblStrike.value = calcRound(((0.3 / 100) * txtSumInsured.value)); }
		if (!chkNatural.checked){ lblNatural.value	= "0.00";	}
		if (chkNatural.checked)	{ lblNatural.value = calcRound(((0.5 / 100) * txtSumInsured.value)); }
	}
	return true;
}

function calTotal()
{
	with (document.frmCalculator)
	{ 

		var insuranceType		= cboInsured.options[cboInsured.selectedIndex].value;
		var totalLLTP 			= lblLLTP.value;
		var totalLLOP 			= lblLLOP.value;
		var totalStrike 		= lblStrike.value;
		var totalNatural		= lblNatural.value;
		var totalWindscreen		= lblWindscreen.value;
		var totalAccessory		= lblAccessory.value;
		var totalExtraDriver	= lblExtraDriver.value;
		//var totalAllDriverExt	= 50;
	
		var totalAllDriverExt	= lblDriverExt.value;
			 
		//lblBaseTotal3.value		= calcRound(eval(lblBaseTotal2.value) + eval(lblAddLoading1.value) + eval(lblAddLoading2.value) + eval(lblAddLoading3.value));
		var grandTotal 			= lblBaseTotal3.value;
		grandTotal				= eval(grandTotal) + eval(totalLLTP) + eval(totalLLOP) + eval(totalStrike) + eval(totalNatural) + eval(totalWindscreen) + eval(totalAccessory) + eval(totalExtraDriver);
		if(insuranceType == 2) {
			grandTotal += eval(totalAllDriverExt);
		}
		
		lblBaseTotal4.value 	= calcRound(grandTotal);
		
		//Added by Tay to calculate Service Fees if COMPANY profile
		var docForm = document.frmCalculator
	  var cboVal	= docForm.cboInsured.options[docForm.cboInsured.selectedIndex].value;
		if(cboVal == 2) {
			servicefees            =  calcRound(0.06 * grandTotal);
			//servicefees            =  calcRound(0.05 * grandTotal);
			lblServiceFees.value   =  servicefees;
			grandTotal            += eval(servicefees);
	  }
	  
		grandTotal 				       = eval("grandTotal + 10");
		lblBaseTotal5.value 	   = calcRound(grandTotal);
	}
	return true;
}

//Added by Tay 311208 - to fix missing Driver Extension
function cal_ext_drive(){
	var docForm = document.frmCalculator;
  
	//if( docForm.chkDriverExt.checked){
			docForm.lblDriverExt.value = "50.00";
  //}else{
  	  //docForm.lblDriverExt.value = "0.00";
  //}
  calTotal();
}
//-->



//Added by Tay 311208 - to be interactive on Converate type and vehicle location dropdown
//Check if its first load/enter
function check_first_time_enter(){
	var docForm = document.frmCalculator;
  //alert(docForm.cboCC.value);
  if( docForm.cboCC.value != 0 ){
  	//alert('can calculate');
  	calBasic();
  }

}
