function drawFlashMenu()
{
	var div1 = document.createElement("div");
	div1.style.position = "absolute"; 
	div1.style.width = "100%";
	div1.style.top = "0px";
	div1.style.left = "0px";
	div1.style.zIndex = "-1";
	
	var center1 = document.createElement("center");
	div1.appendChild(center1);
	
	var div2 = document.createElement("div");
	div2.id = "flashmenupos";
	div2.style.width = "1000px";
	div2.style.paddingTop = "100px";
	div2.style.textAlign = "left";
	div2.style.zIndex = "-1";
	center1.appendChild(div2);

	var div3 = document.createElement("div");
	div3.id = "flashmenucontainer";
	div3.style.position = "absolute";
	div3.style.left = "0px";
	div3.style.top = "100px";
	div3.style.zIndex = "1";

	var div4 = document.createElement("div");
	div4.id = "flashmenu";
	div3.appendChild(div4);

	document.body.appendChild(div3);
	document.body.appendChild(div1);

	var flashvars = {};
	var params = {};
	params.wmode = "transparent";
	params.currenturl = window.location;
	var attributes = {};
	swfobject.embedSWF("../files/menu.swf", "flashmenu", "90", "600", "9.0.0", false, flashvars, params, attributes);	
}

function updateFlashMenuPos()
{
	var div2 = document.getElementById("flashmenupos");
	var div3 = document.getElementById("flashmenucontainer");
	if(div2 && div3) {
		div3.style.left = div2.offsetLeft + "px";
		div3.style.top = "100px";
	}
}

if(window.addEventListener) {
	window.addEventListener("load", function(){drawFlashMenu();updateFlashMenuPos();}, false);
	window.addEventListener("resize", function(){updateFlashMenuPos();}, false);
} else if(window.attachEvent) {
	window.attachEvent("onload", function(){drawFlashMenu();updateFlashMenuPos();});
	window.attachEvent("onresize", function(){updateFlashMenuPos();});
}