﻿// <![CDATA[
var properties = { width: 1100, height: 550, scrollbars: 'yes', resizable: 'yes' };

function open_win(link)
{
    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();
}
// ]]>