function $isBrowser(str){
str=str.toLowerCase();
var b = navigator.userAgent.toLowerCase();
var isBro=false;
switch (str){
case 'chrome' : isBro=b.indexOf("chrome") != -1; break;
case 'firefox' : isBro=b.indexOf("firefox") != -1; break;
case 'opera' : isBro=b.indexOf("opera") != -1; break;
case 'safari' : isBro=b.indexOf("safari") != -1 && b.indexOf("chrome") == -1; break;
case 'ie' : isBro=b.indexOf("msie") != -1; break;
case 'ie6' : isBro=b.indexOf("msie 6") != -1; break;
case 'ie7' : isBro=b.indexOf("msie 7") != -1; break;
case 'ie8' : isBro=b.indexOf("msie 8") != -1; break;
case 'ie9' : isBro=b.indexOf("msie 9") != -1; break;
case 'ie10' : isBro=b.indexOf("msie 10") != -1; break;
case 'gecko' : isBro=b.indexOf("opera")== -1 && b.indexOf("safari") == -1 && b.indexOf("chrome") == -1 && b.indexOf("gecko") > -1; break;
}
return isBro;
}