<!--
//-------------------------- projekt -----------------------------
function popup(name, url) {
	var width=650;
	var height=500;
	var left = screen.availWidth/2 - width/2;
	var top = screen.availHeight/2 - height/2;
	var Win = window.open(url,name,'width=' + width + ',height=' + height + ',resizable=1,scrollbars=yes,menubar=no,left=' +left+ ',top='+top );
	}
function check(fields, regs, mess)
{
  for (i=0; i<fields.length; i++)
    if (!fields[i].value.match(regs[i]))
    {
      Message(mess[i]);
      fields[i].focus();
      return false;
    }
  return true;
}

var mouse=0
function mouseDown(e) 
{
  var ctrl=0;
  var alt=0;
  var shift=0;
  
  if (parseInt(navigator.appVersion)>3) 
  {
    if (navigator.appName=="Netscape") 
    {
      shift=(e.shiftKey)?4:0;
      alt=(e.altKey)?2:0;
      ctrl=(e.ctrlKey)?1:0;
    }
    else
    {
      shift=event.shiftKey;
      alt =event.altKey;
      ctrl=event.ctrlKey;
    }
    mouse=shift+alt+ctrl;
  }
  return true;
}

if (parseInt(navigator.appVersion)>3) 
  document.onmousedown = mouseDown;

var win = new Array();
function WinOpen(nr,path,title,sx,sy, sc)
{
  if (win[nr]!=null) win[nr].close();

  if (!sc)
  {
    if (sx>700) sx=700;
    if (sy>500) sy=500;
  }

  if (sx!=0 && sy!=0)
  {
    win[nr] = window.open(path,title,'left=10,top=10,width='+sx+',height='+sy+',scrollbars=yes,resizable=yes,status=no');
    if (win[nr]) win[nr].focus();
  }
  
  return false;
}

var win2 = new Array();
function WinOpen2(nr,path,title,sx,sy)
{
  if (win2[nr]!=null) win2[nr].close();

  if (sx!=0 && sy!=0)
  {
    win2[nr] = window.open(path,title,'left=10,top=10,width='+sx+',height='+sy+',scrollbars=yes,resizable=no,status=no');
    if (win2[nr]) win2[nr].focus();
  }
}

var upload_win = null;

function UploadWinOpen()
{
  if (upload_win!=null) upload_win.close();

  upload_win = window.open('./upload.php','Upload','left=100,top=100,scrolling=no,width=350,height=350,scrollbars=no,resizable=no,status=no');
  upload_win.focus();
}

function UploadWinClose()
{
  if (upload_win!=null) upload_win.close();
}

//-------------------------- tooltip -----------------------------
function ToolTipShow(elem, text)
{
//alert(window.event.clientX);
//alert(elem.offsetWidth);

  if (!(document.getElementById('tooltip'))){
  	var newElem = document.createElement("div");
    newElem.setAttribute("id", "tooltip");
	newElem.setAttribute("style", "visibility: visible; ");
	document.body.appendChild(newElem);
  }else{
  	newElem=document.getElementById('tooltip');
  }
x=elem.offsetLeft;
y=elem.offsetTop+elem.offsetHeight;
  var parent = elem;
  while (parent.offsetParent) {
    parent = parent.offsetParent;
    x += parent.offsetLeft;
    y += parent.offsetTop ;
  }

  newElem.style.visibility = "visible" ;
  newElem.style.position = "absolute";
  newElem.style.left = x+"px";
  newElem.style.top = y+"px";
  newElem.style.zIndex = 10000;
  newElem.innerHTML='<table width="400"><tr><td class="hint_tab">'+unescape(text)+'</td></tr></table>';
  
  return false;
}

function ToolTipHide()
{
  if (document.getElementById('tooltip')){
  	elem=document.getElementById('tooltip');
  	elem.style.visibility = "hidden" ;
  }
  return false;
}

//-------------------------- kontakt -----------------------------
function checkKontakt(text, nick, mail)
{
  if (check(new Array(text, nick),new Array(reg11, reg11),new Array('5', '5')))
  {
    if (mail.value.length)
     return check(new Array(mail),new Array(reg6),new Array('61'));
   }
   else return false;
}
-->
