var flashNodeName = 'categories_object';
var topMenuId = 'topMenuContent';
var topMenuFile = 'includes/boxes/categories.php';
var flashPost = 'flashPost';

function refreshTopMenuWithSubCatId(catId, subcatId) {
	var params = {};
	params.flashPost = flashPost;
	params.CatId = catId;
	if (subcatId != undefined) params.SubCatId = subcatId;
	new Ajax.Updater(topMenuId, topMenuFile, {
		asynchronous: true, 
		method: 'post',
		parameters: params
	});
}
function refreshFlashWithSubCatId(id) {
	try {
		getFlash(flashNodeName).refreshWithSubCatId(id);
	} catch (error) {
		
	}
}
function refreshFlashWithCatId(id) {
	try {
		getFlash(flashNodeName).refreshWithCatId(id);
	} catch (error) {
		
	}
}
function getFlash(flashName) {
	if (navigator.appName.indexOf("Microsoft") != -1) return window[flashName];
	else return document[flashName];
}
