function movecenter(){
  if (navigator.appName=="Netscape") {
    document.comment.left=(window.innerWidth-200)/2;
  }
}

function chcomment(id){
  if (!id) id=0;
  newcomment='<font face="Arial, Helvetica, sans-serif" size="2" color="#000099"><b>'+comments[id]+'</b></font>';
  if (navigator.appName=="Netscape") {
    document.comment.document.open();
    document.comment.document.write('<center>'+newcomment+'</center>');
    document.comment.document.close();
  } else {
    document.all.comment.innerHTML=newcomment;
  }
}

function swap(id,status){
  if (status) {
    document.images['img'+id].src = imgh[id].src;
    chcomment(id);
	if (catid) document.images['img'+catid].src = imgl[catid].src;
  } else {
    document.images['img'+id].src = imgl[id].src;
    chcomment(catid);
	if (catid) document.images['img'+catid].src = imgh[catid].src;
  }
}

function send(id,typ,sid,smid,tim,oid){
  if (id) document.mainform.catid.value=id;
  if (typ) document.mainform.type.value=typ;
  if (sid) document.mainform.subid.value=sid;
  if (smid) document.mainform.smallid.value=smid;
  if (tim) document.mainform.time.value=tim;
  if (oid) document.mainform.oid.value=oid;
  document.mainform.submit();
}

function comp(plid){
  window.open('company.php?pid='+plid,'Ceginfo');
  // window.open('company.php?pid='+plid,'Ceginfo','width=780,height=540,status=yes,menubar=yes'   );
  // document.compform.pid.value=plid;
  // document.compform.submit();
}

function step(ofval){
  if(ofval || ofval==0) document.smallform.ofs.value=ofval;
  document.smallform.submit();
}

function photo(fname){
  ww=screen.availWidth-8;
  wh=screen.availheight-10;
  window.open('/photo.php?file='+fname','photos','width='+ww+',height='+wh+',top=0,left=0');
}