

function showChosenColor(form) {

  var pix = new Array();
  pix[1] = 'white';
  pix[2] = 'red';
  pix[3] = 'blue';
  pix[4] = 'green';
  pix[5] = 'yellow';
  pix[6] = 'orange';
  pix[8] = 'brown';
  pix[9] = 'black';
  pix[10] = 'grey';
  pix[14] = 'mix';

    if ( form == 'bottom' ) {
      var choice = document.search_form_bottom.color.value;
    }
    else {
      var choice = document.search_form_top.color.value;
    }

    if ( pix[choice] != '' ) {
      document.getElementById('chosen_color_pic_top').src = 'images/colors/'+pix[choice]+'.gif';
      document.getElementById('chosen_color_pic_bottom').src = 'images/colors/'+pix[choice]+'.gif';
    }
    else {
      document.getElementById('chosen_color_pic_top').src = 'images/colors/all.gif';
      document.getElementById('chosen_color_pic_bottom').src = 'images/colors/all.gif';
    }

}

function showAdvancedSearch() {
  document.getElementById('advanced_search').style.height = '120';
  document.getElementById('advanced_search').style.visibility = 'visible';
}

function showAdvancedSearchAdmin() {
  document.getElementById('advanced_search').style.height = '180';
  document.getElementById('advanced_search').style.visibility = 'visible';
}

// Social Bookmarking
function bookmark(provider){

  var urls = new Array();
  urls['mister_wong'] = 'http://www.mister-wong.de/index.php?action=addurl&bm_url='+encodeURIComponent(location.href)+'&bm_notice=&bm_description='+encodeURIComponent(document.title)+'&bm_tags=Stoff, Stoffe';
  urls['del.icio.us'] = 'http://del.icio.us/post?v=4&noui&jump=close&url='+encodeURIComponent(location.href)+'&title='+encodeURIComponent(document.title);
  urls['reddit']      = 'http://reddit.com/submit?url='+encodeURIComponent(location.href)+'&title='+encodeURIComponent(document.title);
  urls['slashdot']    = 'http://slashdot.org/bookmark.pl?url='+encodeURIComponent(location.href)+'&title='+encodeURIComponent(document.title);
  urls['google']      = 'http://www.google.com/bookmarks/mark?op=edit&amp;output=popup&amp;bkmk='+encodeURIComponent(location.href)+'&title='+encodeURIComponent(document.title);
  urls['stumbleupon'] = 'http://www.stumbleupon.com/submit?url='+encodeURIComponent(location.href)+'&title='+encodeURIComponent(document.title);
  urls['windowslive'] = 'https://favorites.live.com/quickadd.aspx?marklet=1&mkt=en-us&url='+encodeURIComponent(location.href)+'&title='+encodeURIComponent(document.title)+'&top=1';
  urls['netscape']    = 'http://www.netscape.com/submit/?U='+encodeURIComponent(location.href)+'&T='+encodeURIComponent(document.title);
  urls['yahoo']       = 'http://myweb2.search.yahoo.com/myresults/bookmarklet?u='+encodeURIComponent(location.href)+'&t='+encodeURIComponent(document.title);
  urls['blinklist']   = 'http://blinklist.com/index.php?Action=Blink/addblink.php&Url='+encodeURIComponent(location.href)+'&Title='+encodeURIComponent(document.title);
  urls['feedmelinks'] = 'http://feedmelinks.com/categorize?from=toolbar&op=submit&name='+encodeURIComponent(document.title)+'&url='+encodeURIComponent(location.href)+'&version=0.7';
  urls['ask']         = 'http://mystuff.ask.com/mysearch/QuickWebSave?v=1.2&t=webpages&title='+encodeURIComponent(document.title)+'%21&url='+encodeURIComponent(location.href);

  fenster=window.open(urls[provider],'Bookmark','width=700,height=400,toolbar=no,scrollbars=yes,menubar=no,left=0,top=0');
}