// --------------  JavaScript Sammlung  ----------------------

if(top.frames.length >0)
	top.location.href=self.location;
	
Normal1=new Image();
Normal1.src="img/menue03_tip.jpg";
Highlight1=new Image();
Highlight1.src="img/menue03_tip_o.jpg";

Normal2=new Image();
Normal2.src="img/menue05_winner.jpg";
Highlight2=new Image();
Highlight2.src="img/menue05_winner_o.jpg";

Normal3=new Image();
Normal3.src="img/menue07_leader.jpg";
Highlight3=new Image();
Highlight3.src="img/menue07_leader_o.jpg";

Normal4=new Image();
Normal4.src="img/menue09_admin.jpg";
Highlight4=new Image();
Highlight4.src="img/menue09_admin_o.jpg";

function Bildwechsel(Bildnr,Bildobjekt)
{
	window.document.images[Bildnr].src=Bildobjekt.src;	
}

function chg_status(txt) {
	self.status = txt;
}

function form_action(formular,todo){
	document.forms[formular].todo.value=todo;
	document.forms[formular].submit();
} // end function form_action

function select_game(formular,todo,game){
	document.forms[formular].todo.value=todo;
	document.forms[formular].selgame.value=game;
	document.forms[formular].submit();
} // end function select_game


function getElement(e,f){
   if(document.layers){
       f=(f)?f:self;
       if(f.document.layers[e]) {
           return f.document.layers[e];
       }
       for(W=0;i<f.document.layers.length;W++) {
           return(getElement(e,fdocument.layers[W]));
       }
   }
   if(document.all) {
       return document.all[e];
   }
   return document.getElementById(e);
}

function MM_findObj(n, d) { //v4.0
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && document.getElementById) x=document.getElementById(n); return x;
}

function MM_showHideLayers() { //v3.0
  var i,p,v,obj,args=MM_showHideLayers.arguments;
  var iWidth = (window.innerWidth) ? window.innerWidth : document.body.offsetWidth;
  var iHeight = (window.innerHeight) ? window.innerHeight : document.body.offsetHeight;
  for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v='hide')?'hidden':v; }
    obj.visibility=v; }
  obj.left=0;
  obj.top=0;
}
