
var radiocategory;
var radiogroup;
var radiotime;

var elementToSeeActualId_WithoutRadiotime;
var elementToSeeOldId;
var groupbaseActual;
var categories_count = new Object();

var elementToSeeCategoriesCount_MIN = 1;

categories_count["Art"] = new Object();

categories_count["Art"]["Modern"] = 3;

categories_count["Art"]["Vintage"] = 1;

categories_count["Art"]["Antique"] = 1;

categories_count["Audio_+BLANK+_Video"] = new Object();

categories_count["Audio_+BLANK+_Video"]["Modern"] = 5;

categories_count["Audio_+BLANK+_Video"]["Vintage"] = 1;

categories_count["Audio_+BLANK+_Video"]["Antique"] = 1;

categories_count["Beauty"] = new Object();

categories_count["Beauty"]["Modern"] = 2;

categories_count["Beauty"]["Vintage"] = 2;

categories_count["Beauty"]["Antique"] = 1;

categories_count["Boats"] = new Object();

categories_count["Boats"]["Modern"] = 1;

categories_count["Boats"]["Vintage"] = 1;

categories_count["Boats"]["Antique"] = 1;

categories_count["Books"] = new Object();

categories_count["Books"]["Modern"] = 4;

categories_count["Books"]["Vintage"] = 11;

categories_count["Books"]["Antique"] = 2;

categories_count["Business"] = new Object();

categories_count["Business"]["Modern"] = 9;

categories_count["Business"]["Vintage"] = 1;

categories_count["Business"]["Antique"] = 1;

categories_count["Clothes"] = new Object();

categories_count["Clothes"]["Modern"] = 8;

categories_count["Clothes"]["Vintage"] = 1;

categories_count["Clothes"]["Antique"] = 1;

categories_count["Collectibles"] = new Object();

categories_count["Collectibles"]["Modern"] = 1;

categories_count["Collectibles"]["Vintage"] = 1;

categories_count["Collectibles"]["Antique"] = 1;

categories_count["Computer_+BLANK+_Hardware"] = new Object();

categories_count["Computer_+BLANK+_Hardware"]["Modern"] = 4;

categories_count["Computer_+BLANK+_Hardware"]["Vintage"] = 1;

categories_count["Computer_+BLANK+_Hardware"]["Antique"] = 1;

categories_count["Computer_+BLANK+_Software"] = new Object();

categories_count["Computer_+BLANK+_Software"]["Modern"] = 2;

categories_count["Computer_+BLANK+_Software"]["Vintage"] = 1;

categories_count["Computer_+BLANK+_Software"]["Antique"] = 1;

categories_count["Domains"] = new Object();

categories_count["Domains"]["Modern"] = 4;

categories_count["Domains"]["Vintage"] = 1;

categories_count["Domains"]["Antique"] = 1;

categories_count["eBooks"] = new Object();

categories_count["eBooks"]["Modern"] = 7;

categories_count["eBooks"]["Vintage"] = 1;

categories_count["eBooks"]["Antique"] = 1;

categories_count["Electronics"] = new Object();

categories_count["Electronics"]["Modern"] = 3;

categories_count["Electronics"]["Vintage"] = 1;

categories_count["Electronics"]["Antique"] = 1;

categories_count["Food"] = new Object();

categories_count["Food"]["Modern"] = 2;

categories_count["Food"]["Vintage"] = 1;

categories_count["Food"]["Antique"] = 1;

categories_count["Games"] = new Object();

categories_count["Games"]["Modern"] = 5;

categories_count["Games"]["Vintage"] = 1;

categories_count["Games"]["Antique"] = 1;

categories_count["Graphics"] = new Object();

categories_count["Graphics"]["Modern"] = 2;

categories_count["Graphics"]["Vintage"] = 1;

categories_count["Graphics"]["Antique"] = 1;

categories_count["Health"] = new Object();

categories_count["Health"]["Modern"] = 8;

categories_count["Health"]["Vintage"] = 1;

categories_count["Health"]["Antique"] = 1;

categories_count["Home"] = new Object();

categories_count["Home"]["Modern"] = 8;

categories_count["Home"]["Vintage"] = 10;

categories_count["Home"]["Antique"] = 3;

categories_count["Hydraulics"] = new Object();

categories_count["Hydraulics"]["Modern"] = 2;

categories_count["Hydraulics"]["Vintage"] = 1;

