var newsrooms = new Array();
window.addEvent("domready",function(ev){
	if ($E('.newspond_search div input')) {
		$E('.newspond_search div input').addEvent('click',function(){
			el = $E('.newspond_search div input');
			if ('Search the NewsPond' == el.value) {
				el.value = '';
			}
		})
	}
	$$('#newsroom_select option, #bar_mid select').each(function(n){
		newsrooms.push(n.getAttribute('value'));
	});
	var c = function(ev){
		el = new Event(ev).target;
		if (el.value != '') {
		  href = '#';
		  if (el.value.match(/^https?:\/\//)) {
		    href = el.value;
		  } else {
  			href = window.location.toString();
  			parts = href.replace(/https?:\/\/[^\/]+/,'').split('/');
  			if (href.replace(/https?:\/\/[^\/]+/,'').length > 1) {
  				href = href.replace(parts.join('/'),'') + '/' + el.value;
  			} else {
  				href = href + el.value;
  			}
  		}
			window.location = href;
		}
	} 
	$('newsroom_select').addEvent('change',c).selectedIndex = 0;
	if ($E('#bar_mid select')) {
		$E('#bar_mid select').addEvent('change',c).selectedIndex = 0;
	}
}) 