function selectit(obj,val) {
 for (i=0; i<obj.options.length; i++)
  if (obj.options[i].value==val) obj.selectedIndex=i;
}

function selall(beg,end) {
 for (i=beg;i<=end;i++) {
  care='document.exp.o'+i+'.checked='+document.exp.ix.checked;
  eval(care);
 }
}

function setselect(form, sel, what) {
 obj = form.elements[sel];
 items=obj.length;
 for (i=0; i<items; i++) {
  obj.options[i].selected=what;
 }
}

function winopen (nm, fx, fy, mdl) {
 fy=fy+40;
 sw=screen.width-8; sh=screen.height-55;
 s='no';
 if (fx>sw) { x=0; s='yes'; fx=sw; } else x=Math.round((sw-fx)/2);
 if (fy>sh) { y=0; s='yes'; fy=sh; } else y=Math.round((sh-fy)/2);
 abc=window.open('/popup.php?v='+mdl+'&nm='+nm,'ViewPic','top='+y+',left='+x+',width='+fx+',height='+fy+',scrollbars='+s);
}
