var datum = new Date();

var startList = function() {
	if (document.all && document.getElementById) {
		navRoot = $("nav");
		for (i = 0; i < navRoot.childNodes.length; i++) {
			node = navRoot.childNodes[i];
			if (node.nodeName == "LI") {
				node.onmouseover = function() {
					this.className += " over";
				};
				node.onmouseout = function() {
					this.className = this.className.replace(" over", "");
				};
			}
		}
	}
	$("nav").style.visibility = "visible";
};
function InitMenu()
{
	var flashvars = {
		docRoot: "/",
		xmlPath: "",
		xmlFile: "MenuGenerate",
		themeID: parseInt(datum.getMonth(), 10) + 1
	};
	var params = {
		allowScriptAccess: "sameDomain",
		wmode: "transparent",
		quality: "best",
		allowFullScreen: "true"
	};
	var attributes = {};
	attributes.id = "flash_menu";
	swfobject.embedSWF("swf/mainmenu.swf", "nav", "100%", "60px", "8.0.0", "swf/expressInstall.swf", flashvars, params, attributes);
}
function setFlashMenuHeight(h)
{
	swfobject.createCSS("#flash_menu", "height: "+h+"px;");
}
function setFlashMenuWidth(w)
{
	swfobject.createCSS("#flash_menu", "width: "+w+"px;");
}

function InitPromo(firstelement)
{
	var flashvars = {
		docRoot: "/",
		xmlPath: "",
		xmlFile: "PromoGenerate?id="+firstelement,
		promoPath: "gallery/",
		themeID: parseInt(datum.getMonth(), 10) + 1
	};
	var params = {
		allowScriptAccess: "sameDomain",
		wmode: "transparent",
		quality: "best",
		allowFullScreen: "true"
	};
	var attributes = {};
	attributes.id = "promo_rotator";
	
	swfobject.embedSWF("swf/akcios_promorotator.swf", "promo_rotator", "972px", "150px", "8.0.0", "swf/expressInstall.swf", flashvars, params, attributes);
}

var hasFlash = swfobject.hasFlashPlayerVersion("8.0.0");
if (hasFlash) addEvent(window, "load", InitMenu);
	else addEvent(window, "load", startList);