// --------------------------------------------------

var ventanaListen = {
  add : function(event,func){
    var e = this.Functions[event];
    e[func] = func;
  },
  remove : function(event,func){
    var e = this.Functions[event];
    delete e[func];
  },
  addEvent : function(event){
    window["on"+event] = function(){ventanaListen.run(event)};
    this.Functions[event] = {};
  },
  removeEvent : function(event){
    window["on"+event] = null;
    delete this.Functions[event];
  },
  run : function(event){// Private
    var e = this.Functions[event];
    for(var i in e) eval(e[i]);
  },
  Functions : {}// Private
};

// --------------------------------------------------

function funcOnload(){
	var content = document.getElementById("windowsize");
	var myWidth = whatSize();
	content.innerHTML = "Window Width = "+myWidth;
	passToFlash();
	checkTitlepage();
 	//alert("funOnload called.");
	
}

obj1 = {
  funcOnResize : function(){
	var content = document.getElementById("windowsize");
	var myWidth = whatSize();
	content.innerHTML = "Window Width = "+myWidth;
	passToFlashResize();
  }
};
// --------------------------------------------------
ventanaListen.addEvent("load");
ventanaListen.addEvent("resize");

ventanaListen.add("load","funcOnload()");
ventanaListen.add("resize","obj1.funcOnResize()");
ventanaListen.add("resize","myWidth = whatSize();");

// --------------------------------------------------





// --------------------------------------------------

function getFlashMovieObject(movieName)
{
  if (window.document[movieName]) 
  {
      return window.document[movieName];
  }
  if (navigator.appName.indexOf("Microsoft Internet")==-1)
  {
    if (document.embeds && document.embeds[movieName])
      return document.embeds[movieName]; 
  }
  else // if (navigator.appName.indexOf("Microsoft Internet")!=-1)
  {
    return document.getElementById(movieName);
  } 	

}
function passToFlash(){
	//var myWidth = whatSize();
	var theMovie = getFlashMovieObject("header_mc");
	theMovie.SetVariable("myVars", myWidth);
	
}
function passToFlashResize(){
	//var myWidth = whatSize();
	var theMovie = getFlashMovieObject("header_mc");
	theMovie.SetVariable("myVars", myWidth);
	theMovie.GotoFrame(1);
	
}
//--------------------------------------------------------------
function checkTitlepage(){
	
	var who = document.getElementById("myTitlepage");
	if(	who.innerHTML == ""){
		who.style.display = "none";
	}else{
		who.style.display = "block";
	}
	
}
//--------------------------------------------------------------
var saveHeight;
var showing = true;



