function load_node(node_name,onloadExecute){

var path = nm_get_node_path(node_name);


	if(path != ""){
		
		new Ajax(
	 		path,
	 			{
	 				method: 'post',	 				
	 				data: '',
					onComplete: function(){
												
						try{
							hs.close();//higslide loads after document loading
						}catch(e){}
						/**/
						
						//var ans = Json.evaluate(this.response.text);						
							//alert(this.response.text);
							$("mainNode").setHTML(this.response.text);
							showLoading(false);
							scroll_to_element($("body"));
							
							if(onloadExecute){
								eval(onloadExecute);
							}
					},
					onFailure: function(){
						showLoading(false);
						alert("Error communicating with server");						
					}		 									
	 	}).request();		
	 	
	}	
}

function loadNodeWithPostAction(node_name,postActionName){

var path = nm_get_node_path(node_name);

	if(path != ""){
		
		new Ajax(
	 		path,
	 			{
	 				method: 'post',	 				
	 				data: '',
					onComplete: function(){
						
						//var ans = Json.evaluate(this.response.text);						
							//alert(this.response.text);
							$("mainNode").setHTML(this.response.text);
							showLoading(false);
							scroll_to_element($("body"));
							
							//alert(postActionName);
							//rewrites callback function to get DOM update finish time
							//window.onload = alert('onload updatre');
							window.addEvent('domready', function() {
								//alert('onload updatre');
								//looks like in FF need delay to correctly update DOM changes
								//or it`s sinchronization error in mootools
								//alert($("descriptionTableMainTD"));
								window.setTimeout("eval("+postActionName+");",100);
							});
							
							//eval(postActionName);
							
					},
					onFailure: function(){
						showLoading(false);
						alert("Error communicating with server");						
					}		 									
	 	}).request();		
	 	
	}	
}



function nm_get_node_path(node_name){
	var path = "";	
	
	topTabsManager.closeAll();
	placeMenu.closeAll();
	topTabsManager.openMyName(node_name);
	//togle_element('banners_div',false);//close banners from places browser
	
	switch(node_name){		
		case "showFindCity":		
			showLoading(true,$("cur_tab_top_"+topTabsManager.getIdByName("showFindCity")));
			//togle_element('banners_div',true);
			//showLoading(true,$("cur_tab_top_1"));
			//alert('Get main page');
			path = "include/nodes/find_your_city.php";
		break;
		
		case "showRegister":
			showLoading(true,$("cur_tab_top_"+topTabsManager.getIdByName("showRegister")));
			path = "include/nodes/registration.php";
		break;
		
		case "showAbout":
			showLoading(true,$("cur_tab_top_"+topTabsManager.getIdByName("showAbout")));
			path = "include/nodes/about_us.php";
		break;		
		
		case "showMyMobile":			
			showLoading(true,$("cur_tab_top_"+topTabsManager.getIdByName("showMyMobile")));
			path = "include/nodes/my_mobile.php";
		break;				
		
		case "showHome":
			showLoading(true,$("cur_tab_top_"+topTabsManager.getIdByName("showHome")));
			path = "include/nodes/home.php";
		break;						

		case "showAdvertising":
			showLoading(true,$("cur_tab_top_"+topTabsManager.getIdByName("showAdvertising")));
			path = "include/nodes/for_customers.php";
		break;						
		
		case "showWhoItWorks":
			showLoading(true,$("cur_tab_top_"+topTabsManager.getIdByName("showWhoItWorks")));
			path = "include/nodes/how_it_works.php";
		break;								
		
		case "showMyPage":
			showLoading(true,$("cur_tab_top_"+topTabsManager.getIdByName("showMyPage")));
			path = "include/nodes/my_page.php";
		break;										
		
		
		
	}
	
	

	//showLoading(false);
return path;		
}