var timeout;

function showSubmenu() {
	clearHideTimeout();
	if (document.getElementById)
		document.getElementById('offer_submenu').style.display = 'block';
}

function hideSubmenu() {
	if (document.getElementById)
		document.getElementById('offer_submenu').style.display = 'none';
}

//function setting time interval before hiding all menus
function setHideTimeout() {
	timeout = window.setTimeout(hideSubmenu, 300);
}
function clearHideTimeout() {
	window.clearTimeout(timeout);
}
