/**
* Extend startWith method
* @param str
* @return
*/
String.prototype.startWith=function(str){
if(str==null||str==""||this.length==0||str.length>this.length)
return false;
if(this.substr(0,str.length)==str)
return true;
else
return false;
return true;
};
/**
* Extend contains method
* @param item
* @return
*/
Array.prototype.contains = function(item){
return RegExp("\b" item "\b").test(this);
};
/**
* IE does not support the indexOf method, add the indexOf method for IE
*/
Array.prototype.indexOf = function(val){
var value = this;
for(var i =0; i < value.length; i ){
if(value[i] == val) return i;
}
return -1;
};