function quicksongsearch() {
	if(document.quicksongsearch.Keywords.value == 'Genre, Mood, Artist, Song'){document.quicksongsearch.Keywords.value = 'rumblefish';}
	var gurl = document.quicksongsearch.Keywords.value + '';
	gsetCookie("supst","","","/",gGetCookieDom());
	var theurl= '/bin/Search2?Keywords=' + gurl + ( document.quicksongsearch.collections ? '&collections='+document.quicksongsearch.collections.value : '' );
	self.location=theurl;
}

/* pair of functions to show/hide trimmed and full lists of tags for search */
function trimmed_to_full(e) {
	var trimmed = $(Event.element(e));
	
	if ( ! trimmed.hasClassName('tags-trimmed') ) //then it's a child of the parent that was bound
		trimmed = trimmed.up('.tags-trimmed');
	
	var full = trimmed.next('.tags-full');
	
	if ( ! full.visible() && ! full.down('.tags-content').innerHTML.toString().match(/^\s*$/) ) {
		//hide any fulls
		$$('.tags-full').each(function(t){t.hide()});	
		
		full.appear({	duration: 0.5,
						beforeStart:function(){ 
							
							full.clonePosition(trimmed,{
									setWidth:  false,
									setHeight: false
								});
						}
			});
	}			
}

function full_to_trimmed(e) {
	var full = $(Event.element(e));
	
	if ( ( e.relatedTarget && e.relatedTarget.up('.tags-full') ) || full.up('.tags-full') ) //then the item firing the exit is still within the div, or is the div
		return;
	
	var trimmed = full.previous('.tags-trimmed');
	
	if ( full.visible() ) {
	
		trimmed.appear({	duration: 0.5,
							beforeStart:function() { 		full.hide(); }
			});
	}
	
}
  



//just to look for the login/logout links and toggle appropriately onload
Event.observe(window,'load', function() { 

	if ( $('login_link') && $('logout_link') ) {
		gmpuser = ggetCookie('gmpuser');
    	var user = ( ggetCookie('user_mask') || gmpuser );
		if ( user && ! user.match(/anonymous/i) ) {
			$('login_link').hide();
			$('logout_link').down('span.usern').update( user );
			$('logout_link').show();
		}

    	//init handlers
    	init_popup( $('login_link').down('a'), { containerID: 'FB_HiddenContainer' });
	}
	
	// keyword popups
	$$('.tags-trimmed').each(function(t){Event.observe(t,'mouseover',trimmed_to_full.bindAsEventListener(trimmed_to_full)) });
	$$('.tags-full').each(function(t){Event.observe(t,'mouseout',full_to_trimmed.bindAsEventListener(full_to_trimmed)) });	
	
		//equalize('one','two','three');
	if ( typeof Nifty == 'function') {
	  Nifty("div.blue","big");
	  Nifty("div.landing_blue","big");
	  Nifty("div.home_side_blue","big same-height");
	  Nifty("div#cart","big bottom");
	}
	
	if(document.getElementById('menu') && typeof DynarchMenu != 'undefined')
		DynarchMenu.setup('menu',{electric:250});

});