function getElement( id ) {
  var e = document.getElementById( id ); if( e != null ) return e;
  e = document.getElementsByName( id ); if( e != null ) return e[0];
  return null;
}

function closeMsg( ) { getElement('msg').style.display='none'; }

function fwin( url, width, height ) { window.open( url, '_blank', 'address=no,status=no,resizable=no,width='+width+',height='+height ); }

function fwinr( url, width, height ) { window.open( url, '_blank', 'address=no,status=no,resizable=yes,width='+width+',height='+height ); }

function ftoggle( id ) { var e = getElement( id ); if( e != null ) { if( e.style.display=='block') e.style.display='none'; else e.style.display='block'; } }

function xppr(im){var i=new Image();i.src='/common/bt'+im;return i;}
function xpes(id){document.images['img'+id.substring(0,id.length-1)].src=eval('bt'+id+'.src');}
function xpesf(fid,id){fid.src=eval('bt'+id+'.src');}
function xpe(imgid,btid){document.images['img'+imgid].src=eval('bt'+btid+'.src');}

function isI(s){return /^\d+$/.test(s);}
