timer=false;
timer2=false;
tmpLayer=false;
tmpVerbindung=false;

function OpenChatWindow()
{
  window.open('/ChatWindow.aspx','opChat','scrollbars=no,width=500,height=500,top=0,left=' + String(screen.width-500));
}

 //reloads the window if Nav4 resized
function MM_reloadPage(init) 
{ 
	if (init==true) with (navigator) 
	{
		if ((appName=="Netscape")&&(parseInt(appVersion)==4)) 
			{
				document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; 
			}
	}
	else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}
function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}
function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}
function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

var ie4 = (document.all) ? true : false;
var ns4 = (document.layers) ? true : false;
var ns6 = (document.getElementById && !document.all) ? true : false; //and firefox


function SetLayerPos(theLay, posLeft, posTop) 
{
	if (ie4)
    {
		if (!!document.all[theLay])
		{
		document.all[theLay].style.left = String(posLeft)+'px';
		document.all[theLay].style.top = String(posTop)+'px';
		}
	}
	if (ns4)
	{
		if (!!document.layers[theLay])
		{
		document.layers[theLay].left = posLeft;
		document.layers[theLay].top = posTop;
		}
	}
	if (ns6)
	{
		if (!!document.getElementById([theLay]))
		{
		document.getElementById([theLay]).style.left = String(posLeft)+'px';
		document.getElementById([theLay]).style.top = String(posTop)+'px';
		}
	}
}

function ChangeImg(Bildobjekt,Bildname,lay,table)
{
	if (table == 0)
	{
		if(document.layers) 
		{
			document.layers[Bildname].document.images[Bildname].src=Bildobjekt.src; 
		} else 
		{
			document.images[Bildname].src = Bildobjekt.src; 
		}	
	} else {
		if(document.layers) 
		{
			document.layers[lay].document.images[Bildname].src=Bildobjekt.src; 
		} else 
		{
			window.document.images[Bildname].src = Bildobjekt.src; 
		}	

	}	 	
}

function ObjAbsTop(theObj) {
  var RetI = 0;
  if (!!theObj) {
    if (String(theObj.tagName).toUpperCase() != 'DIV') {
      RetI += theObj.offsetTop;//+theObj.clientTop;
      RetI += ObjAbsTop(theObj.offsetParent);
    }
  }
  return RetI;
}
function ObjAbsLeft(theObj) {
  var RetI = 0;
  if (!!theObj) {
    if (String(theObj.tagName).toUpperCase() != 'DIV') {
      RetI += theObj.offsetLeft;//+theObj.clientLeft;
      RetI += ObjAbsLeft(theObj.offsetParent);
    }
  }
  return RetI;
}
function MnuImgLeft(theId)
{
  var TmpImg = FindItemObj(theId);
  var TmpLft = 0;
  if (!!TmpImg)
  {
	  TmpLft = ObjAbsLeft(TmpImg);
  }
  return TmpLft;
}
function MnuImgTop(theId)
{
  var TmpImg = FindItemObj(theId);
  var TmpTop = 0;
  if (!!TmpImg)
  {
	  TmpTop = ObjAbsTop(TmpImg);
  }
  return TmpTop;
}

function FindItemObj(n, d) {
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<=d.forms.length-1;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<=d.layers.length-1;i++) x=FindBrdLay(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function rest_init()
{ }

function ns4_init() 
{ }

onload = function() { if (ns4) ns4_init(); if (ie4) rest_init(); if (ns6) rest_init(); }

function description(m) 
{
	status = m
}

//SubMenu
var CurMenu = '';
function ShowSubMenu(MenuNr, MenuID)
{
  if (CurMenu != '')
  {
    clearTimeout(timer);
    HideSubMenu(CurMenu);
    if (Cur2Menu != '')
    {
	  HideSub2Menu(Cur2Menu);
    }
  }
  var TmpL = MnuImgLeft("Menu" + MenuID) - 2;
  var TmpT = MnuImgTop("Menu" + MenuID) + 21;;
  SetLayerPos('Sub' + MenuID, TmpL, TmpT);
  CurMenu = MenuID;
}

function HideSubMenu(MenuID)
{
  var TmpL = -500;
  var TmpT = 0;
  SetLayerPos('Sub' + MenuID, TmpL, TmpT);
  CurMenu = '';
}

//Sub2Menu
var Cur2Menu = '';
function ShowSub2Menu(MenuNr, MenuID)
{
  if (Cur2Menu != '')
  {
    clearTimeout(timer2);
    HideSub2Menu(Cur2Menu);
  }
  var TmpL = MnuImgLeft("Menu" + MenuID) + 134;
  var TmpT = MnuImgTop("Menu" + MenuID) - 2;
  SetLayerPos('Sub' + MenuID, TmpL, TmpT);
  Cur2Menu = MenuID;
}

function HideSub2Menu(MenuID)
{
  var TmpL = -2000;
  var TmpT = 0;
  SetLayerPos('Sub' + MenuID, TmpL, TmpT);
  Cur2Menu = '';
}

//Events
