$(document).ready(function() {
	//Height fix
	if($('#container').height() >= $(window).height()) {
		$('#containingBlock').css({'display' : 'block', 'position' : 'relative', 'overflow' : 'auto', 'width' : '100%', 'height' : '100%'});
		$('#containingBlock #container').css({'position' : 'relative', 'top' : '0', 'display' : 'block', 'width' : '100%', 'height' : '100%'});
	} else {
		$('#containingBlock').height($(window).height());
	}
	if($('#text_two_cols .right .med_text')) {
		$('#text_two_cols .right .med_text').height($('#text_two_cols').height()-20);
	}
	//if($('#text_two_cols .left').height() > $('#text_two_cols .right').height()) {
		if($('#text_two_cols .right .photo') && (jQuery.support.scriptEval == false)) {
			var marginTop = $('#text_two_cols').height()-$('#text_two_cols .right img').height();
			$('#text_two_cols .right .photo').css("padding-top",marginTop+"px");
		} else {
			$('#text_two_cols .right .photo').height($('#text_two_cols').height());
		}
	//}
});
$(window).resize(function() {
	if($('#container').height() >= $(window).height()) {
		$('#containingBlock').css({'display' : 'block', 'position' : 'relative', 'overflow' : 'auto', 'width' : '100%'});
		$('#containingBlock #container').css({'position' : 'relative', 'top' : '0', 'display' : 'block', 'width' : '100%'});
	} else {
		$('#containingBlock').height($(window).height());
	}
});

function openpopup(url) {
	var stile = "top=10, left=10, width=550, height=300, status=no, menubar=no, toolbar=no scrollbar=no";
	window.open(url, "", stile);
}
