document.write("<iframe  name='bottom' id='bottom' src='about:blank' MARGINWIDTH='0' MARGINHEIGHT='0'  frameborder='0' scrolling='no' style='background-color: #FFFFFF;z-index:3;position:absolute;width:400px;height:275px;visibility:hidden;top:0;left:0;'>");
document.write("</iframe>");

document.write("<iframe  name='question_layer' id='question_layer' src='about:blank' MARGINWIDTH='0' MARGINHEIGHT='0'  frameborder='0' scrolling='no' style='background-color: #FFFFFF;z-index:5;position:absolute;width:400px;height:275px;visibility:hidden;top:0;left:0;'>");
document.write("</iframe>");


	function center_question_layer()
	{
  		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;

  		}
		obj		= document.getElementById('question_layer');
		obj1		= document.getElementById('bottom');
		otop	= ((myHeight/2) + (window.pageYOffset ? window.pageYOffset : document.body.scrollTop)) - 137;
		oleft	= ((myWidth/2)  + (window.pageXOffset ? window.pageXOffset : document.body.scrollLeft)) - 200;	
		obj.style.left = oleft;
		obj.style.top = otop;		
		obj1.style.left = oleft;
		obj1.style.top	= otop;
	}	
	function open_question_window(event_id,event_date)
	{
		center_question_layer();

		document.getElementById('bottom').style.visibility = 'visible';
		document.getElementById('question_layer').src ='http://www.poconoevents.com/eventcalendar/event_question.php?event_id='+event_id+'&event_date='+event_date;
		document.getElementById('question_layer').style.visibility = 'visible';

	}

	function close_question_window()
	{
		document.getElementById('bottom').style.visibility = 'hidden';	
		document.getElementById('question_layer').style.visibility = 'hidden';
	}

