1stringToBoolean: function(string){
2 switch(string.toLowerCase().trim()){
3 case "true": case "yes": case "1": return true;
4 case "false": case "no": case "0": case null: return false;
5 default: return Boolean(string);
6 }
7}