/* Store-specific JS */
document.observe("dom:loaded", initStore);

var ajaxURL = "ajax/?uuid="+createUUID()+"&event=ajax.";

function initStore() {
	if($("quicksearchstring"))
		setUpQuickSearch();
	
	if($("subcatsList"))
		setUpSubCatLinks();
	
	if($("aodOptions"))
		setUpAOD();
		
	if($('adminMenu')){
		Event.observe("adminMenu","mouseover",function(){showAdminMenu(1)});
		Event.observe("adminMenu","mouseout",function(){showAdminMenu(0)});
	}
	
	//Add other onLoad events here
}

function updateUnit() {
	$("unit-form").submit();
}

function closeWindow() {
	window.close();
}

function showAdminMenu(bShow){
	var menu = $('adminMenu').getElementsByTagName('ul')[0];
	if(bShow)
		Element.show(menu);
	else
		Element.hide(menu);
}