categories_count["Hydraulics"]["Antique"] = 1;

categories_count["Industrial_+BLANK+_Machineries"] = new Object();

categories_count["Industrial_+BLANK+_Machineries"]["Modern"] = 2;

categories_count["Industrial_+BLANK+_Machineries"]["Vintage"] = 1;

categories_count["Industrial_+BLANK+_Machineries"]["Antique"] = 1;

categories_count["Jewels"] = new Object();

categories_count["Jewels"]["Modern"] = 3;

categories_count["Jewels"]["Vintage"] = 1;

categories_count["Jewels"]["Antique"] = 2;

categories_count["Job_+BLANK+_Opportunities"] = new Object();

categories_count["Job_+BLANK+_Opportunities"]["Modern"] = 2;

categories_count["Job_+BLANK+_Opportunities"]["Vintage"] = 1;

categories_count["Job_+BLANK+_Opportunities"]["Antique"] = 1;

categories_count["Job_+BLANK+_Resources"] = new Object();

categories_count["Job_+BLANK+_Resources"]["Modern"] = 2;

categories_count["Job_+BLANK+_Resources"]["Vintage"] = 1;

categories_count["Job_+BLANK+_Resources"]["Antique"] = 1;

categories_count["Language"] = new Object();

categories_count["Language"]["Modern"] = 3;

categories_count["Language"]["Vintage"] = 1;

categories_count["Language"]["Antique"] = 1;

categories_count["Lighting"] = new Object();

categories_count["Lighting"]["Modern"] = 2;

categories_count["Lighting"]["Vintage"] = 1;

categories_count["Lighting"]["Antique"] = 1;

categories_count["Magazines"] = new Object();

categories_count["Magazines"]["Modern"] = 1;

categories_count["Magazines"]["Vintage"] = 1;

categories_count["Magazines"]["Antique"] = 1;

categories_count["Motor_+BLANK+_Vehicles"] = new Object();

categories_count["Motor_+BLANK+_Vehicles"]["Modern"] = 4;

categories_count["Motor_+BLANK+_Vehicles"]["Vintage"] = 1;

categories_count["Motor_+BLANK+_Vehicles"]["Antique"] = 1;

categories_count["Music"] = new Object();

categories_count["Music"]["Modern"] = 5;

categories_count["Music"]["Vintage"] = 2;

categories_count["Music"]["Antique"] = 1;

categories_count["Newspapers"] = new Object();

categories_count["Newspapers"]["Modern"] = 1;

categories_count["Newspapers"]["Vintage"] = 2;

categories_count["Newspapers"]["Antique"] = 1;

categories_count["Office"] = new Object();

categories_count["Office"]["Modern"] = 2;

categories_count["Office"]["Vintage"] = 1;

categories_count["Office"]["Antique"] = 1;

categories_count["Pets"] = new Object();

categories_count["Pets"]["Modern"] = 5;

categories_count["Pets"]["Vintage"] = 1;

categories_count["Pets"]["Antique"] = 1;

categories_count["Phones"] = new Object();

categories_count["Phones"]["Modern"] = 8;

categories_count["Phones"]["Vintage"] = 1;

categories_count["Phones"]["Antique"] = 1;

categories_count["Real_+BLANK+_Estate"] = new Object();

categories_count["Real_+BLANK+_Estate"]["Modern"] = 6;

categories_count["Real_+BLANK+_Estate"]["Vintage"] = 1;

categories_count["Real_+BLANK+_Estate"]["Antique"] = 1;

categories_count["Robotics"] = new Object();

categories_count["Robotics"]["Modern"] = 2;

categories_count["Robotics"]["Vintage"] = 1;

categories_count["Robotics"]["Antique"] = 1;

categories_count["Sports"] = new Object();

categories_count["Sports"]["Modern"] = 4;

categories_count["Sports"]["Vintage"] = 1;

categories_count["Sports"]["Antique"] = 1;

categories_count["Toys"] = new Object();

categories_count["Toys"]["Modern"] = 2;

categories_count["Toys"]["Vintage"] = 11;

categories_count["Toys"]["Antique"] = 1;

categories_count["Travels"] = new Object();

categories_count["Travels"]["Modern"] = 3;

categories_count["Travels"]["Vintage"] = 1;

categories_count["Travels"]["Antique"] = 1;

categories_count["Ungrouped"] = new Object();

