/********************************************************
*** File: base.js                                     ***
*********************************************************
*** Javascripte                                       ***
********************************************************/

/********************************************************
*** Funktion:  DisplayTab                             ***
*** Parameter: strTabName: Name des Tabs              ***
***            strBoxName: Name der passenden Box     ***
***            bShow:      Anzeige Ja/Nein            ***
*** Ergebnis:  -                                      ***
*********************************************************
*** Passt die Anzeige von Tabs auf der Hauptseite an  ***
********************************************************/

function DisplayTab(strTabName, strBoxName, bShow) {
  if(bShow==true) {
    document.getElementById(strBoxName).style.display='block';
    document.getElementById(strBoxName).style.visibility='visible';
    document.getElementById(strTabName).style.backgroundColor='#ffcd9b';
    document.getElementById(strTabName).style.borderBottomColor='#ffcd9b';
  } else {
    document.getElementById(strBoxName).style.display='none';
    document.getElementById(strBoxName).style.visibility='hidden';
    document.getElementById(strTabName).style.backgroundColor='#ffe2c5';
    document.getElementById(strTabName).style.borderBottomColor='#ffffff';
  }  
}

/********************************************************
*** Funktion:  ChangeLn                               ***
*** Parameter: strName: Name des aktiven Tabs         ***
*** Ergebnis:  -                                      ***
*********************************************************
*** Passt die Anzeige der Wallpaper-Link-Tabs an      ***
********************************************************/

function ChangeLn(strName) {
  DisplayTab('tab_ln_category', 'box_ln_category', strName=='category');
  DisplayTab('tab_ln_new', 'box_ln_new', strName=='new');
  DisplayTab('tab_ln_top', 'box_ln_top', strName=='top');
}

/********************************************************
*** Funktion:  ChangeWp                               ***
*** Parameter: strName: Name des aktiven Tabs         ***
*** Ergebnis:  -                                      ***
*********************************************************
*** Passt die Anzeige der Wallpaper-Tabs an           ***
********************************************************/

function ChangeWp(strName) {
  DisplayTab('tab_wp_category', 'box_wp_category', strName=='category');
  DisplayTab('tab_wp_country', 'box_wp_country', strName=='country');
  DisplayTab('tab_wp_photographer', 'box_wp_photographer', strName=='photographer');
  DisplayTab('tab_wp_new', 'box_wp_new', strName=='new');
  DisplayTab('tab_wp_top', 'box_wp_top', strName=='top');
}