function MM_jumpMenu(targ,selObj,restore) {
	eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
	if (restore) selObj.selectedIndex=0;
}

function openWindow (popup) {
	windowOne = window.open(popup, "newWindow", "width=700,height=590,left=50,top=200,scrollbars=yes,toolbar=no,status=no,resizable=yes,menubar=no,location=no,directories=no");
	windowOne.focus();
}

function printWindow() {
	bV = parseInt(navigator.appVersion)
	if (bV >= 4) window.print()
}

function newsletters(visible) {
        jQuery('label[for=register1]').css('font-weight', 'normal');
        jQuery('label[for=register2]').css('font-weight', 'normal');
        jQuery('label[for=register3]').css('font-weight', 'normal');

        if (visible == 1) {
                jQuery('label[for=register1]').css('font-weight', 'bold');
                if (jQuery('div.unsubscription_hidden').css('display') == 'none') {
                        jQuery('div.unsubscription_hidden').toggle('fast');
                }
        } else if (visible == 2) {
                jQuery('label[for=register3]').css('font-weight', 'bold');
                if (jQuery('div.unsubscription_hidden').css('display') != 'none') {
                        jQuery('div.unsubscription_hidden').toggle('fast');
                }
        } else {
                jQuery('label[for=register2]').css('font-weight', 'bold');
                if (jQuery('div.unsubscription_hidden').css('display') != 'none') {
                        jQuery('div.unsubscription_hidden').toggle('fast');
                }
        }
}
 
jQuery(document).ready(function() {

	// clear search box input field on focus

	jQuery('#mySearchbox').click(function() {
		this.val() = '';
	});

	// search box must not submit when there is no search term

	jQuery('#tx-lwsolrsearchbox-form').submit(function() {
		if (jQuery('.tx-lwsolrsearchbox-pi1 #mySearchbox').val().length == 0) {
			jQuery('.tx-lwsolrsearchbox-pi1 .searchbox-input').focus();
			return(false);
		}
	});
});

