function showWindow(content) {

	$('floatingWindow').innerHTML = content;
	
	var windowSize  = getInnerWindowSize();
	
	var pageHeight = $('Page').getDimensions().height;
	
	
	$('backdropLayer').setStyle({
		width: windowSize.x + "px",
		height: (pageHeight + 18) + "px"
		
	});
	
	var dimensions = $('floatingWindow').getDimensions();
	var pageOffset =  getPageOffset();
	
	var top = ((windowSize.y/2) - (dimensions.height/2)) + pageOffset.y;
	if(top < 0) top = 10;
	var left = (windowSize.x/2) - (dimensions.width/2);


	$('floatingWindow').setStyle({
		top: top + 'px',
		left: left  + 'px'
	});
	
	new Effect.toggle('backdropLayer', 'appear', { from:0, to:0.6, duration:0.6, queue: 'end'});	
	new Effect.toggle('floatingWindow', 'appear', { from:0, to:1, duration:0.6, queue: 'end'});	
	
}

function hideWindow() {
	new Effect.toggle('floatingWindow', 'appear', { from:1, to:0, duration:0.4, queue: 'end'});	
	new Effect.toggle('backdropLayer', 'appear', { from:0.6, to:0, duration:0.3, queue: 'end'});	
}

function showHomepage() {

	new Effect.ScrollTo('Page', {duration: 0.4, offset: -10, queue: 'end'});

	Element.update('mainContentBox', startPage);
	Element.show('BottomLeftBox');
	Element.show('BottomCenterBox');
	
	
//	new Effect.Parallel(
//    	[ 
//    		new Effect.Opacity('BottomLeftBox', { from:0, to:1, sync: true }),	
//    		new Effect.Opacity('BottomCenterBox', { from:0, to:1, sync: true}),
   		  	new Effect.Highlight('mainContentBox',	
				{startcolor: '#dddddd', endcolor: '#ffffff', queue: 'end' }
			);
//    	],
//    	{ duration: 0.4,
//    	  queue: 'end'
//    	 }
    
//  	);
}


function alterMainContentBox(content) {

/*
	new Effect.ScrollTo('Page', {duration: 0.4, offset: -10, queue: 'end'});
	
	// Hide Bottom Boxes to allow Content Box to Grow
	new Effect.Parallel(
    	[ 
    		new Effect.Opacity('BottomLeftBox', { sync: true, to: 0.0, from: 1.0 }), 
      		new Effect.Opacity('BottomCenterBox', { sync: true, to: 0.0, from: 1.0 }),
      		new Effect.Opacity('mainContentBox', { sync: true, to: 0.0, from: 1.0 }) 
      	],
    	{ 
    	  	queue: 'end',
    	  	duration: 1, 
	      	afterFinish: function(effect)
        	{ 
        		Element.hide('BottomLeftBox'); 
        		Element.hide('BottomCenterBox');
        		Element.update('mainContentBox', content);
        	} 
    	}
  	);
  	
	// Show Download Process Page
	new Effect.Opacity('mainContentBox', 
		{ from:0, to:1, duration:1, queue: 'end' });	
*/




	new Effect.ScrollTo('Page', {duration: 0.4, offset: -10, queue: 'end'});
	
	Element.hide('BottomLeftBox'); 
	Element.hide('BottomCenterBox');
	
	Element.update('mainContentBox', content);
	new Effect.Highlight('mainContentBox',	
		{startcolor: '#dddddd', endcolor: '#ffffff', duration: 1.0, queue: 'end'}
	);

}


