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)
{
    //track("preview+"+player+"+"+size);
    popWindow("clips.html?movie=trailer&size=" + player.toUpperCase() + size.toLowerCase(),600,420,"trailer");
}

function popTotemGame()
{
    track("totem+game");
    popWindow("bb-totem.html",600,420,"totem_game");
}

function popMooseGame()
{
    track("grazin+game");
    popWindow("bb-grazing.html",640,480,"moose_game");
}

function popSalmonGame()
{
    popWindow("salmonrun.html",640,480,"salmon_game");
}

function popAIM()
{
    track("icons+dload");
    popWindow("aim/index.html",500,337,"aim_icons");
}

function popWallpaper(number, size)
{
    /*var zero = '';
    if (number < 10)
        zero = '0';*/

    track("wp"+number+"+"+size);
    openWindow('wallpapers/instructions.html?wallpaper=desktop'+number+'_'+size+'.jpg');
}

function popRegister()
{
    //track("register");
    openWindow("http://register.go.com/wdpictures/login?appRedirect=http://disney.go.com/disneypictures/brotherbear/index.html");
}

function linkPreview()
{
    //track("deeplink+preview");
    window.location.href = "detect.html?dl=3";
}
function linkGames()
{
    //track("deeplink+games");
    window.location.href = "detect.html?dl=6";
}

function popCard(card,targetName,sourceName)
{
    //track("card+"+card);
    popWindow("ecards/index.html?card="+card+"&sourceName="+sourceName+"&targetName="+targetName,600,370,"ecard");
}

function popColorUsGame()
{
    popWindow("bb-colorus.html",600,420,"color_us");
}

function popTokensGame()
{
    //track("token+game")
    openWindow("http://disney.tokenzone.com/dtz2/set/brotherbear/CaptureEvent?sc=tc1302-HPVS5-UDTCK-H6KBQ");
}

function popMooseTakes(player, size)
{
    //track("moose+takes+"+player+"+"+size);
    popWindow("clips.html?movie=moosetakes&size=" + player.toUpperCase() + size.toLowerCase(),600,420,"moose_takes");
}

function popMooseWhisperer(mwNumber)
{
    popWindow("moose_whisperer/mw.html?mw="+mwNumber, 640, 420, "moose_whisperer");
}

function popWorldwide()
{
    popWindow("wmeiopc_pop.html", 482, 272, "wmeiopc");
}

function popHoofinIt()
{
    popWindow("hoofinit/hoofinit.html", 640, 420, "hoofin_it");
}

function popMysticMoose()
{
    track("mystic+moose+game");
    popWindow("mystic_moose/mystic.html", 640, 420, "mystic_moose");
}

function popISpy()
{
    alert("i spy");
}

function popJoinTheQuest()
{
    popWindow("http://disney.go.com/disneypictures/brotherbear/totemHunt/index.html", 500, 504, "found");
}

function popStumpMoose()
{
    alert("stump the moose");
}

function popSSOSX()
{
    track("ss+os10+dload");
    popWindow("screensaver/bb_ss_OSX.sit", 100, 100, "screensaver");
}

function popSSOS9()
{
    track("ss+os09+dload");
    popWindow("screensaver/bb_ss_OS9.sit", 100, 100, "screensaver");
}

function popSSWindows()
{
    track("ss+windows+dload");
    popWindow("screensaver/brother_bear_ss_setup.zip", 100, 100, "screensaver");
}

function popPhilCollinsVideo()
{
    track("music+video");
    popWindow("http://disney.go.com:80/disneyrecords/soundtracks/brotherbear/popvideo.html", 300, 346, "phil_collins");
}

function popOrder()
{
    track("order");
    //popWindow("http://disneyvideos.disney.go.com/moviefinder/calltoorder.html", 382, 350, "_blank");
	openWindow("http://go-disneystore.com/brotherbeardvd");
}

function popDvdTrailer()
{
    track("trailer");
    popWindow("http://www.totaleclips.com/disney/player/splash.asp?clipid=e18950",340,470,"trailer");
}

function popScreenMate()
{
    //alert("Coming Soon");
	popWindow("comingsoon.html",320,230,"trailer");
}

function popTradingCards()
{
    track("tradingCards");
	openWindow("http://disney.tokenzone.com/dtz2/set/brotherbear/HandleEvent");
}
/*	SEE BVHE.JS FOR THIS
function popAwards()
{
	popWindow("awards.html", 301, 300, "bb_awards");
}
*/
