//Event.observe(document, 'dom:loaded', init);
  
function init() {  
	//Left Side
	left = $('left_col').getHeight()
	
	//Right Side
	p_image = $('property_image').getHeight()
	f_image = $('floorplan_image').getHeight()
	f_link = $('floorplan_link').getHeight()
	right = p_image + f_image + f_link
		
	//If the left side is taller than the right equal the 2 up
	if(left > right){
		height_adjust = (left - right)/2 //Divide by 2 to balance the padding box
		$('floor_plan').style.paddingTop = height_adjust + 'px'
		$('floor_plan').style.paddingBottom = height_adjust/2 + 'px'
		$('floor_plan').style.height = (height_adjust) + f_image + 'px'
	}
}  

function view_f_plan(url){
	var left, top1;
    width = 700;
    height = 700;
    left = (screen.width - width) / 2;
    top1 = (screen.height - height) / 4;
	popup = window.open(url, "image", "width=" + width.toString() + ",height=" + height.toString() + ",alwaysLowered=1,alwaysRaised=0,channelmode=0,dependent=0,directories=0,fullscreen=0,hotkeys=1,location=0,menubar=0,resizable=1,scrollbars=1,status=0,titlebar=0,toolbar=0,left=" + left + ",top=" + top1 + ",z-lock=0");	
}

