if (language.indexOf('de') < 0)
{
  //hide german descriptions
  //setVisible("description_de", "hidden");
  //setVisible("description_en", "visible");
  
  // CORNER ICONS
  switchIconTitle('corner_icon_subscribewallpaper', "Subscribe to the Newsletter and get new wallpapers by mail"); 
  switchIconTitle('corner_icon_subscribe', "Subscribe to 'Geheimnisvolles Saarland' Newsletter by Email");
  switchIconTitle('corner_icon_poster', "Buy Posters, Mugs, Mousepads, Magnets, etc. of this photo etc. at deviantART");
  
  //SEARCH FORM
  switchValue("search_button", "Search");
  
  // COMMON HEADER (NAVIGATION ICONS)
  switchIconTitle('icon_header_wallpaper', "Desktop Wallpaper");
  switchIconTitle('icon_header_sitemap', "Table of Contents");
  switchIconTitle('icon_header_tags', "Tag Index");
  switchIconTitle('icon_header_locations', "Location Index");
  //switchIconTitle('icon_header_shop', "Poster Shop");
  switchIconTitle('icon_header_map', "Map (Google Earth KML)");
  switchIconTitle('icon_header_links', "Links");
  switchIconTitle('icon_header_stats', "Gallery and Image Statistics");
  switchIconTitle('icon_header_photoblog', "Photo Blog");
  switchIconTitle('icon_header_about', "About");
  switchIconTitle('icon_header_imprint', "Imprint");
  
  //Navigation Links
  replaceText("sgCrumb", "Sie sind hier", "You are here");
  
  replacePageLinks();
  replaceText("nav_showing", "Zeige", "Showing");
  replaceText("nav_showing", "von", "of");
  replaceText("nav_showing", "Fotos", "photos");
 
  replaceText("nav_next", "Nächste", "Next");
  replaceText("nav_next", "Fotos", "photos");

  replaceText("nav_prev", "Vorherige", "Previous");
  replaceText("nav_prev", "Fotos", "photos");
  
  // GENERAL ICONS
  switchIconTitle('icon_subscribewallpaper', "Subscribe to the Newsletter and get new wallpapers by mail"); 
  switchIconTitle('icon_subscribe', "Subscribe to 'Geheimnisvolles Saarland' Newsletter by Email");
  switchIconTitle('icon_mail', "Email this page to someone you know");
  switchIconTitle('icon_mailimage', "Email this photo to someone you know");
  switchIconTitle('icon_googlemaps', "Show geotagged photos in Google Maps");
  switchIconTitle('icon_slideshow', "Start a slide show of all photos in this album");
  switchIconTitle('icon_sitemap', "Show the sitemap of this gallery");
  switchIconTitle('icon_feed', "Subscribe to the RSS feed of this gallery with our browser or your favourite feed reader");
  switchIconTitle('icon_resolutions', "Browse Wallpapers Screen Resolution");
  switchIconTitle('icon_categories', "Browse Wallpapers by Category");
  switchIconTitle('icon_save', "Download this image");
  switchIconTitle('icon_code', "Get the HTML / BBCODE Link Code to embed this photo in myspace, blogs, websites, etc.");
  switchIconTitle('icon_guestbook', "Sign the guestbook und leave a comment for this photo");
  switchIconTitle('icon_comment', "Contact the author of this photo");
  
  //Details ARRAY:
  switchText("details_date",            "Date:");
  switchText("details_lastmod",         "Last modified:");
  switchText("details_category",        "Category:");
  switchText("details_categories",      "Categories:");
  switchText("details_size",            "Resolution:");
  switchText("details_sizes",           "Resolutions:");
  switchText("details_keyword",         "Keyword:");
  switchText("details_keywords",        "Keywords:");
  switchText("details_location",        "Location:");
  switchText("details_locations",       "Locations:");
  switchText("details_email",           "Email:");
  switchText("details_license",         "License:");
  switchText("details_camera",          "Camera:");
  switchText("details_lens",            "Lens:");
  switchText("details_geotag",          "Geotag:");
  
  //Wallpaper + Slideshow Links
  switchText("link_slideshow", "Slideshow");
  switchTitle("link_slideshow", "Start a fullscreen slideshow of these wallpapers"); 
  switchText("link_download_wallpaper", "Download");
  switchTitle("link_download_wallpaper", "Go to the Download Link of this Wallpaper"); 
  replaceTitle("link_download_wallpaper_image", "Hintergrundbild herunterladen", "Wallpaper Download");
  switchText("link_download_image", "Download");
  switchTitle("link_download_image", "Go to the Download Link of this Photo"); 
  replaceTitle("link_download_image_image", "Foto herunterladen", "Download Photo");
    
  //Wallpaper Pages Links
  replaceText("sort_by", "Sortieren nach", "Sort by");
  replaceText("sort_wallpaper_date", "Aufnahmedatum", "Date taken");
  replaceTitle("sort_wallpaper_date", "Hintergrundbilder nach Aufnahmedatum sortiert", "Show Wallpapers sorted by date taken");
  
  replaceText("sort_wallpaper_hits", "Beliebtheit", "Popularity");
  replaceTitle("sort_wallpaper_hits", "Hintergrundbilder nach Beliebtheit sortiert", "Show Wallpapers sorted by popularity");
  
  replaceText("sort_wallpaper_lastmod", "Änderungsdatum", "Date last modified");
  replaceTitle("sort_wallpaper_lastmod", "Hintergrundbilder nach Änderungsdatum sortiert", "Show Wallpapers sorted by date last modified");  
  
  //Menu Items
  switchText("menu_save", "Download Photo");
  switchTitle("menu_save", "Download this image");
  switchText("menu_mail", "Send Photo");
  switchTitle("menu_mail", "Email this image to someone you know");
  switchText("menu_code", "Embed Photo");
  switchTitle("menu_code", "Copy the HTML / BBCODE of this image for use with myspace, blogs, websites, etc.");
  switchText("menu_close", "Close Menu");
  switchTitle("menu_close", "Close this menu");
  
  //Poster Links
  switchText("poster_link", "Buy Poster");
  switchTitle("poster_link", "Buy Posters, Mugs, Mousepads, Magnets, etc. of this photo etc. at deviantART");
}
else
{
  //hide english descriptions
  //setVisible("description_de", "visible");
  //setVisible("description_en", "hidden");
}

