Using the Madrasah Lillah and Zakaat funds for other Deeni activities

Q: A certain madrasah utilises lillah and zakaat to run its affairs. The zakaat is used to pay the fees of the students of the madrasah and therefore becomes madrasah money. Also the madrasah is under and organisation/board that oversees the running of the madrasah. This organisation/board pays the fees of the ustaads of said madrasah. Besides the activities that are directly involved with running the madrasah, eg: feeding the students, transporting the students to and from the madrasah, lights, water, etc, will it be permissible to use the funds in other avenues which are not directly involved with the taleem and running of the madrasah? Can the madrasah funds be used to buy plane tickets for the ustaads to attend jors in cape town?can the funds be used to book in to hotel rooms if the ustaads are going to teach in a town that is 2 hours away from the madrasah? s it permissible to use the funds in other similar activities as mentioned above? Please explain in detail which avenues will it be permissible to use the funds and what will be the procedure to follow before these funds can be used?

Changing one's home town

Q: I had a house in my home country (Country A), then moved to another country (Country B) for a long period, but kept my house in Country A. After a while I decided to leave country B and move to a third country (Country C). I left country B permanently, but before going to Country C, I went back to visit my house in Country A, intending to stay there less than 15 days. At this point I didn't have any home apart from my house in Country A, but I, as mentioned, intended to leave soon, and find a place to stay in Country C. My question is: should I have shortened my prayers during the visit of my house in Country A?

Hunting and Hunting Licenses

Q: Please could you let us know the Islamic viewpoint regarding the following matters related to hunting:

  1. In Zambia, the government sells licenses for hunting. Prospective buyers firstly have to pay a non-refundable fee in order to attain the right to bid. Thereafter, they can submit bids for licenses. Is this payment of a non-refundable fee permissible?
  2. Once bids are submitted, the government through its discretion approves certain bids and rejects others. A person whose bid is accepted for a certain animal e.g. a buffalo, can go out and hunt the buffalo himself, or even sell the license to a third party at a profit. Is this reselling of the license permissible?
  3. Government rules state that when the animal is shot and wounded, the license holder will be regarded as having attained the provisions of the license, regardless of whether he actually manages to catch the animal or not. If we regard the actual bay’ to take place when the hunter gets hold of the animal, then a situation might arise where he doesn’t get any mabee’ or he gets a dead animal (maytah). Please advise on this aspect.      
  4. The government has demarcated national parks in which wild animals are confined. Would this be regarded as Ihraaz by the government? Furthermore, would it be permissible for a hunter to hunt more animals than what he has paid for i.e. poaching? If he does, will it be permissible for him to consume the meat thereof? 

Working for a Software company that designs ERP management software with interest functionality

Q: I am a software developer and i work for a pakistani software house. This software house is a partner of an american software house. My company primary business is to make softwares related to business, school and law for the western countries. The software on which i am working on is the ERP(Enterprise resource planning). ERP is the system which automates the whole accounting in the business process. For more details see the link below 

http://en.wikipedia.org/wiki/Enterprise_resource_planning

This ERP has one part in which it provides functionality of collecting interest. Companies which want to use this feature can separately pay for this feature and companies can also turn off this functionality. Now as a software developer, if i am assigned a task of enhancing interest functionality, which is to write code to add functionality. Will this be halal for me? When i joined the company, i was not informed and i was not even aware that ERP can also have interest functionality. i have also did not signed any contract that i would not do it. Now in this situation what should i do? If i work for this feature, will my salary be halal for me? If it is haram and if i have already worked on this functionality, what should i do with my salary that i earned while working on this feature?