function isValidEmail(str) {
	// check validity of email address
	return (str.indexOf(".") > 2) && (str.indexOf("@") > 0);
}

function mainMenuMouseOver(subMenu) {
	// hide original menu and show 'subMenu'
	////////// window.alert('hide menu ' + currentSubMenu + ' and show menu ' + subMenu)
	// if not same menu then act
	if (subMenu != currentSubMenu) {
		// hide current
		hideSubMenu(currentSubMenu)
		// show new
		showSubMenu(subMenu)
		// set new current
		currentSubMenu = subMenu
	}
}

function mainMenuMouseOut(subMenu) {
	// hide 'subMenu' and show original one
	////////// window.alert('hide menu ' + subMenu + ' and show menu ' + currentSubMenu)
	// if not same menu then act
	//if (subMenu != currentSubMenu) {
	//	// hide new
	//	hideSubMenu(subMenu)
	//	// show current
	//	showSubMenu(currentSubMenu)
	//}
}

function showSubMenu(num) {
	var e = document.getElementById('subMenu' + num + 'Div');
	if (e) e.style.visibility = 'visible';
}

function hideSubMenu(num) {
	var e = document.getElementById('subMenu' + num + 'Div');
	if (e) e.style.visibility = 'hidden';
}

function initSubMenus(num) {
	for (var i=1; i < (num+1); i++) {
		//showSubMenu(i)
		//if (currentSubMenu != i) hideSubMenu(i)
		hideSubMenu(i)
	}
}