/******************************************************************/
/* Quelldatei skripten.js                                         */
/* Javaskript-Definitionen für Kairodata Mediendesign             */
/* Projekt: The Taj                                               */
/* Autor: Werner Schneider, Kairodata Mediendesign                */
/* Aktualisiert: 22.09.2009                                       */
/******************************************************************/



function aktuell(breit,hoch)
{
text = window.open('pop_aktuell.html','popup','menubar=no,status=no,locationbar=no,scrollbars=yes,top=12,left=240,resizable=no,width='+breit+',height='+hoch);
text.focus();
}

function diekarte()
{
text = window.open('pop_diekarte.php5','popup','menubar=no,status=no,locationbar=no,scrollbars=yes,top=60,left=250,resizable=no,width=840,height=730');
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,locationbar=no,top=0,left=0,width=680,height="+hoch+",resizable,scrollbars");
text.location.hash="#"+platz;
text.focus();
}

function popup(pfad,breit,hoch)
{
text = window.open(pfad,'popup',"menubar=no,status=no,locationbar=no,top=60,left=250,scrollbars=yes,resizable=no,width="+breit+",height="+hoch);
text.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_home = newBild("/$g/b_home_over.gif");
 j_aktuell = newBild("/$g/b_aktuell_over.gif");
 j_taj = newBild("/$g/b_taj_over.gif");
 j_kritik = newBild("$/g/b_kritik_over.gif");
 j_spezialitaeten = newBild("$/g/b_spezialitaeten_over.gif");
 j_diekarte = newBild("/$g/b_diekarte_over.gif");
 j_service = newBild("/$g/b_service_over.gif");
 j_dasteam = newBild("/$g/b_dasteam_over.gif");
 j_lage = newBild("/$g/b_lage_over.gif");
 j_impressum = newBild("/$g/b_impressum_over.gif");
 flagGeladen = true;
 }
}
