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 = "rand";
    win=window.open(url,rand,"directories=yes,location=yes,menubar=yes,scrollbars=yes,status=yes,toolbar=yes,resizable=yes");
}

function popTrailerSplash()
{
    //popWindow("trailer/index.html", 500, 400, "trailer");
	window.location.href = 'index2.html?gotoSection=kanga&DETECT=SWF.5000000';
}

function popTrailer(type, size)
{
    if (type == "qt")
    {
        popWindow("trailer/trailer.html?movie=QT"+size,500,400,"trailer");
    }
    else if (type == "wm")
    {
        popWindow("trailer/movies_noback.html?movie=WM"+size,500,400,"trailer");
    }
    else if (type == "rm")
    {
        popWindow("trailer/movies_noback.html?movie=RM"+size,500,400,"trailer");
    }
}

function popCarlyClip(type, size)
{
    if (type == "qt")
    {
        popWindow("clip.html?movie=QT"+size,594,305,"carlyclip");
    }
    else if (type == "wm")
    {
        popWindow("clip.html?movie=WM"+size,594,305,"carlyclip");
    }
}

function popClip(clip, type, size)
{
    popWindow("clip2.html?movie="+clip+"&size="+type+size, 594, 320, "clip");
}

function popGameClip(type, size)
{
    popWindow("gameclip.html?size="+type+size, 610, 390, "clip");
}

function popSweepstakes()
{
    openWindow('http://register.go.com/wdpictures/sweeps/piglet/entry');
}

function popHoneyHarvest()
{
    popWindow('honeyharvest.html',400,500,'honeyharvest');
}

function popColorPiglet()
{
    popWindow('colorPiglet.html',550,432,'colorPiglet');
}

function popSendCard(card)
{
    popWindow('postcards/send.html?card=' + card, 500, 600, 'sendpostcard');
}
