var ok=document.getElementById?true:false;
var p1=new Image;p1.src='/images/nav_bgov.gif';
var p2=new Image;p2.src='/images/nav_bgov1.gif';
var p3=new Image;p3.src='/images/nav_iconov.gif';
var IE =document.all?true:false;
var dis=new Array();
var e=new Array();
var lastEl=null;
var outTimer=null;
document.onselectstart=cancelselect;

function cancelselect(){return false}

function getLeft(l)
{
  if (l.offsetParent) return (l.offsetLeft + getLeft(l.offsetParent));
  else return (l.offsetLeft);
}
function getTop(t)
{
  if (t.offsetParent) return (t.offsetTop + getTop(t.offsetParent));
  else return (t.offsetTop);
}

function ov(el){
clearTimeout(outTimer);
if (ok){
navout();
lastEl=el;
if(IE)el.style.cursor='hand';else el.style.cursor='pointer';
var TD=el.firstChild;while(TD.nodeName!='TD')TD=TD.nextSibling;
var IMG=TD.firstChild;while(IMG.nodeName!='IMG')IMG=IMG.nextSibling;
if(IMG.src.indexOf('nav_on')==-1)IMG.src='/images/nav_iconov.gif';
TD=TD.nextSibling;if(TD.nodeName!='TD')TD=TD.nextSibling;
var x=getLeft(el)+26;
if(el.offsetTop==0)var y=getTop(TD);else var y=getTop(el);
if (TD.className=='navtop'){
var DIV1=document.getElementById('hoverbg1');
}else{
var DIV1=document.getElementById('hoverbg');
}
var DIV2=document.getElementById('hover');
DIV2.innerHTML=TD.innerHTML;
DIV1.style.left=x+'px';
DIV1.style.top=y+'px';
DIV1.style.height=TD.offsetHeight+'px';
DIV2.style.left=x+'px';
DIV2.style.top=y+'px';
DIV2.style.height=TD.offsetHeight+'px';
DIV2.style.visibility='visible';
DIV1.style.visibility='visible';
}}
function ou(el){
if (ok){
outTimer=setTimeout('navout()',100);
}}
function divov(divel){clearTimeout(outTimer)}
function divou(divel){
if (ok){
outTimer=setTimeout('navout()',100);
}}
function divcl(divel){
if (ok){
var LINK=divel.firstChild;
window.location.href=LINK.href;
}}
function divbgcl(divel){
if (ok){
var LINK=document.getElementById('hover').firstChild;
window.location.href=LINK.href;
}}
function navout(){
if (lastEl!=null){
el=lastEl;
var TD=el.firstChild;while(TD.nodeName!='TD')TD=TD.nextSibling;
var IMG=TD.firstChild;while(IMG.nodeName!='IMG')IMG=IMG.nextSibling;
if(IMG.src.indexOf('nav_on')==-1)IMG.src='/images/nav_icon.gif';
if (TD.className=='navtop'){
var DIV1=document.getElementById('hoverbg1');
}else{
var DIV1=document.getElementById('hoverbg');
}
var DIV2=document.getElementById('hover');
DIV1.style.visibility='hidden';
DIV2.style.visibility='hidden';
}}
function cl(el){
if (ok){
var TD=el.firstChild;
TD=TD.nextSibling;if(TD.nodeName!='TD')TD=TD.nextSibling;
var LINK=TD.firstChild;
window.location.href=LINK.href;
}}
function bl(el){if(el.blur)el.blur()}
function clA(el){
bl(el);
if (ok)return false; else return true;
}
function init(){
if(ok){
var aPath=window.location.href.split('/');
var imgID=aPath[aPath.length-1].split('.')[0];if(imgID==''||imgID=='news')imgID='index';
switch(imgID){case 'veranstaltung':imgID='veranstaltungen';break;case 'turnier':imgID='reitturniere';break;case 'verkaufspferde_anzeige':imgID='verkaufspferde';break;};
if(document.getElementById(imgID))document.getElementById(imgID).src='/images/nav_on.gif';
}}