function CorrectFunction(l) { if(!(l instanceof Function)) { if(l.indexOf('return')==-1) eval("l=function(args){return "+l+"}"); else eval("l=function(args){"+l+"}"); } return l; } if(!Array.prototype.Exist) { Array.prototype.Exist=function(v) { for(var i=0;imax) max = this[i]; return max; } } if(!Array.prototype.isEmpty) { Array.prototype.isEmpty=function() { return this.length == 0; } } if(!Array.prototype.First) { Array.prototype.First = function(l,args) { if(args==undefined) args=[];//special for IE if(l == undefined)return this[0]; l = CorrectFunction(l); for(var i=0;i0)return this[0]; else return def; } l = CorrectFunction(l); for(var i=0;i