<!DOCTYPE HTML>
<html>
<head> </head>
<body>
<script>
function setOnclick(a) {
a.setAttribute("onclick","popupWin = window.open(this.href,'contacts','location,width=1300px,top=0,left=100px'); popupWin.focus(); return false")
}
function externalLinks() {
var links = document.getElementsByTagName("a");
for (i=0; i<links.length; i++) {
if (links[i].getAttribute("href") && links[i].getAttribute("rel") == "external") {
setOnclick(links[i])
}
}
}
window.onload = externalLinks;
</script>
<a href="http://javascript.ru">клик (текущая)</a><br /><br />
<a rel="external" href="http://javascript.ru">Клик 2(в новом Окне)</a>
</body>
</html>
/a