
/* Ist das Dokument im Frameset geladen? Wenn nein, dann reload im Frameset. */
function nachhause()
 {
 frame_anzahl = parent.frames.length;
 if (frame_anzahl < 1)
  {
  if (window.location.href.indexOf("htmld") != -1)
   {
  window.location.href = "http://www.soccerratings.info/framesd.htm?thema="+window.location.href;
   return;
   }
  if (window.location.href.indexOf("htmle") != -1)
   {
   window.location.href = "http://www.soccerratings.info/framese.htm?thema="+window.location.href;
   return;
   }
  window.location.href = "http://www.soccerratings.info";
  }
 }

/* Lädt ein Dokument im Framest als Thema im Anzeigeteil. */
function thema()
 {
 if(window.location.search != "")
  {
  anzeige = window.location.search.substr(window.location.search.indexOf("thema=")+6,window.location.search.length-7);
  main.location.href = anzeige;
  }
 }

/* Bildwechsler für Navigation etc. */
function image_changer(tag_id,new_image)
 {
 if (document.images[tag_id]) /* Falls noch nicht geladen */
  {
  document.images[tag_id].src = new_image.src;
  }
 }

/* Setzt die Klammern in der Navigation */
line_n = new Image(); line_n.src = "../pics/klamno.gif";
line_l = new Image(); line_l.src = "../pics/klamli.gif";
line_r = new Image(); line_r.src = "../pics/klamre.gif";
function headmarker(bild)
 {
 if (parent.frames["navi"] && parent.frames["navi"].document.images["line_" + bild + "_li"] && parent.frames["navi"].document.images["line_" + bild + "_re"]) 
  {
  for (i=0; i < parent.frames["navi"].document.images.length; i++)
   {
   if (parent.frames["navi"].document.images[i].name.indexOf("line_") > -1)
    {
    parent.frames["navi"].document.images[i].src = line_n.src;
    }
   }
  parent.frames["navi"].document.images["line_" + bild + "_li"].src = line_l.src;
  parent.frames["navi"].document.images["line_" + bild + "_re"].src = line_r.src;
  }
 }


/* Jede neue Seite fokusieren */
function brennpunkt()
 {
 this.focus();
 }

/* Sprache in Cookie speichern für automatische Weiterleitung */
function sprache(wahl)
 {
 if(navigator.cookieEnabled == true)
  {
  var jetzt = new Date();
  var auszeit = new Date(jetzt.getTime() + 1000*60*60*24*365 );
  document.cookie = wahl + ";expires=" + auszeit.toGMTString() + ";" ;
  }
 }

/* Automatische Weiterleitung */
function weiterleitung()
 {
 if (document.cookie == "english") document.location.replace("framese.htm")
 if (document.cookie == "deutsch") document.location.replace("framesd.htm")
 }
