
function Brand(brandID, brandName)
{
    this.brandID = brandID;
    this.brandName = brandName;
}



var arrBrands = new Array(
      ''
      ,new Brand('55', 'Girls')
      ,new Brand('56', 'Games and Entertainment')
      ,new Brand('57', 'Pre-School')
      ,new Brand('58', 'Boys')
      ,new Brand('118', 'Nursery')
)



function Cat(catID, catName)
{
    this.catID = catID;
    this.catName = catName;
}



var arrCatsProd = new Array(
    ''
 
 
    ,new Array(
         new Cat('66', 'Barbie Accessories')
         ,new Cat('64', 'Barbie Collectibles')
         ,new Cat('61', 'Barbie Dolls')
         ,new Cat('63', 'Barbie Older Girl')
         ,new Cat('75', 'Diva Starz')
         ,new Cat('109', 'Miracle Baby')
         ,new Cat('115', 'Other Girls')
         ,new Cat('92', 'Polly Pocket')
         ,new Cat('98', 'What\'s Her Face')
    )
 
 
    ,new Array(
         new Cat('79', 'Harry Potter')
         ,new Cat('88', 'Nickelodeon')
         ,new Cat('113', 'Other Games & Puzzles')
         ,new Cat('111', 'Scrabble')
         ,new Cat('112', 'UNO')
    )
 
 
    ,new Array(
         new Cat('72', 'Disney')
         ,new Cat('114', 'Fisher Price')
         ,new Cat('105', 'Imaginext')
         ,new Cat('89', 'Little People')
         ,new Cat('90', 'Pixter')
         ,new Cat('93', 'Power Wheels')
         ,new Cat('99', 'Preschool Characters')
         ,new Cat('91', 'Rescue Heroes')
    )
 
 
    ,new Array(
		new Cat('213', 'Batman')
         ,new Cat('102', 'Hot Wheels Cars & Accessories')
         ,new Cat('103', 'Hot Wheels Tracks & Playsets')
         ,new Cat('214', 'Masters of the Universe')
         ,new Cat('83', 'Matchbox')
         ,new Cat('86', 'Max Steel')
         ,new Cat('215', 'Other Boys')
         ,new Cat('96', 'Tyco R/C')
         ,new Cat('117', 'Warner Bros')
         ,new Cat('110', 'Yu Gi Oh')
    )
 
 
    ,new Array(
         new Cat('119', 'Babygear')
    )
 
)
 
 

var arrCatsFAQ = new Array(
    ''
 
 
    ,new Array(
         new Cat('66', 'Barbie Accessories')
         ,new Cat('64', 'Barbie Collectibles')
         ,new Cat('61', 'Barbie Dolls')
         ,new Cat('63', 'Barbie Older Girl')
         ,new Cat('75', 'Diva Starz')
         ,new Cat('109', 'Miracle Baby')
         ,new Cat('115', 'Other Girls')
         ,new Cat('92', 'Polly Pocket')
         ,new Cat('98', 'What\'s Her Face')
    )
 
 
    ,new Array(
         new Cat('79', 'Harry Potter')
         ,new Cat('88', 'Nickelodeon')
         ,new Cat('113', 'Other Games & Puzzles')
         ,new Cat('111', 'Scrabble')
         ,new Cat('112', 'UNO')
    )
 
 
    ,new Array(
         new Cat('72', 'Disney')
         ,new Cat('114', 'Fisher Price')
         ,new Cat('105', 'Imaginext')
         ,new Cat('89', 'Little People')
         ,new Cat('90', 'Pixter')
         ,new Cat('93', 'Power Wheels')
         ,new Cat('99', 'Preschool Characters')
         ,new Cat('91', 'Rescue Heroes')
    )
 
 
    ,new Array(
         new Cat('102', 'Hot Wheels Cars & Accessories')
         ,new Cat('103', 'Hot Wheels Tracks & Playsets')
         ,new Cat('83', 'Matchbox')
         ,new Cat('86', 'Max Steel')
         ,new Cat('93', 'Power Wheels')
         ,new Cat('96', 'Tyco R/C')
         ,new Cat('110', 'Yu Gi Oh')
    )
 
 
    ,''
 
)
 
 

var arrCatsInstrux = new Array(
    ''
 
 
    ,new Array(
         new Cat('115', 'Other Girls')
    )
 
 
    ,''
 
 
    ,new Array(
         new Cat('114', 'Fisher Price')
         ,new Cat('105', 'Imaginext')
         ,new Cat('89', 'Little People')
         ,new Cat('90', 'Pixter')
         ,new Cat('91', 'Rescue Heroes')
    )
 
 
    ,''
 
 
    ,new Array(
         new Cat('119', 'Babygear')
    )
 
)
 
 

function popCats(selected, arrCats)
{
  	var mySel = document.forms.formSearch.Category;
	if(!mySel) return;
		
	mySel.options.length = 0;
  	var thisCat = arrCats[getIndex(selected)];
  	
  	var no = new Option();
	no.value = 0;
	no.text	 = '- Please Select -';
	no.selected = true;
	mySel.options[mySel.options.length] = no;
  	
	for(i=0;i<thisCat.length;i++)
	{
		var no = new Option();
		no.value = thisCat[i].catID;
		no.text	 = thisCat[i].catName;
		mySel.options[mySel.options.length] = no;
	}


}

function popBrands(arrCats)
{
  	var mySel = document.forms.formSearch.Brand;
	if(!mySel) return;
		
	mySel.options.length = 1;
  	
  	for(i=1;i<arrBrands.length;i++)
  	{
  		var thisBrandID = arrBrands[i].brandID;
  		var thisBrandName = arrBrands[i].brandName;
		
		if (arrCats[i].length > 0)
		{	
  			var no = new Option();
			no.value = thisBrandID;
			no.text	 = thisBrandName;
			mySel.options[mySel.options.length] = no;
  		}
	}  	

}


function getIndex(brandID)
{
  	for(i=1;i<arrBrands.length;i++)
  	{
  		var thisBrandID = arrBrands[i].brandID;
		if (thisBrandID == brandID) return i;
	}
	return 0;

}



