function showPets( )
{
    if( !document.getElementById ) return;

    // Get the select box so and count total number available
    var s = document.getElementById("How_Many_Pets");
    var total = s.options.length;

    // Get the current selection
    var current = s.options[s.selectedIndex].value;

    // Show the current selection amount, hide the rest
    for( var i = 0; i < total; i++ )
    {
        var n = document.getElementById("pet"+(i+1));
        n.style.display = ( (i+1)<=current ? "block" : "none" );
    }
}
function attachHandlers()
{
    if( !document.getElementById ) return;

    var s = document.getElementById("How_Many_Pets");
    s.onchange = showPets;
}

window.onload = function()
{
   P7_equalCols2(1,'sidebar','P','maincontent','P');
   P7_initTBM(1,2,1,1,200,8);
   P7_initTP(8,1);
   attachHandlers();
   showPets();
}