
function openPopup(url, width, height) {
    var wx = (screen.availWidth - width) / 2;
    var wy = (screen.availHeight - height) / 2;
    window.open(
        url,
        'popup',
        'width=' + width + ', height=' + height +
        ', status=no, title=no, scrollbars=no, resizable=no, left=' +
        wx + ', top=' + wy
    );
}

function openPopupResizable(url, width, height) {
    var wx = (screen.availWidth - width) / 2;
    var wy = (screen.availHeight - height) / 2;
    window.open(
        url,
        'popup',
        'width=' + width + ', height=' + height +
        ', status=yes, title=no, scrollbars=yes, resizable=yes, left=' +
        wx + ', top=' + wy
    );
}


jQuery(function() {
	jQuery('a[rel*=facebox]').facebox();
    
    var userAgent = navigator.userAgent.toLowerCase();
    
    if (userAgent.indexOf('chrome')!= -1) {
        var e = document.getElementById('footer');
        if (e) {
            e.style.marginLeft = '2px';
        }
        jQuery("#footer").css("marginLeft", "1px");
        jQuery("#ddcolortabs a span").css("paddingRight", "23px");
        return;
    }
    
    if (jQuery.browser.safari || userAgent.indexOf('mac')!= -1) {
        var e = document.getElementById('last_link');
        if (e) {
            e.style.paddingRight = '12px';
        }
    } 
});
