This is my first time doing any coding of any type and to be honest I don't even know the proper terms for things

I'm using this code to open two webpages with one link and it works great! However, when I have two of these on the same page, when I click "Link 1" the webpages from "Link 2" open. Then I tried adding a script for a "Link 3" and when I clicked either "Link 1" or "Link 2" only the webpages for "Link 3" opened.
How do I stop this from happening? Do I need to separate the scripts? Stop them? Your help would be greatly appreciated!!
PHP Code:
<html>
<
head>
<
script type="text/javascript">
function 
open_win() {
window.open("http://www.facebook.com/")
window.open("http://www.google.com/")
}
</script>
</head>
<body>
<form>
<input type=button value="Link 1" onclick="open_win()">
</form>
</body>
</html> 

<html>
<head>
<script type="text/javascript">
function open_win() {
window.open("http://www.yahoo.com/")
window.open("http://www.msn.com/")
}
</script>
</head>
<body>
<form>
<input type=button value="Link 2" onclick="open_win()">
</form>
</body>
</html>