document.observe("dom:loaded", function() {
	window.expand = false;
	var fr = $('post');
	Event.observe(fr,'submit',function(t) {
		if (window.expand) {
			Event.stop(t);
			var fe = $('form_expanded');
			var vis = 'block';
			if (fe.getStyle('display') == 'block') {
				vis = 'none';
			}
			fe.setStyle({
					display: vis
				}); 
			window.expand = false;
		}
	});
});

function switchTab(o) {
	if (!Element.hasClassName(o.parentNode, 'over')) {
		var children = Element.childElements(o.parentNode.parentNode);
		for (var i = 0; i < children.length; i++) {
			Element.removeClassName(children[i], 'over');
		}
		Element.addClassName(o.parentNode, 'over');
		if (Element.visible('tabcont1')) {
			Element.hide('tabcont1');
			Element.show('tabcont2');
		} else {
			Element.hide('tabcont2');
			Element.show('tabcont1');
		}
	}
}
function addToBookmark() {
	title = document.title;
	url = location.href;
  
	if (window.sidebar) { // Mozilla Firefox Bookmark
		window.sidebar.addPanel(title, url,"");
	} else if( window.external ) { // IE Favorite
		window.external.AddFavorite( url, title); 
	}
}

