You can use this function.
<button id="openLink" value="http://www.google.com">Open Link</button>
first you must add the event to the object
document.getElementById("openLink").addEventListener("click", openTab, false);
here is the function.
function openTab(){
var a = document.createElement("a");
a.href = document.getElementById("openLink").value;
var evt = document.createEvent("MouseEvents");
evt.initMouseEvent("click", true, true, window, 0, 0, 0, 0, 0, true, false, false, false, 0, null);
a.dispatchEvent(evt);
}
I think I saw this question on the forum, if I find the link I'll stick
I made some changes, and i create a new jsfiddle ->
http://jsfiddle.net/PXR8f/