function BoxOnFocus(obj, text){
	if(obj.value == text){
		obj.value = '';
		obj.style.color="black";
	}
}

function BoxOnBlur(obj, text){
	if(obj.value == ''){
		obj.value = text;
		obj.style.color="gray";
	}
}

function BoxOnSubmit(obj, text){
	if(obj.value != text)
		obj.form.submit();
}

function popup(url){
	window.open(url, 'picture', 'width=100,height=100,location=no,menubar=no,status=no,scrollbars=no,resizable=no,directories=no');
}

var CurrentTab = null;
function ShowTab(id){
	if(CurrentTab){
		CurrentTab.className = CurrentTab.className.replace(new RegExp(" tab_button_selected\\b"), "");
		$(CurrentTab.id+'_content').hide();
	}
	Tab = $(id);
	Tab.className += " tab_button_selected";
	$(id+'_content').show();
	CurrentTab = Tab;
}

function OpenPrint(url){
	window.open(url, 'picture', 'width=700,height=550,location=no,menubar=yes,status=no,scrollbars=yes,resizable=yes,directories=no');
}

function Toggler(obj,classes){
	$$(classes).invoke('toggle');
	obj.remove();
}