var activeObject = "";

// FAQ Pop-Up
function faq( url )
{
    window.open(url, "popup", "menu=no,toolbar=no,width=700,height=800,scrollbars=1,resizable=0,directories=no,location=no,screenX=0,screenY=0,top=0,left=0");
}

// Terms and Conditions
function termsAndConditions()
{
    window.open("terms-conditions.html", "popup", "menu=no,toolbar=no,width=650,height=400,scrollbars=1,resizable=yes,directories=no,location=no,screenX=0,screenY=0,top=0,left=0");
}

function pointsHistoryArchive()
{
    window.open("points-history-archive.html", "popup", "menu=no,toolbar=no,width=650,height=400,scrollbars=1,resizable=yes,directories=no,location=no,screenX=0,screenY=0,top=0,left=0");
}

function openWindow( link )
{
    window.open(link, '_blank', 'width=800,height=600,toolbar=yes,status=yes,location=yes,menubar=yes,directories=yes,resizable=yes,scrollbars=yes');
}

function clearme( me, contents )
{
    if( me.value == contents )
    {
        me.value = '';
    }
}
function populateme( me, contents )
{
    if( me.value == '' )
        me.value = contents;
}

function open_win(url)
{
    window.open(url,'PopUp','width=600,height=650, top=100,left=100,resizable=yes,toolbar=no,scrollbars=yes, status=no, titlebar=no');
}

function openDisclaimerPopUp( url, urlText )
{
    var finalUrl = "http://www.pampers.com/en_US/common/includes/disclaimerPopUp.jsp?rLink=" + url + "&rTitle=" + urlText;
    window.open(finalUrl, "privacy", "resizable = 1, width=502, height=300");
}

function open_win_mobile(url)
{
    window.open(url,'PopUp','width=600,height=580, top=100,left=100,resizable=yes,toolbar=no,scrollbars=yes, status=no, titlebar=no');
}

function open_unsub_win(url)
{
    window.open(url,'Unsubscribe','width=740,height=410,toolbar=no,scrollbars=no,resizable=yes,top=150,left=100');
}

//function open_toy_win(url)
//{
//    window.open(url,'ToyADayToyWin','width=650,height=400,toolbar=no,scrollbars=no,resizable=yes,top=150,left=100');
//}
//
//function open_toy_terms_win()
//{
//    window.open('toy-day-sweepstakes-2011-terms-conditions.html', 'ToyADayTermsWin', 'menu=no,toolbar=no,width=650,height=400,scrollbars=1,resizable=yes,directories=no,location=no,screenX=0,screenY=0,top=0,left=0');
//}
//
function open_toy_winners_win()
{
    window.open('toy-day-sweepstakes-2011-winners.html', 'ToyADayWinnersWin', 'menu=no,toolbar=no,width=650,height=400,scrollbars=1,resizable=yes,directories=no,location=no,screenX=0,screenY=0,top=0,left=0');
}

//How to find codes page
function changeContent()
{
    if( document.all )
    {
        selectObject = document.all['select_type'];
    }
    else
    {
        selectObject = document.getElementById('select_type');
    }
    selectValue = selectObject[selectObject.selectedIndex].value;

    if( document.getElementById('bag') )
    {
        document.getElementById('bag').style.display = 'none';
    }
    if( document.getElementById('box') )
    {
        document.getElementById('box').style.display = 'none';
    }
    if( document.getElementById('tub') )
    {
        document.getElementById('tub').style.display = 'none';
    }
    if( document.getElementById('pack') )
    {
        document.getElementById('pack').style.display = 'none';
    }

    if( document.getElementById(selectValue) )
    {
        document.getElementById(selectValue).style.display = 'block';
    }

}

