application=window.self;
application.opener=window.self;
version=parseFloat(navigator.appVersion);
//Browser ueberpruefen
if (navigator.userAgent.indexOf("MSIE")!=-1 ){
  //MSIE oder Netscape 6
  isIE=true;
  isNav=false;
  isNav6=false;
}
else if (document.getElementById&&!document.all){
  isIE=false;
  isNav=false;
  isNav6=true;
}
else{
  //kein MSIE
  isIE=false;
  isNav=true;
  isNav6=false;
}
var version=parseFloat(navigator.appVersion), agent=navigator.userAgent.toLowerCase(); 
var opera=(agent.indexOf('opera')!=-1)?true:false; 
function closeMe(){
  if (version >= 4) return eval('application.close()');
}
function isWindowOpen(aWindow) {
  var result=false;
  if (aWindow)
    if (!aWindow.closed) result=true;
  return result;
}
function closeWindow(aWindow) {
  if (isWindowOpen(aWindow))
    aWindow.close();
}
var helpW=null;
function helpMe() {
  closeWindow(helpW);
  helpW = window.open("DokuTBIMS.pdf", "helpWin", "width=650, height=700, menubar=no, resizable=yes, status=no, hotkeys=no, dependent=yes, scrollbars=yes, alwaysRaised=yes");
}
var myAppletMenu=null;
function goToUMN(mapurl,wW,wH){
  closeWindow(myAppletMenu);
  pX=((screen.width-wW)/2);
  pY=((screen.height-wH)/2);
  myAppletMenu=window.open(mapurl,"MyMap","width="+wW+"px,height="+wH+"px,screenX="+pX+"px,screenY="+pY+"px,location=no,menubar=no,resizable=yes,status=yes,hotkeys=no");
  myAppletMenu.moveTo(pX,pY);
  myAppletMenu.focus;
}
function getObject(name){
  if (document.all) return document.all[name];
  else if (document.getElementById){
    aObj=document.getElementById(name);
    if (aObj) return aObj;
    else{
      aObj=document.getElementsByName(name);
      if (aObj) return aObj[0];
    }
  }
  else if (document.getElementByName) return document.getElementByName(name);
  else return null;
}
function setUser(aText){
  theUser=getObject("user");
  theUser.innerHTML=aText;
}
var srvInfo=null;
function windowOpen(aURL,wW,wH){
  pX=((screen.width-wW)/2);
  pY=((screen.height-wH)/2);  
  closeWindow(srvInfo);
  srvInfo = window.open(aURL, "srvInfo", "width="+wW+"px, height="+wH+"px, menubar=no, resizable=yes, status=no, hotkeys=no, dependent=yes, scrollbars=yes, alwaysRaised=yes");
  srvInfo.moveTo(pX,pY);
  srvInfo.focus();
}
