<!--

//this function converts the number to decimal format
function format(num) { 
  var finished = num;
  finished=Math.floor(num)+".";
  var base=100*(num-Math.floor(num))+0.5;
  finished += Math.floor(base/10);
  finished += Math.floor(base%10);
  return finished;
}


function compute()
{
	var categories = [
		// [employee rate, aditional listing, base rate, per room]
		[true,  false, 0,   0],    // 0  Advertising, Printing & Promotion       
		[true,  false, 0,   1],    // 1  Apartments & Retirement                 
		[false, false, 420, 0],    // 2  Banks & Credit Unions                   
		[true,  true,  0,   0],    // 3  Beauty & Barber Salons                  
		[true,  false, 0,   0],    // 4  Carpet & Floor Covering                 
		[true,  false, 0,   0],    // 5  Cleaners                                
		[true,  false, 0,   0],    // 6  Computers & Technology                  
		[true,  false, 0,   0],    // 7  Construction & Repair Related           
		[true,  false, 0,   0],    // 8  Developers & Property Owners            
		[false, false, 100, 0],    // 9  Elected Officials                       
		[true,  false, 0,   0],    // 10 Employment Services                     
		[true,  true,  0,   0],    // 11 Entertainment                           
		[true,  false, 0,   0],    // 12 Family, Sports & Recreation (Commercial)
		[true,  false, 0,   0],    // 13 Funeral                                 
		[true,  false, 0,   0],    // 14 Glass & Mirror Replacement              
		[false, false, 85,  0],    // 15 Individual Membership                   
		[true,  true,  0,   0],    // 16 Insurance & Financial (non banking)     
		[true,  false, 0,   0],    // 17 Landscape                               
		[true,  false, 0,   4],    // 18 Lodging                                 
		[true,  false, 0,   0],    // 19 Manufacturing                           
		[false, false, 260, 0],    // 20 Mobile Home Parks                       
		[true,  false, 0,   0],    // 21 Photography                             
		[true,  false, 0,   0],    // 22 Private Schools                         
		[true,  true,  0,   0],    // 23 Professional Offices                    
		[false, false, 225, 0],    // 24 Public Education                        
		[false, false, 385, 0],    // 25 Public Utilities                        
		[true,  true,  0,   0],    // 26 Real Estate                             
		[true,  false, 0,   0],    // 27 Services not listed                     
		[true,  false, 0,   0],    // 28 Storage Facilities                      
		[true,  false, 0,   0],    // 29 Television Service Provider             
		[false, false, 225, 0],    // 30 Restaurants, Food & Beverages           
		[true,  false, 100, 0],    // 31 Retail & Specialty Retail               
		[true,  false, 0,   0],    // 32 Vehicle Sales and Service               
		[true,  true,  0,   0],    // 33 Veterinary                              
	];
		
	var f = document.membershipform;
	var emp_fee = 0;
	if (categories[f.category.value][0])
		emp_fee = f.fee.value/1;
	var base_rate = categories[f.category.value][2];
	var room_rate = categories[f.category.value][3]*f.x_rooms.value;
	var total = 30 + emp_fee + base_rate + room_rate;
//	alert("e:"+emp_fee+"\nb:"+base_rate+"\nr:"+room_rate+"\n\nt:"+total);
	
	//var AMOUNT = format(total);
	f.x_Amount.value = format(total) + "";
	f.x_total.value = f.x_Amount.value;
}
//-->