function overlay(){
cto=new CTO();
	cto.account="disneylatino";
	cto.category="dcore";
	cto.site="peliculas:cine";
	cto.siteSection="sor:games";
	cto.pageName="become_an_apprentice";
	cto.contentType="games";
	cto.property="sor";
	cto.genre="liveaction";
	cto.region='latam';
	cto.country='d2';
	cto.unit='dol';

	cto.track();//Required. Do not remove.


	showLayer();
	showWindow();
}

function showWindow(){
	document.getElementById('modalWindow').style.display = 'block';
}

function hideWindow(){
	document.getElementById('modalWindow').style.display = 'none';
}

function closeWindow(){
	hideWindow();
	hideLayer();
	sendClose2Movie();

}

function showLayer(){
	document.getElementById('overlay').style.display = 'block';
	document.getElementById('overlay').style.height = getWindowHeight() + 'px';
}

function hideLayer(){
	document.getElementById('overlay').style.display = 'none';
}

function $( item ){
	item = document.getElementById(item);
	return item;
}

function getWindowSize() {
  var myWidth = 0, myHeight = 0;
  if( typeof( window.innerWidth ) == 'number' ) {
    //Non-IE
    myWidth = window.innerWidth;
    myHeight = window.innerHeight;
  } else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
    //IE 6+ in 'standards compliant mode'
    myWidth = document.documentElement.clientWidth;
    myHeight = document.documentElement.clientHeight;
  } else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
    //IE 4 compatible
    myWidth = document.body.clientWidth;
    myHeight = document.body.clientHeight;
  }
  return { 'width': myWidth, 'height': myHeight};
}

function getWindowHeight(){
	if (document.body.scrollHeight)
		return document.body.scrollHeight;
	return document.documentElement.offsetHeight;
}

function sendClose2Movie(){
	document.getElementById("website_movie").closeModal();

}