categories_count["Ungrouped"]["Vintage"] = 1;

categories_count["Ungrouped"]["Antique"] = 1;

categories_count["Websites"] = new Object();

categories_count["Websites"]["Modern"] = 5;

categories_count["Websites"]["Vintage"] = 1;

categories_count["Websites"]["Antique"] = 1;

categories_count["Ungrouped"] = new Object();

categories_count["Ungrouped"]["Modern"] = 2;

function ActualElementToSee_Hide()
{
	SwitchOff(groupbaseActual, elementToSeeActualId_WithoutRadiotime);
};

function ActualElementToSee_Show()
{
	SwitchOn(groupbaseActual, elementToSeeActualId_WithoutRadiotime);
};

function SetCheckedInMiscellaneousCategory(elementId_WithoutRadiotime)
{
	var elementId = elementId_WithoutRadiotime + '_' + radiotime;
	var element = document.getElementById(elementId);
	if(element)
	{
		var elementInputs = element.getElementsByTagName('input');
	};
	if(elementInputs)
	{
		for(var i=0; i<elementInputs.length; i++)
		{
			elementInput = elementInputs[i];
			elementInputId = elementInput.id;
			if(elementInputId.indexOf('Miscellaneous')<0)
			{
				elementInput.checked = '';
			}
			else
			{
				elementInput.checked = 'checked';
			}
		}
	};
};

function SetRadiocategory(radiocategory_value)
{
	radiocategory = radiocategory_value;
};

function SetRadiogroup(radiogroup_value, elementToSeeId_WithoutRadiotime)
{
	radiogroup = radiogroup_value;
	radiocategory = "Miscellaneous";
	SetCheckedInMiscellaneousCategory(elementToSeeId_WithoutRadiotime);
	SwitchOn(radiogroup_value, elementToSeeId_WithoutRadiotime);
};

function SetRadiotime(radiotime_value)
{
	radiotime = radiotime_value;
	radiocategory = "Miscellaneous";
	SetCheckedInMiscellaneousCategory(elementToSeeActualId_WithoutRadiotime);
	SwitchOn(groupbaseActual, elementToSeeActualId_WithoutRadiotime);
};

function SwitchOff(groupbase, elementToSeeId_WithoutRadiotime)
{
	elementToSeeActualId_WithoutRadiotime = elementToSeeId_WithoutRadiotime;
	groupbaseActual = groupbase;
	var elementToSeeId = elementToSeeId_WithoutRadiotime + '_' + radiotime;
	var elementToSeeBackgroundId = elementToSeeId + '_Background';
	var elementToSee = document.getElementById(elementToSeeId);
	var elementToSeeBackground = document.getElementById(elementToSeeBackgroundId);
	var elementToSeeCategoriesCount = categories_count[groupbase][radiotime];
	if(elementToSee)
	{
		elementToSee.style.display = 'none';
	};
};

function SwitchOn(groupbase, elementToSeeId_WithoutRadiotime)
{
	elementToSeeActualId_WithoutRadiotime = elementToSeeId_WithoutRadiotime;
	groupbaseActual = groupbase;
	var elementToSeeId = elementToSeeId_WithoutRadiotime + '_' + radiotime;
	var elementToSeeBackgroundId = elementToSeeId + '_Background';
	var elementToSee = document.getElementById(elementToSeeId);
	var elementToSeeBackground = document.getElementById(elementToSeeBackgroundId);
	var elementToSeeCategoriesCount = categories_count[groupbase][radiotime];
	if(typeof elementToSeeOldId != 'undefined')
	{
		var elementToSeeOld = document.getElementById(elementToSeeOldId);
		elementToSeeOld.style.display = 'none';
	};
	if( (elementToSee)&&(elementToSeeBackground)&&(elementToSeeCategoriesCount>elementToSeeCategoriesCount_MIN) )
	{
		elementToSeeHeight = elementToSeeCategoriesCount*2 + 5;
		elementToSeeBackground.style.height = elementToSeeHeight + 'em';
		elementToSee.style.display = 'block';
		elementToSeeOldId = elementToSeeId;
	};
};

radiotime = "Modern";

radiogroup = "Ungrouped";

radiocategory = "Miscellaneous";

if(radiogroup!='Ungrouped')
{
	groupbaseActual = radiogroup;
	elementToSeeActualId_WithoutRadiotime = "top_option_radiogroupcategories_" + radiogroup;
};
