var isNN = (document.layers ? true : false);
var isGecko = (document.getElementById ? true : false);
var isIE = ((document.all && !isGecko) ? true : false);
var docWidth, docHeight, hcenter, vcenter, screenWidth, screenHeight, screenWidthAvail, screenHeightAvail // HV fuer Darstellung
var tmpObj, theObj; // HV fuer layer-objekte
Jetzt = new Date(); // Timer holen
var Start = Jetzt.getTime(); // Timerstart fuer Verweildauer
var anzLay,geckoLay; // länge des Element-Arrays, geckoLay=ElementArray für Gecko


function getClientInfo(){
 if (document.layers){
  docWidth = parseInt(window.innerWidth);
  docHeight = parseInt(window.innerHeight);
  anzLay = document.layers.length-1;
 }
 if (document.all){
  docWidth = parseInt(document.body.clientWidth);
  docHeight = parseInt(document.body.clientHeight);
  anzLay = document.all.length-1;
 }
 if (document.getElementById){
  if (navigator.appName=="Microsoft Internet Explorer"){
   docWidth = parseInt(document.body.clientWidth);
   docHeight = parseInt(document.body.clientHeight);
  }
  if((navigator.appName=="Netscape") || (navigator.userAgent.indexOf("Opera") != -1)){
   docWidth = parseInt(window.innerWidth);
   docHeight = parseInt(window.innerHeight);
  }
  geckoLay = document.getElementsByTagName('div');
  anzLay = geckoLay.length-1;
 }
 hcenter = parseInt(docWidth/2);
 vcenter = parseInt(docHeight/2);
 screenWidth = screen.width;
 screenHeight = screen.height;
 screenWidthAvail = parseInt(screen.availWidth);
 screenHeightAvail = parseInt(screen.availHeight);
}



function setObj(lay){
 if (isNN){
  tmpObj = eval("document."+lay);
 }
 if (isIE){
  tmpObj = eval("document.all."+lay);
 }
 if (isGecko){
  tmpObj = eval("document.getElementById('"+lay+"')");
 }
 if (tmpObj){
  if(isNN){
   theObj = tmpObj;
  }
  if (isIE){
   theObj = eval("document.all."+lay+".style");
  }
  if (isGecko){
   theObj = eval("document.getElementById('"+lay+"').style");
  }
  return(theObj);
 }
}


function setNoStyleObj(lay){
 if (isNN){
  theObj = eval("document."+lay);
 }
 if (isIE){
  theObj = eval("document.all."+lay);
 }
 if (isGecko){
  theObj = eval("document.getElementById('"+lay+"')");
 }
 return(theObj);
}


function setLayPos(lay,x,y){
 setObj(lay);
 theObj.left = x;
 theObj.top = y;
}


function getLayPos(lay){
 setNoStyleObj(lay);
 if (isNN){
  x = theObj.left;
  y = theObj.top;
 }
 if (isIE){
  x = theObj.offsetLeft;
  y = theObj.offsetTop;
 }
 if (isGecko){
  x = theObj.offsetLeft;
  y = theObj.offsetTop;
 }
 return (x,y);
}


function show(lay){
 setObj(lay);
 theObj.visibility = "visible";
}


function hide(lay){
 setObj(lay);
 theObj.visibility = "hidden";
}


function newImage(arg) {
        if (document.images) {
                rslt = new Image();
                rslt.src = arg;
                return rslt;
        }
}

function changeImages() {
        if (document.images && (preloadFlag == true)) {
                for (var i=0; i<changeImages.arguments.length; i+=2) {
                        document[changeImages.arguments[i]].src = changeImages.arguments[i+1];
                }
        }
}

var preloadFlag = false;
function preloadImages() {
        if (document.images) {
                preloadFlag = true;
        }
}


function news() {
window.open("pdf/news.pdf","news","height=550,width=750,scrollbars=no,resizable=yes,menubar=no,toolbar=no,top=20,left=20");
}


function news_1() {
window.open("../pdf/news.pdf","news","height=550,width=750,scrollbars=no,resizable=yes,menubar=no,toolbar=no,top=20,left=20");
}


function presse() {
window.open("http://news.nasdaq.com/aspxcontent/newsHeadlines.aspx?&kind=&symbol=TTG%60&selected=TTG%60&FormType=&mkttype=&pathname=&page=news","presse","height=550,width=750,scrollbars=yes,resizable=yes,menubar=yes,toolbar=yes,top=20,left=20");
}

function openUrl()
{
	var theUrl = document.theSelector.sitemap.options[document.theSelector.sitemap.selectedIndex].value;
	if(theUrl!="nothing")
	{
	location.href=theUrl;
}
}