i've tried this code but focus is on opened tab:
var a = document.createElement("a");
a.href = "http://www.google.com/";
var evt = document.createEvent("MouseEvents");
evt.initMouseEvent("click", true, true, window, 0, 0, 0, 0, 0, true, false, false, false, 0, null);
What you seek is called a "pop-under" window
However, it's not a guarantee as user browser settings may override this behavior, especially pop-up blockers.