/* 
Suzanne's popUp code and full explanation
Please redistribute wildly and include this comment.

Good references:
http://www.irt.org/articles/js128/index.htm - primer
http://www.irt.org/articles/js205/index.htm - almost complete control of pop up windows
*/

// this variable names the current window (for using the popUp as a remote)

window.name = "NetSetGoMarketing";

// this function opens the pop-up window

var newWin;

function popUp(page, name, details) {
newWin=window.open(page, name, details);
newWin.focus();
return false;
}

/* Use this in the A HREF tag:

Standard (nothing but the file):

<a href="images/image.jpg" onClick="return popUp('images/image.jpg', 'imageName', 'width=xxx,height=xxx')"></a>

Custom (all the options):

<a href="images/image.jpg" onClick="return popUp('images/image.jpg', 'imageName', 'width = xxx,height = xxx,directories = no,location = no, menubar = no,resizable = no,scrollbars = no, status = no,toolbar = no,screenX = xxx,screenY = xxx,top = xxx,left = xxx')"></a>

To enable an option, replace "no" with "yes". "xxx" should be replaced with pixel values.
screenX, screenY, top and left position the window on the screen, and you need both to have it work in IE and Netscape

You can use .html files or images, same as usual with an <a> tag.

*/

// open external links in new windows

function externalOnlyLinks() {
    if (!document.getElementsByTagName) return
    var anchors = document.getElementsByTagName("a")
    for (var i=0; i<anchors.length; i++) {
        var anchor = anchors[i]
        if (anchor.getAttribute("href") && anchor.getAttribute("rel") == "external") {
            anchor.target = "_blank"
        }
    }
}
window.onload = externalOnlyLinks;

