
var curMenu = '';

function onPageLoad() {
	$('#menusection1').hide();
	$('#menusection2').hide();
	$('#menusection3').hide();
	$('#menusection4').hide();
	$('#menusection5').hide();
	$('#menusection6').hide();
	$('#menusection7').hide();
	$('#menusection8').hide();
	$('#menusection9').hide();
	$('#menusection10').hide();
	$('#menusection11').hide();
	$('#menusection12').hide();

	var a = $('#content').height();
	var b = $('#pageLft').height();
	var c = $('#pageRgt').height();
	var d = Math.max(Math.max(a,b),c);
	d += 30;

//	if(a < (d-72))
	$('#content').height( d );
	$('#pageLft').height( d );
	$('#pageRgt').height( d );

}

function onSearchFocus() {
	$('#slabel').hide();
}

function onSearchBlur() {
	if($('#s').val() == "")
		$('#slabel').show();
}

function showMenu(m) {
	var n = '#' + m;
	var e;
	$(n).hide();
	n = '#' + m;
	e = $(n);
	if(e) {
		if(curMenu != m) {
			e.show();
			curMenu = m;
		} else {
			curMenu = 'none';
		}
	}
	return false;
}

$(document).ready(function() {
	 	onPageLoad();
		$('#s').focus(onSearchFocus).blur(onSearchBlur);
		onSearchBlur();
});

function openWindow(dest) {
	var wf = "";	
	wf = wf + ",scrollbars=yes";
	window.open(dest,"_blank");
	return false;
}

function popup(u) {
	var w = window.open(u, '_blank', 'width=400,height=500');
	return false;
}
