document.onclick = function(e) {
	var p_node=0;
	e = e || event;
	var t = e.target || e.srcElement;
	
	//главная страница
	if (t.id != 'cities_x' && t.id != 'selectedCity_x' && t.parentNode.id != 'selectedCity_x' && t.id != 'ss' && t.parentNode.id != 'ss' && t.id != 'xx' && t.parentNode.id != 'xx' && t.id != 'arrow_x' && t.parentNode.id != 'arrow_x') {
		if(document.getElementById('cities_x') != null)
		Element.hide('cities_x');
	}
	
	//регистрация артиста
	if (t.id != 'selectedCountry' && t.parentNode.id != 'selectedCountry' && t.id != 'arrow' && t.parentNode.id != 'arrow') {
		if(document.getElementById('countries') != null)
		Element.hide('countries');
	}
	
	//	найти друзей
	if (t.id != 'cities' && t.id != 'selectedCity' && t.parentNode.id != 'selectedCity' && t.id != 'ss' && t.parentNode.id != 'ss' && t.id != 'xx' && t.parentNode.id != 'xx' && t.id != 'arrow' && t.parentNode.id != 'arrow') {
		if(document.getElementById('cities') != null)
		Element.hide('cities');
	}
	
	// добавление события
	if (t.id != 'places' && t.id != 'place' ) {
		
		if(document.getElementById('places') != null)
			Element.hide('places');
	
	}
	
	// регистрация юзера
	if (t.parentNode.id != 'xx' && t.id != 'plus1302' && t.parentNode.id != 'ss' && t.id != 'plus1285' && t.id != 'plus1317' && t.id != 'citylist_reg_el1' && t.parentNode.id != 'citylist_reg_el1' && t.id != 'citylist_reg_el2' && t.parentNode.id != 'citylist_reg_el2') {
		if(document.getElementById('citylist_div_reg_user') != null)
		Element.hide('citylist_div_reg_user');
	}
}
