function eventModal()
{
	scroll(0,0);
	var dagensEvent = document.getElementById( 'dagensevents' );
	setWidthHeight();
	
	var lefty = parseInt( windowWidth-500);
	dagensEvent.style.left = parseInt( lefty/2 ) + 'px';
	
	document.getElementById( 'modal' ).style.display = 'inline';
	dagensEvent.style.display = 'inline';
}

function positionMe()
{
	var dagensEvent = document.getElementById( 'thebanner' );
	setWidthHeight();
	
	var lefty = parseInt( windowWidth-960);
	dagensEvent.style.left = parseInt( lefty/2 ) + 'px';
	
	document.getElementById( 'supermodal' ).style.display = 'inline';
	dagensEvent.style.display = 'inline';
}


function hideModal()
{
	showHide( 'modal' );
	showHide( 'dagensevents' );
}

function hideModalTwo()
{
	showHide( 'supermodal' );
	showHide( 'thebanner' );
}

function hideSmallModal()
{
	showHide( 'smallmodal' );
	showHide( 'smallevent' );
}



var windowHeight;
var windowWidth;

function setWidthHeight() {
  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;
  }
  
  windowHeight = myHeight;
  windowWidth = myWidth;
}
