Zend certified PHP/Magento developer

Change Required Input Based on a Select Input Value in Customer Address

So basically I added a custom select address attribute. This selection has 2 available values. If value A is selected the required validation of the form for firstname and lastname is removed and making the company input required. If value B is selected it will be vice versa. The saving and backend validation is already done. The remaining work is the frontend validation for Customer Account Address and Checkout Address.