var cpDropDownFormTitle;
var cpDropDownFormName;
var cpDropDownFormId;
var cpDropDownSelectId;
var cpDropDownTitleId;

if (!cpDropDownFormTitle) {
	cpDropDownFormTitle = "By Product Type...";
}
if (!cpDropDownFormName) {
	cpDropDownFormName = "cpDropDownFormName";
}
if (!cpDropDownFormId) {
	cpDropDownFormId = "cpDropDownFormId";
}
if (!cpDropDownSelectId) {
	cpDropDownSelectId = "cpDropDownSelectId";
}
if (!cpDropDownTitleId) {
	cpDropDownTitleId = "cpDropDownTitleId";
}


document.write ('<form method="GET" action="http://www.cafepress.com/' + cpshopid + '" name="' + cpDropDownFormName + '" id="' + cpDropDownFormId + '" class="' + cpDropDownFormId + '">');
document.write ('<input type=hidden name=s value="' + cpshopid + '">');
document.write ('<select name=type id="' + cpDropDownSelectId + '" class="' + cpDropDownSelectId + '" onChange="getType(document.' + cpDropDownFormName + ')">');
document.write ('<option class="' + cpDropDownTitleId + '" value="">' + cpDropDownFormTitle + '</option>');



for (categoryitem in productnumber)
{

var show = true;

for (checkit in dontshowlist)
	{

		if (categoryitem == dontshowlist[checkit]) {
			show = false;
		}
	}
	if (show) {
		document.write ('<option class="dropDownSpace"></option>');

		if (categoryitem.indexOf("c") == 0) {
			document.write ('<option class="dropDownCategory" value="' + categoryitem + '">' + category[categoryitem] + '</option>');
		} else {
			document.write ('<option class="dropDownCategory" value="">' + category[categoryitem] + '</option>');
		}	
	
			for (product in productname[categoryitem]) 
			{

				var show = true;
				
				for (checkit in dontshowlist)
					{
						if (productnumber[categoryitem][product] == dontshowlist[checkit]) {
							show = false;
						}
						if (productname[categoryitem][product] == dontshowlist[checkit]) {
							show = false;
						}
						
					}
					if (show) {
						if (productnumber[categoryitem][product] == "") {
							document.write ('<option class="dropDownSubCategory" value="">-' + productname[categoryitem][product] + '</option>');
						} else {
							document.write ('<option class="dropDownProduct" value="' + productnumber[categoryitem][product] + '">&nbsp;&nbsp;' + productname[categoryitem][product] + '</option>');
						}
					}		
			}
	}

}


document.write ('</select></form>');
