function init() {
	
	changeList(cFrm.category, 'type');
	displayAddFields(cFrm.type);
	displayReq(cFrm.preferredContact);
	cFrm.name.focus();
}

function processing() {
	layer("processing", "");
	layer("login_frm", "none");
}

function layer (id, action) {
	document.getElementById(id).style.display = action;
}

function displayReq(field) {

	switch (field.name) {
	
	case "preferredContact":
		if (field.value == "phone")  {
			layer ("phone", "");
			layer ("email", "none");
			
		} else if (field.value == "email") {
			layer ("email", "");
			layer ("phone", "none");

		} else {
			layer ("phone", "none");
			layer ("email", "none");
		}
		break;
	
	default:

	}
	
}

function displayAddFields(field) {
	
	switch (field.name) {
  	case "type":
  		switch (field.value) {
  		case "My account or my bill":
  			layer ("webads_specific_info", "");
  			layer ("general_tech_info", "none");
  			layer ("ftp_info", "none");
			NA_height_init();
  			break;
  		
  		case "An ad I'd like to change or cancel":
  			layer ("webads_specific_info", "");
  			layer ("general_tech_info", "none");
  			layer ("ftp_info", "none");
			NA_height_init();
  			break;

  		case "Request FTP Account":
  			layer ("webads_specific_info", "");
  			layer ("general_tech_info", "none");
  			layer ("ftp_info", "");
			NA_height_init();
  			break;
  		
  		default:
  			if (cat == "Using the Website") {
  				layer ("general_tech_info", "");  		
  				layer ("webads_specific_info", "none");
  				layer ("ftp_info", "none");
  			} else {
  		 		layer ("general_tech_info", "none");
				layer ("webads_specific_info", "none");
				layer ("ftp_info", "none");
  			}
			NA_height_init();
		}
  		break;
	default:
	layer ("general_tech_info", "none");
	layer ("webads_specific_info", "none");
	layer ("ftp_info", "none");
	
	
	}
}
