function popWindow( url, width, height, windowName )
{
    //get center coords
    var left = (screen.width - width) / 2;
    var top = (screen.height - height) / 2;
    
    win=window.open(url, windowName, 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=' + width + ',height=' + height + ',left=' + left + ',top=' + top);
}
function popScrollingWindow(url, width, height, windowName)
{
    //get center coords
    var left = (screen.width - width) / 2;
    var top = (screen.height - height) / 2;
    
    win=window.open(url, windowName, 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=0,width=' + width + ',height=' + height + ',left=' + left + ',top=' + top);
}
function openWindow(url)
{
    var rand = "_blank";
    win=window.open(url,rand,"directories=yes,location=yes,menubar=yes,scrollbars=yes,status=yes,toolbar=yes,resizable=yes");
}

function popTrailer(player, size)
{
    popWindow("trailer/clips.html?movie=trailer&size=" + player.toUpperCase() + size.toLowerCase(),700,500,"trailer");
}

function popTotemGame()
{
    popWindow("bb-totem.html",600,420,"totem_game");
}

function popMooseGame()
{
    popWindow("bb-grazing.html",640,480,"moose_game");
}

function popSalmonGame()
{
    popWindow("salmonrun.html",640,480,"salmon_game");
}

function popAIM()
{
    popWindow("aim/index.html",500,337,"aim_icons");
}

function popWallpaper(number, size)
{
    /*var zero = '';
    if (number < 10)
        zero = '0';*/

    openWindow('wallpapers/instructions.html?wallpaper=desktop'+number+'_'+size+'.jpg');
}

function popRegister()
{
 openWindow("http://register.go.com/wdpictures/login?appRedirect=http://disney.go.com/disneypictures/brotherbear/index.html");
}

function linkPreview()
{
    window.location.href = "detect.html?dl=3";
}
function linkGames()
{
    window.location.href = "detect.html?dl=6";
}

function popCard(card,targetName,sourceName)
{
    popWindow("ecards/index.html?card="+card+"&sourceName="+sourceName+"&targetName="+targetName,600,370,"ecard");
}

function popColorUsGame()
{
    popWindow("bb-colorus.html",600,420,"color_us");
}

function popStumpMoose()
{
    alert("stump the moose");
}

function popTerms()
{
    popScrollingWindow("terms.html",486,450,"terms");
}
function popMelodyGame()
{
    popWindow("melody/melody.html",750,550,"melody");
}

function popActivityBook()
{
    popWindow("activitybook/",750,550,"activity");
}