function bookmarksite(title, url){
if (document.all)
  {
  window.external.AddFavorite(url, title);
  }
else if (window.sidebar)
  {
  window.sidebar.addPanel(title, url, "");
  }
}

function showNavi(id){
  div = 'd'+id;
  if (document.getElementById(div)){
  var element = document.getElementById(div).style.display;
  if(element == 'none'){
    for (i=1;i<5;i++) {
      _div = 'd'+i;
      if (document.getElementById(_div)){
      if (i==id){
        document.getElementById(_div).style.display='block';
      }else{
        document.getElementById(_div).style.display='none';
      }
      }
    }
    navigating = true;
  }else{
    document.getElementById(div).style.display='none';
    navigating = true;
  }
  }else{
    if (navigating == false){
    for (i=1;i<5;i++) {
      _div = 'd'+i;
      if (document.getElementById(_div)){
        document.getElementById(_div).style.display='none';
      }
    }
    }
  }
}

function showInternationalOpen(){
    document.getElementById('d10').style.display='none';
    document.getElementById('d11').style.display='block';
}

function showInternationalClose(){
  if (navigating == false){
    document.getElementById('d11').style.display='none';
    document.getElementById('d10').style.display='block';
  }
}

var navigating = false;

function do_my_ul_thing(){
if (navigating == false){
alert('yes! the cursor is now really away from the list!');
}
}

function do_the_li_thing(){
//alert('Hello, you are on a list item');
navigating = true;
//now dont worry abount the "onMouseOut" from the ul..
}

function play_pause(id){
  if (g_test===true){
    document.getElementById('play_'+id).style.display="block";
    document.getElementById('pause_'+id).style.display="none";
  }else{
    document.getElementById('play_'+id).style.display="none";
    document.getElementById('pause_'+id).style.display="block";
  }
  g_test=g_test===true?false:true;return false;
}

function setActiveStyleSheet(title) {
  var i, a, main;
  for(i=0; (a = document.getElementsByTagName("link")[i]); i++) {
    if(a.getAttribute("rel").indexOf("style") != -1 && a.getAttribute("title")) {
      a.disabled = true;
      if(a.getAttribute("title") == title) a.disabled = false;
    }
  }
}

function openTafWindow(theURL,winName,features) {
    var mLoc=window.location.href;var dTitle=document.title;
    dTitle=escape(dTitle);mLoc=escape(mLoc);
    var mST=(theURL.indexOf('?')!=-1)?'&fr=':'?fr=';
    theURL=theURL+mST+mLoc +'&dt='+dTitle;
    var myWin=window.open(theURL,winName,features);
    myWin.focus();
}

function nextTeaser(){
    if (g_count < g_teaser_max-g_teaser){
        g_count++;
        invisible   = 0+g_count;
        visible     = 4+g_count;
        $('teaser'+invisible).style.display='none';
        $('teaser'+visible).style.display='block';
    }   
}

function prevTeaser(){
    if (g_count > 0){
        invisible   = 4+g_count;
        visible     = 0+g_count;
        $('teaser'+invisible).style.display='none';
        $('teaser'+visible).style.display='block';
        g_count = g_count-1;
    }
}

function closeTeaser(teaser){
	try {
		if (teaser != '1'){
			$('teaser1').className = 'teaser';Effect.Fade('teaser1_max', { duration: 0.0 });Effect.Appear('teaser1_min', { duration: 0.0 });
		}
		if (teaser != '2'){
			$('teaser2').className = 'teaser';Effect.Fade('teaser2_max', { duration: 0.0 });Effect.Appear('teaser2_min', { duration: 0.0 });
		}
		if (teaser != '3'){
			$('teaser3').className = 'teaser';Effect.Fade('teaser3_max', { duration: 0.0 });Effect.Appear('teaser3_min', { duration: 0.0 });
		}
		if (teaser != '4'){
			$('teaser4').className = 'teaser';Effect.Fade('teaser4_max', { duration: 0.0 });Effect.Appear('teaser4_min', { duration: 0.0 });
		}
		if (teaser != '5'){
			$('teaser5').className = 'teaser';Effect.Fade('teaser5_max', { duration: 0.0 });Effect.Appear('teaser5_min', { duration: 0.0 });
		}
		if (teaser != '6'){
			$('teaser6').className = 'teaser';Effect.Fade('teaser6_max', { duration: 0.0 });Effect.Appear('teaser6_min', { duration: 0.0 });
		}
	}catch (e){
	//nichts machen
	}
}

function partner_toggle(sichtbar, anzahl) {
    for (i=0;i<=anzahl;i++) {
        if (i == sichtbar) {
            document.getElementById('plz_'+i).style.display = "block";
        } else {
            document.getElementById('plz_'+i).style.display = "none";
        }
    }
}

g_count         = 0;
g_teaser        = 4;
g_teaser_max    = 6;

