var mx = 0;
var my = 0;
function show_tab(div)
{
var divlist = document.body.getElementsByTagName('div');
hide=document.getElementById('hide_it');
hide.innerHTML=" ";
for(var i = 0; i < divlist.length; i++)
{
s=divlist[i].id;
if (! s) continue;
if (s==div) continue;
if (s.indexOf('tab_')==-1) continue;
divlist[i].style.display='none';
};
if (div=='hide') return;
obj=document.getElementById(div);
if( obj.style.display=='none') { obj.style.display='inline'; }
else { obj.style.display='none'; };
hide.innerHTML="
... ausblenden ... ";
};
/* Gelände */
function move(evt,what)
{
if(!evt)evt=window.event; // objekt für den IE erzeugen
var maus_x=evt.clientX;
var maus_y=evt.clientY;
pt=scroll_pos();
maus_x=maus_x+pt[0];
maus_y=maus_y+pt[1];
div=document.getElementById('div_preview');
if (div.style.display!='inline')
{
pic=document.getElementById('img_preview');
pic.src='pics/galerie/gelaende/'+what+'.jpg';
pic.width='250';
div.style.left=(mx+20)+'px';
div.style.top=(my-100)+'px';
div.style.display='inline';
};
div=document.getElementById('div_preview');
div.style.left=(maus_x+20)+'px';
div.style.top=(maus_y-100)+'px'
};
function hide()
{
div=document.getElementById('div_preview');
div.style.display='none';
};
function scroll_pos(){
var scrOfX=0,scrOfY=0;
if(typeof(window.pageYOffset)=='number'){
//Netscape compliant
scrOfY=window.pageYOffset;
scrOfX=window.pageXOffset;
}
else if(document.body && (document.body.scrollLeft || document.body.scrollTop)){
//DOM compliant
scrOfY=document.body.scrollTop;
scrOfX=document.body.scrollLeft;
}
else if(document.documentElement && (document.documentElement.scrollLeft || document.documentElement.scrollTop)){
//IE6 standards compliant mode
scrOfY=document.documentElement.scrollTop;
scrOfX=document.documentElement.scrollLeft;
}
return [scrOfX,scrOfY];
};
/* Gaestebuch */
function submit_frm(todo)
{
document.gb.todo.value=todo;
document.gb.submit();
};
function smiley(txt)
{
txt = ' ' + txt + ' ';
if (document.gb.txt.createTextRange && document.gb.txt.caretPos)
{
var caretPos = document.gb.txt.caretPos;
caretPos.gtxt = caretPos.txt.charAt(caretPos.txt.length - 1) == ' ' ? txt + ' ' : txt;
document.gb.txt.focus();
}
else
{
document.gb.txt.value += txt;
document.gb.txt.focus();
};
};
function show_div(div)
{
obj=document.getElementById(div);
if( obj.style.display=='none') { obj.style.display='inline'; }
else { obj.style.display='none'; };
};
function ausloggen()
{
doit = confirm('Wirklich ausloggen?');
if (doit == false)
{
alert('Ok, abgebrochen');
return-1;
}
else
{
document.frm.logoutok.value='logout';
document.frm.submit();
};
};
function send_logout()
{
location.href='index.php?pg=login&logoutok=logout';
};
function send_form(cmd,id,sub)
{
document.frm.cmd.value=cmd;
document.frm.id.value=id;
document.frm.sub.value=sub;
document.frm.submit();
};
function show_flash(flash)
{
s=
" "+
" "+
" "+
" "+
" ";
div=document.getElementById('div_flash');
div.innerHTML=s;
window.setTimeout("show_flash2()", 100);
}
function show_flash2()
{
div=document.getElementById('div_flash');
div.style.visibility='visible';
}
function send_form_spielbericht(cmd,id,cmd2,cmd3)
{
if (cmd=='del')
{
if (! confirm('Wirklich löschen?')) { alert('Ok- Abbruch'); return; };
};
document.frm.cmd.value=cmd;
document.frm.id.value=id;
document.frm.cmd2.value=cmd2;
document.frm.cmd3.value=cmd3;
document.frm.submit();
};
function send_form_news(cmd,id,cmd2,cmd3)
{
if (cmd=='del')
{
if (! confirm('Wirklich löschen?')) { alert('Ok- Abbruch'); return; };
};
document.frm.pg.value='news';
document.frm.cmd.value=cmd;
document.frm.id.value=id;
document.frm.cmd2.value=cmd2;
document.frm.cmd3.value=cmd3;
document.frm.submit();
};