// JavaScript Document
/*document.observe('dom:loaded', function() {
  $('select-archive-year').observe('click', function(e) {
	  alert($('dropdown-ttnews-year').getStyle('display'));
	 if($('dropdown-ttnews-year').getStyle('display') == 'none'){ 
		 $('dropdown-ttnews-year').setStyle({display: 'block'});
	 } else {
		 $('dropdown-ttnews-year').setStyle({display: 'none'});
	 }
	  e.stop();
  });
});*/

function showSelectboxNews(tid,sid){
	if($(sid).getStyle('display') == 'none'){ 
		 $(sid).setStyle({display: 'block'});
	 } else {
		 $(sid).setStyle({display: 'none'});
	 }
}

function setArchiveYear(year){
	$('ttnews-archive-year').setValue(year); 
	document.archiveSelector.submit();
}
function setArchiveMonth(month){
	$('ttnews-archive-month').setValue(month); 
	document.archiveSelector.submit();
}
function bookmarkNews(){
		var url = window.location.href;
		var title = document.title;
		if (window.sidebar) { // Mozilla Firefox Bookmark
			window.sidebar.addPanel(title, url,"Hectas News & Presse");
		} else if( window.external ) { // IE Favorite
			window.external.AddFavorite( url, title);
		} else if(window.opera) { // Opera 7+
			return false; // do nothing - the rel="sidebar" should do the trick
		} else { // for Safari, Konq etc - browsers who do not support bookmarking scripts (that i could find anyway)
			 alert('Unfortunately, this browser does not support the requested action,'
			 + ' please bookmark this page manually.');
		}
}

