$(document).ready(function() {
	if($('#tbnav2') && $('#tbnav2').width()) {
		var left = ($('#tbnav2').width() - 787) / 2;
		$('#tbnav21').width(left);
		$('#tbnav23').width(left);
		$('#side2').css('left', left+'px');
		$('#content').css('height', (($(window).height() - 80)+'px'));
	}

	$(".rollovers a").hover(function() {
		$(this).find('img').each(function(i) {
			src = $(this).attr('src');
			if(src && src!='') {
				src = src.replace('a.gif', 'b.gif');
				src = src.replace('_off.gif', '_on.gif');
				$(this).attr('src', src);
			}
		});
	},function(){
		$(this).find('img').each(function(i) {
			src = $(this).attr('src');
			if(src && src!='') {
				src = src.replace('b.gif', 'a.gif');
				src = src.replace('_on.gif', '_off.gif');
				$(this).attr('src', src);
			}
		});
	});
});

$(window).resize(function() {
	if($('#tbnav2') && $('#tbnav2').width()) {
		var left = ($('#tbnav2').width() - 787) / 2;
		$('#tbnav21').width(left);
		$('#tbnav23').width(left);
		$('#side2').css('left', left+'px');
		$('#content').css('height', (($(window).height() - 80)+'px'));
	}
});

function NewWindow(mypage, myname, w, h, scroll) {
	var winl = (screen.width - w) / 2;
	var wint = (screen.height - h) / 2-30;
	var scrollbars = 'scrollbars';
	if (scroll == 'no') {
		scrollbars  = '';
	}
	winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl+',resizable,';
	win = window.open(mypage, myname, winprops);
	win.focus();
}

