var mywin=null;
function NewWindow(mypage,myname,w,h,scroll,offsetw,offseth)
{
	LeftPosition=(screen.width) ?(screen.width-w)/2 : 0;
	TopPosition=(screen.height) ?(screen.height-h)/2 : 0;
	if (offsetw == null) {offsetw = 0}
	if (offseth == null) {offseth = 0}
	LeftPosition = LeftPosition + offsetw;
	TopPosition = TopPosition + offseth;
	if (scroll == '1') {scroll = 'no'};
	if (scroll == 'yes') {statusse = 'status=yes,'} else {statusse = 'status=no,'};
	settings='height='+h+',width='+w+',top='+TopPosition+',left='+LeftPosition+',scrollbars=yes,' + statusse + 'resizable='+scroll;
	mywin=window.open(mypage,myname,settings);
	if(mywin.window.focus){mywin.window.focus();}
}
function jumpTo(s,qs) 
{
	if (s.selectedIndex != 0) 
		location.href = '?' + qs + s.options[s.selectedIndex].value;return 1;
}
function handleKeyForSubmit(evt,frm){
if (!evt.keyCode || evt.keyCode!=13)
return false;

var sender=evt.srcElement||evt.target||null;

if (sender && sender.tagName=="INPUT" && (sender.type=="text" || sender.type=="password"))
	return true;
else
	return false;
}
function hide_menu(mnu){ 
   mn=getMenuByName(mnu) 
   SDiv("menu"+mn,0) 
} 
function show_menu(mnu){ 
   mn=getMenuByName(mnu) 
   SDiv("menu"+mn,1) 
} 
function print_page(printmenuname) 
{
  hide_menu(printmenuname); // substitute the name of your main menu 
  if (window.print) window.print(); 
  show_menu(printmenuname); // substitute the name of your main menu 
}

