function ShowMailWindow(sid) {
 LinkWindow = window.open('newmail.php?sid='+sid,'newmail', 'width=159,height=121,toolbar=0,directories=0,menubar=0,status=0,resizable=0,scrollbars=0')
}

function ShowPicture(picid,width,height) {
 LinkWindow = window.open('showpicture.php?PicID='+picid,'showpicture', 'width='+width+',height='+height+',toolbar=0,directories=0,menubar=0,status=0,resizable=0,scrollbars=1')
}

function ShowCNTPicture(picid,width,height) {
 LinkWindow = window.open('showcntpicture.php?PicID='+picid,'showpicture', 'width='+width+',height='+height+',toolbar=0,directories=0,menubar=0,status=0,resizable=0,scrollbars=1')
}

function ShowObjekt(url,width,height) {
 LinkWindow = window.open(url,'showobject', 'width='+width+',height='+height+',toolbar=0,directories=0,menubar=0,status=0,resizable=0,scrollbars=1')
}

function LoadChat() {
 LinkWindow = open("chat/chat.php","PEv3Chat","width=765,height=510");
}

function adjust_popup() {
 var w, h, fixedW, fixedH, diffW, diffH;
 if (document.all) {
  fixedW = document.body.clientWidth;
  fixedH = document.body.clientHeight;
  window.resizeTo(fixedW, fixedH);
  diffW = fixedW - document.body.clientWidth;
  diffH = fixedH - document.body.clientHeight;
 } else {
  fixedW = window.innerWidth;
  fixedH = window.innerHeight;
  window.resizeTo(fixedW, fixedH);
  diffW = fixedW - window.innerWidth;
  diffH = fixedH - window.innerHeight;
 }
 w = fixedW + diffW;
 h = fixedH + diffH;
 if (h >= screen.availHeight) w += 16;
 if (w >= screen.availWidth)  h += 16;
 w = Math.min(w,screen.availWidth);
 h = Math.min(h,screen.availHeight);
 window.resizeTo(w,h);
 window.moveTo((screen.availWidth-w)/2, (screen.availHeight-h)/2);
}

function NewWindow(url,titel,i_width,i_height)
{
  F2 = window.open(url,titel, 'width='+i_width+',height='+i_height+',toolbar=0,directories=0,menubar=0,status=1,resizable=0,scrollbars=1')
}