function popup(link_element, pop_title, pop_width, pop_height, properties)
{
    switch (properties)
    {
        case 'no':
            properties = 'location=no,menubar=no,resizable=no,scrollbars=no,status=no,toolbar=no';
        break;
        case 'yes':
            properties = 'location=yes,menubar=yes,resizable=yes,scrollbars=yes,status=yes,toolbar=yes';
        break;
        case 'scroll':
            properties = 'location=no,menubar=no,resizable=no,scrollbars=yes,status=no,toolbar=no';
        break;
        case 'club':
            properties = 'location=no,menubar=no,resizable=yes,scrollbars=yes,status=no,toolbar=no';
        break;
        default:

        break;
    }
    
    if (screen.availWidth <= pop_width || screen.availHeight <= pop_height)
    {
        pos_left = 1;
        pos_top  = 1;
    }
    else
    { 
        pos_left = (screen.availWidth - pop_width) / 2;
        pos_top  = (screen.availHeight - pop_height) / 2;
    }
    
    popup_window = window.open('' + link_element.getAttribute('href') + '','' + pop_title + '','' + properties + ',width=' + pop_width + ',height=' + pop_height + ',left=' + pos_left + ',top=' + pos_top + '');
    popup_window.focus();
    
    return false;
}

