// JavaScript Document

function buildpopup(menuid){
	
	menuitem = document.getElementById("menu"+menuid);
	floater = document.getElementById("floatingmenu");
	var menutext = "";
	var maxlength
	for(var i = 0;i<menuitems[menuid].length;i++){
		var singlemenu = menuitems[menuid][i].split(",");
		menutext += "<div class=\"leftedge\"></div><a href=\""+singlemenu[1]+"\" onMouseOver=\"javascript:showpopup("+menuid+");\" onMouseOut=\"javascript:hidepopup("+menuid+");\">"+singlemenu[0]+"</a><div class=\"rightedge\"></div><div style=\"clear:both\"></div>";	
	}
	floater.innerHTML = menutext;
	floater.style.left = (menuitem.offsetLeft)+"px";
	floater.style.display = "block";
}
function showpopup(menuid){
	floater = document.getElementById("floatingmenu");
	floater.style.display = "block";
}
function hidepopup(){
	floater = document.getElementById("floatingmenu");
	floater.style.display = "none";
}

function MM_preloadImages() { //v3.0
 var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
  var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
  if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function resize(){

			
	  if( typeof( window.innerWidth ) == 'number' ) {
		  windowheight = window.innerHeight;
		  windowwidth = window.innerWidth;
		  scrollheight = window.pageYOffset;
		  scrollwidth = window.pageXOffset;
	  } else if( document.documentElement && document.documentElement.clientWidth ) {
		  windowheight = document.documentElement.clientHeight;
		  windowwidth = document.documentElement.clientWidth;
		  scrollheight = document.documentElement.scrollTop;
		  scrollwidth = document.documentElement.scrollLeft;
	  } else if( document.body && document.body.clientWidth ) {
		  windowheight = document.body.clientHeight;
		  windowwidth = document.body.clientWidth;
		  scrollheight = document.body.scrollTop;
		  scrollwidth = document.body.scrollLeft;
	  }
	  if(document.getElementById("footer")){
		  var popup = document.getElementById("footer");
		  var pageHeight = windowheight - parseInt(popup.offsetTop);
		  popup.style.height = Math.max(pageHeight,150)+"px";
		  
	  }
}


var params = {};
params.wmode = "transparent";
params.allowscriptaccess = "always";
var attributes = {};
var flashvars = {};
swfobject.embedSWF("flash/banner.swf", "banner", "800", "222", "9.0.0", "flash/expressInstall.swf", flashvars, params, attributes);


