/******************************************************************/
/* Quelldatei kairodata.js                                        */
/* Javaskript-Definitionen                                        */
/* Projekt: Kairodata Homepage                                    */
/* Autor und Copyright: Werner Schneider, Kairodata Mediendesign  */
/* Aktualisiert: 18.07.2004                                       */
/******************************************************************/


function box(thema)
{
text = window.open(thema+".html","BOX","menubar=no,status=no,location=no,width=321,height=199");
text.focus();
}

function textfenster(pfad,id)
{
hoch=840;
if(screen.availHeight < 840) hoch=screen.availHeight-30;
text = window.open(pfad,id,"menubar=no,status=no,location=no,top=0,left=0,width=680,height="+hoch+",resizable,scrollbars");
text.focus();
}

function textfensterplatz(pfad,id,platz)
{
hoch=840;
if(screen.availHeight < 840) hoch=screen.availHeight-30;
text = window.open(pfad,id,"menubar=no,status=no,location=no,top=0,left=0,width=680,height="+hoch+",resizable,scrollbars");
text.location.hash="#"+platz;
text.focus();
}

function bildschnitt(pfad,breit,hoch)
{
hoch=hoch+20;
bild=window.open(pfad,"bild","menubar=no,status=no,location=no,top=0,left=0,width="+breit+",height="+hoch+",resizable,scrollbars");
bild.focus();
}

/* Rollover-Funktionen */

var flagGeladen = false;
userAgent = window.navigator.userAgent;
browserVers = parseInt(userAgent.charAt(userAgent.indexOf("/")+1),10);

function newBild(arg)
{
 if (document.images)
  {
  rslt = new Image();
  rslt.src = arg;
  return rslt;
  }
}

function findElement(n,ly)
{
if (browserVers < 4)
 return document[n];
 var curDoc = ly ? ly.document : document;
 var elem = curDoc[n];
 if (!elem)
  {
  for (var i=0;i<curDoc.layers.length;i++)
   {
   elem = findElement(n,curDoc.layers[i]);
   if (elem) return elem;
   }
  }
 return elem;
}


function setBild(DOM_Bild,neuesBild)
{
if (document.images && (flagGeladen == true))
 {
 var img = null;
 if (document.layers)
   img = findElement(DOM_Bild,0);
 else
   img = document.images[DOM_Bild];
 if (img)
   {
   img.src = neuesBild;
   return true;
   }
 }
return false;
}

function ladeButtons()
{
if (document.images)
 {
 j_index = newBild("/$g/button_index_over.gif");
 j_leistungen = newBild("/$g/button_leistungen_over.gif");
 j_referenzen = newBild("$/g/b_referenzen_over.gif");
 j_zurperson = newBild("$/g/b_zurperson_over.gif");
 flagGeladen = true;
 }
}
