// JS Library for a-i-n.org
// All scripts by Manni Schneiderbauer, manni@manni.org

try{document.domain='a-i-n.org';}catch(error){}

try{document.execCommand("BackgroundImageCache", false, true);}catch(error){} // no bgimg caching on IE5.5-6

if(location.href.indexOf('strassenbahn.tk/ain/')!=-1){location.replace('http://www.a-i-n.org/ain/index.php');}

// helpers
function d(id){return document.getElementById(id);}

// navigation: mark active
function markActivePage(){
var l=d('tdVatMenu').getElementsByTagName('a');
for(var i=0;i<l.length;i++)
  {
  if(l[i].href==location.href)
    {
    l[i].className='actNavLink';
    }
  }
}

// open article
function showArticle(obj,mode){
if(!mode||mode==undefined)
  {
  obj.nextSibling.style.display='inline';
  obj.innerHTML=obj.innerHTML.replace('&gt; Zeigen','&lt; Schließen');
  obj.onclick=function()
    {
    showArticle(obj,true);
    }
  }else{
  obj.nextSibling.style.display='none';
  obj.innerHTML=obj.innerHTML.replace('&lt; Schließen','&gt; Zeigen');
  obj.onclick=function()
    {
    showArticle(obj);
    }
  }
}
