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 downloadFile(theFile)

{

    popWindow("download.html?theFile="+theFile, 300, 100, "downloadWindow");

}



function popTrailer()

{



    popWindow("trailer.html",702,392,"trailer");

}



function popClip(clip, player, size)

{

    player = player.toUpperCase();

    size = size.toLowerCase();



    track("watch+video+" + clip + "+" + player + "+" + size);



    popWindow('clips.html?movie='+clip+'&size='+player+size, 702, 392, "hotr_clip");

}



function popAim()

{

	track("aim+icons");

	popWindow('aim/aim.html', 500, 416, 'aim_icons');

}



function popEcard(card)

{

	track("ecard+"+card);

	popScrollingWindow("ecards/ecards.html?card="+card+"_card.jpg", 600, 600, "ecards");

}



function popEcard1()

{

	popEcard("maggie");

}

function popEcard2()

{

	popEcard("slim");

}

function popEcard3()

{

	popEcard("buck");

}

function popEcard4()

{

	popEcard("jack");

}



function popWallpaper(number, size)

{

	track("wallpaper+"+number+"+"+size);

	openWindow("wallpaper/wallpaper.html?wallpaper=wallpaper_"+number+"_"+size+".jpg");

}



function popColorUsGame()

{

	popWindow('colorus.html', 637, 500, 'color_us');

}



function popMineGame()

{

	popWindow("hotr-minecar.html", 640, 480, "minecar");

}



function popTokenGame()

{

	openWindow("http://disney.tokenzone.com/dtz2/set/hotr/Home");

}



function popBuckGame()

{

	popWindow("http://disney.go.com/disneypictures/homeontherange/buckrescue/index.html", 750, 450, "buck_game");

}



function popPatchChoir()

{

	popWindow("patch.html", 640, 582, "patch_game");

}



function popSSOS9()

{

	downloadFile("screensaver/hotr_ss_OS9.sit");

}



function popSSOSX()

{

	downloadFile("screensaver/hotr_ss_OSX.sit");

}



function popSSWindows()

{

	downloadFile("screensaver/screensaver_setup.zip");

}

