function $( id ) {
	return document.getElementById( id );
}

function swap_menu_block( ind ) {
	var opp_ind = parseInt(0+!ind);
	
	var div = $( 'main_block_' + opp_ind );
	if ( div ) div.style.display = 'none';
	
	var div = $( 'main_block_' + ind );
	if ( div ) div.style.display = 'block';
	
	var div = $( 'swap_menu_item_' + opp_ind );
	if ( div ) div.className = 'item';
	
	var div = $( 'swap_menu_item_' + ind );
	if ( div ) div.className = 'item item_active';
	
	return false;
}

function swap_menu_hide() {
	for ( var i = 0; i < 2; i++ ) {
		var div = $( 'main_block_' + i );
		if ( div ) div.style.display = 'none';
		
		var div = $( 'swap_menu_item_' + i );
		if ( div ) div.className = 'item';
	}
	return false;
}

function swap_menu_onclick_capture( oEvent ) {
	if ( oEvent && oEvent.stopPropagation ) {
		oEvent.stopPropagation();
	}
	else {
		window.event.cancelBubble = true;
	}
}