var listMenu = new FSMenu('listMenu', true, 'display', 'block', 'none');
listMenu.animations[listMenu.animations.length] = FSMenu.animSwipeDown;


function bestCatchInit() {
	listMenu.activateMenu('listmenuroot');
}

function imagePopup(el) {
	var dimensions = el.className.substr(17).split('x');
	var offset = [40, 40];

	for(var i = 0; i < dimensions.length; i++) {
		dimensions[i] = parseInt(dimensions[i]) + offset[i];
	}

	var position = [
		((screen.availWidth || screen.width || window.screen.availWidth || window.screen.width) - dimensions[0]) / 2,
		((screen.availHeight || screen.height || window.screen.availHeight || window.screen.height) - dimensions[1]) / 2
	]
	
	window.open(el.href, 'BestCatchCandidatePopup', 'width=' + dimensions[0] + ',height=' + dimensions[1] + ',left=' + position[0] + ',top=' + position[1] + ',menubar=0,location=0,resizable=1,status=1,toolbar=0');
	
	return false;
}

function popup(el) {
	window.open (el.href,"BestCatchRegistrationPopup", 'width=600, height=500, scrollbars=yes');
	return false;
}

function PopupGallery(el) {
	var dimensions = [640, 623];

	var position = [
		((screen.availWidth || screen.width || window.screen.availWidth || window.screen.width) - dimensions[0]) / 2,
		((screen.availHeight || screen.height || window.screen.availHeight || window.screen.height) - dimensions[1]) / 2
	]
	
	window.open(el.href, 'bestcatchGalleryPopup', 'width=' + dimensions[0] + ',height=' + dimensions[1] + ',left=' + position[0] + ',top=' + position[1] + ',menubar=0,location=0,resizable=1,status=1,toolbar=0');
	
	return false;
}

addEvent(window, 'load', bestCatchInit);