﻿// JScript
// <![CDATA[
var properties = { 
    width: 500,
    height: 400,
    status: 'yes',
    scrollbars: 'yes',
    resizable: 'no'
};
function popup() {
    var link = this.getAttribute('href');
    var prop_str = '';
    for (prop in properties) {
        prop_str = prop_str + prop + '=' + properties[prop] + ',';
    }
    prop_str = prop_str.substr(0, prop_str.length - 1);
    var newWindow = window.open(link, '_blank', prop_str);
    if (newWindow) {
        if (newWindow.focus) newWindow.focus();
        return false;
    }
    return true;
}
function setupPopups() {
    var links = document.getElementsByTagName('a');
    for (var i = 0; i < links.length; i++) {
        if (links[i].getAttribute('rel') &&
            links[i].getAttribute('rel') == 'popup') links[i].onclick = popup;
    }
}
window.onload = function() {
    setupPopups();
}
// ]]>
