function toEmail(obj){ if(obj!=""&&obj.indexOf("@")>0){ var str=obj.substr(obj.indexOf("@")+1); if(str.indexOf('gmail')>-1){ window.open("http://mail.google.com"); }else{ window.open('http://mail.'+str); } } }