
// ****************************************************************
// * We need to be constantly aware of the user's screen size    *
// ****************************************************************

			function placeDBIframe() 
			{			
				// Let's see what the available screen size is
				var sHeight = this.getSize().y;
				var sWidth = this.getSize().x;
				
				
				// how big is the iFrame?				
				var divHeight = $('DataBase').getSize().y;
				var divWidth = $('DataBase').getSize().x;
				
				
				var ratioDiv = divWidth/divHeight;
				var ratioStage = sWidth/sHeight;
				
				//var putMeHereH = (sHeight / 2) - (divHeight / 2) +48;
				var Xpos = (sWidth-divWidth +175)/2 ;//submenu width ;
				var Ypos = 115; // the height of the top bar
				// 17 is the bottom bar
				
				var targetW;
				var targetH;
				
				
				targetW=  sWidth  - Xpos;
				targetH = sHeight -Ypos-10;
				
			
				// OK, let's put it there
				
				$('DataBase').setStyle('top', Ypos);
				$('DataBase').setStyle('left',Xpos );				
						
					
				//$('DataBase').setStyle('pixelWidth', targetW);
				$('DataBase').setStyle('pixelHeight', targetH);		
				
			//	$('myDB').setStyle('width', targetW);
				$('myDB').setStyle('height', targetH);
				
		
			// That's the end of placeIframe()

			}



// ****************************************************************
// * When the DOM is ready, this will fire                        *
// ****************************************************************

window.addEvent("domready", function(){

			// let's get everything right on the first load	
			placeDBIframe();
// END OF DOMREADY
	
});



// ****************************************************************
// * If the Window resizes, this will fire                        *
// ****************************************************************

window.addEvent("resize", function(){	
	
			// if the image is resized, let's do our background magic once more
		placeDBIframe();

// END OF RESIZE
	
});


