// source javascript - http://alistapart.com/articles/popuplinks
// or http://v2studio.com/k/code/ (Caio Chassot)

// These defaults should be changed the way it best fits your site
var _POPUP_FEATURES = 'location=0,statusbar=0,menubar=0,width=350,height=250';
var _POPUP_FEATURES_flash = 'location=0,statusbar=0,menubar=0,width=625,height=625';


// The functions for the mediaplayer
function raw_popup(url, target, features) {
    // pops up a window containing url optionally named target, optionally having features
    var theWindow = window.open(url, target, _POPUP_FEATURES);
    theWindow.focus();
    return theWindow;
}

function link_popup2(src, features) {
    // to be used in an html event handler as in: <a href="..." onclick="link_popup(this,...)" ...
    // pops up a window grabbing the url from the event source's href
    return raw_popup(src.getAttribute('href'), src.getAttribute('target') || '_blank', features);
}

// The functions for the flash
function raw_popup1(url, target, features) {
    // pops up a window containing url optionally named target, optionally having features
    var theWindow = window.open(url, target, _POPUP_FEATURES_flash);
    theWindow.focus();
    return theWindow;
}

function link_popup1(src, features) {
    // to be used in an html event handler as in: <a href="..." onclick="link_popup(this,...)" ...
    // pops up a window grabbing the url from the event source's href
    return raw_popup1(src.getAttribute('href'), src.getAttribute('target') || '_blank', features);
}
