I have no idea. Let me politely urge you to BECOME advanced enough. This isn't the "where can I download scripts" forum, it's the "how do I write scripts" forum. You'll get plenty of help, from me and others. Let's start by defining the tasks your script needs to accomplish:
- maintain a counter
- alter the contents of an element
- open a new window
There. The task seems more managable, now, doesn't it?
Let's write some HTML markup as a test harness. We just need some simple hyperlinks. When the user clicks a link, all we want to do is task #1, increment a counter.
First, the HTML:
<html>
<head>
</head>
<body>
<a href="#" id="link_01">Hyperlink 1</a><br />
<a href="#" id="link_02">Hyperlink 2</a><br />
<a href="#" id="link_03">Hyperlink 3</a>
</body>
</html>
Simple enough. We don't want these links to go anywhere... the script will eventually do that for us. So, we set the HREF property to a hash-mark, which is essentially the top of the page.
Now, let's implement a counter, by adding to our HTML:
<html>
<head>
<script type="text/javascript">
var counter = 0;
function link_click()
{
counter++;
alert(counter);
}
</script>
</head>
<body>
<a href="#" id="link_01" onclick="link_click();">Hyperlink 1</a><br />
<a href="#" id="link_02" onclick="link_click();">Hyperlink 2</a><br />
<a href="#" id="link_03" onclick="link_click();">Hyperlink 3</a>
</body>
</html>
When the user clicks a link, it runs the script. The script increments the counter and displays the current value of the counter via an alert.
Digest that, ask any questions you have, and let me know when you're ready to move onto step #2.