function replacePageLinks()
{
  var page = 1;
  while(document.getElementById("nav_page_"+page) != null)
  {
    replaceTitle("nav_page_"+page, "Seite", "Page");
    replaceTitle("nav_page_"+page, "von", "of");
    page++;
  }

}

function replaceTitle(id, oldText, newText)
{
  if (document.getElementById(id) != null)
  {
    document.getElementById(id).title = document.getElementById(id).title.replace(oldText, newText);
  }
}

function replaceText(id, oldText, newText)
{
  if (document.getElementById(id) != null)
  {
    document.getElementById(id).innerHTML = document.getElementById(id).innerHTML.replace(oldText, newText);
  }
}

function switchText(id, text)
{
  if (document.getElementById(id) != null)
  {
    document.getElementById(id).innerHTML = text;
  }
}

function switchValue(id, text)
{
  if (document.getElementById(id) != null)
  {
    document.getElementById(id).value = text;
  }
}

function switchTitle(id, title)
{
  if (document.getElementById(id) != null)
  {
    document.getElementById(id).title = title;
  }
}

function switchIconTitle(id, title)
{
   switchTitle(id, title);
   switchTitle("img_"+id, title);
}

function setVisible(id, visibility)
{
  element = document.getElementById(id);
  if (element != null)
  {
    element.style.visibility = visibility;
  }
}
